Skip to content

Commit 0fca5cb

Browse files
authored
Merge pull request #33 from gadilashashank/master
Merged pull request #33 by @gadilashashank to master branch.
2 parents 6c862d9 + 1008f48 commit 0fca5cb

10 files changed

Lines changed: 203 additions & 11 deletions

File tree

book/SUMMARY.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020

2121
* [Conclusion](languages/assembly/conclusion.md)
2222

23+
* [C++](languages/cpp/README.md)
24+
* [Introduction](languages/cpp/intro.md)
2325

2426
* [ABC](languages/abc/README.md)
2527

@@ -65,9 +67,6 @@
6567

6668
* [Conclusion](languages/csharp/conclusion.md)
6769

68-
* [C++](languages/cpp/README.md)
69-
* [Introduction](languages/cpp/intro.md)
70-
7170
## End
7271

7372
* [Credits](credits.md)

book/languages/abc/conclusion.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ one being Python. Despite few design flaws it still is successful in programming
99
* [Making of python-An interview](https://www.artima.com/intv/pythonP.html)
1010

1111
* [The official page of ABC](https://homepages.cwi.nl/~steven/abc/)
12+
13+
* Pemberton, S. (1987, January 01). An Alternative Simple Language and Environment for PCs.
14+
Retrieved from [here.](https://ieeexplore.ieee.org/document/1695678/)

book/languages/abc/history.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22

33
## Creation
44

5-
ABC was created in the early 1980s by Leo Geurts, Lambert Meertens and Steven Pemberton at
6-
the Centrum Wiskunde & Informatica (CWI) in the Netherlands. ABC language was developed iteratively
7-
with it being the fourth iteration. All the previous versions/iterations of this language were called as B.
8-
9-
It is said that the first version of B appeared in 1969. So we can say that ABC went through a long
10-
phase of development and changes before it took its current form.
11-
12-
Note that B is not a predecessor of the C programming language.
5+
ABC was created by by Leo Geurts, Lambert Meertens and Steven Pemberton at
6+
the Centrum Wiskunde & Informatica (CWI) in the Netherlands. It was developed iteratively with ABC
7+
being the fourth iteration. The first two iterations were developed by Geurts and Meertens at the
8+
CWI between 1975-76 and 1977-79 respectively. The third iteration was developed between 1979-81 with
9+
the help of Robert Dewar from the New York University and had "B" as a working title.
10+
11+
After using B for 5 years, Geurts, Meertens and Pemberton came up with a new iteration based on the
12+
pros and cons of B and other programming languages of the time. They named this language *ABC* and
13+
as of 1986, it was ready for a formal release and was undergoing final revisions. Probably ABC was
14+
released to the public in 1987.
1315

1416
## Purpose
1517

book/languages/js/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Oh, hello there
2+
3+
> This chapter has been authored by Skayo and Gadila Shashank Reddy.
4+
5+
Welcome to the JavaScript chapter! We would like to let you know a bit more about
6+
JavaScript and programming in JavaScript.

book/languages/js/advantages.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Purpose & Advantages
2+
3+
JavaScript was initially created to fulfill the following requirements :
4+
5+
* Must be able to assemble components like plug-ins and images in web pages.
6+
7+
* Must be a lightweight scripting language.
8+
9+
* Must run in the browser environment itself and the code included in the markup of the website.
10+
11+
* Must complement Java.
12+
13+
* Easy to learn and use by web developers and amateur programmers.
14+
15+
However over subsequent versions, JavaScript was able to do *more* than assemble components on web
16+
pages. Later versions of JavaScript included capabilities such as event driven programming which
17+
basically meant that the user was able to *interact* with the web page. This made way for
18+
*[Web 2.0](https://en.wikipedia.org/wiki/Web_2.0)* where websites were able to interact with the
19+
user and able to generate content based on user driven events or actions unlike the *Web 1.0* where
20+
static content was served and the user was only able to read it.
21+
22+
Even further improvements meant that JS was able to handle server-side scripts and computing and
23+
also used in developing native and stand-alone applications instead of being only restricted to the
24+
browser environment. Also JacvaScript has a relatively high speed of execution though not as fast
25+
as C or Rust.

book/languages/js/conclusion.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Conclusion
2+
3+
Many refer JS as a necessary evil. It can help in making the websites more interactive and interesting
4+
while introducing potential problems due to negligible or no validation of its working on the server
5+
end. Although several standards and protocols have been created for the safe execution of JS like
6+
*Sandbox Environment*, *Strict Mode*, *Same origin request policy*, etc it still remains as a potential
7+
gateway to exploit negligent or non careful users.
8+
9+
## Sources
10+
11+
* [Wikipedia](https://en.wikipedia.org/wiki/JavaScript)
12+
13+
## Regarding the authors
14+
15+
This chapter was originally written by Skayo and additions were made to it
16+
by Gadila Shashank Reddy. For the original content written by Konrad, see
17+
[here.](https://github.com/Skayo/Community-Programming-Book/tree/f8c9cf8fc2d7cad783f85393e3e5103f8bc76b35/book/languages/js)

book/languages/js/disadvantages.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Disadvantages
2+
3+
Since JavaScript is basically a client-side scripting language, it can potentially introduce security
4+
issues by means of malicious implementations of the language. These issues can easily arise if the
5+
user is not careful enough and unknowingly causes the execution of malicious code.
6+
Some of these are mentioned.
7+
8+
*These security issues are in no way a disadvantage of the language itself.*
9+
10+
* Cross-site scripting (XSS)
11+
12+
* Cross-site request forgery
13+
14+
* JavaScript hijacking
15+
16+
* Browser and plugin coding errors
17+
18+
* Sandbox implementation errors
19+
20+
* Malicious/Vulnerable libraries and frameworks
21+
22+
Some other disadvantages of JavaScript which are not security issues but can be generated by the
23+
user.
24+
25+
*Again these are in no way a disadvantage of the language itself.*
26+
27+
* Potential loss of web page functionality due to user disabling JS script execution. This cannot be validated by the server because JS is client-side only.

book/languages/js/history.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# History
2+
3+
The next section gives a historical perspective of JS and provides context about the various
4+
entities involved in the creation of JavaScript.
5+
6+
Though the next section can be potentially long, it is suggested to go through it for better
7+
understanding however it can be skipped without any loss of information.
8+
9+
## Background story
10+
11+
Back in the 1990's when the World Wide Web was new and the Internet was in its infancy, different
12+
companies were in a race to create the *best and the most popular* browser in order to browse the
13+
Internet.
14+
15+
In 1993, the [NCSA](https://en.wikipedia.org/wiki/National_Center_for_Supercomputing_Applications)
16+
came up with the first ever graphical web browser named *NCSA Mosaic*. It helped a lot in expansion
17+
and popularizing the World Wide Web.
18+
19+
In 1994, a company called *Mosaic Communications* was formed which employed many authors of the NCSA
20+
Mosaic to create a browser with the aim of dominating the web-browser market. Their product was known
21+
as *Mosaic Netscape*. The company was later renamed as *Netscape Communications* and the browser was
22+
renamed as *Netscape Navigator* to avoid trademark problems with NCSA.
23+
24+
The founder of Netscape Communications, Marc Andreessen, felt the need of a language that was easy
25+
to use by web developers and designers to generate dynamic content on web pages. JavaScript was born
26+
from this need.
27+
28+
## Creation
29+
30+
In 1995, **Brendan Eich** was recruited by *Netscape Communications* with the goal of embedding the
31+
*Scheme programming language* into its *Netsacpe Navigator*, then the most popular web browser. The
32+
goal of this job was to create a lightweight and easy to use programming (read scripting) language
33+
that can run in the browser environment and is able to generate dynamic content in web pages.
34+
35+
At that time Netscape Communications was already collaborating with *Sun Microsystems* to include
36+
the latter's Java in order to compete with *Microsoft* for user adoption of its technologies and
37+
platforms. So Netscape Communications decided that the new scripting language to be created must
38+
complement Java and have similar syntax but not adopt other scripting languages of the time like
39+
Perl, Python, TCL or Scheme. Within 10 days, in May 1995, Brendan came up with a working prototype.
40+
41+
Though developed under the name **Mocha**, this scripting language was first officially known as
42+
**LiveScript** when it began shipping in September 1995 and later renamed to **JavaScript** in
43+
December 1995.
44+
45+
So this is how JavaScript came into existence.

book/languages/js/intro.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Introduction
2+
3+
## Inception
4+
5+
JavaScript (JS) is a high-level, interpreted programming language, used as a scripting language in
6+
web pages to generate dynamic content. Along with HTML and CSS, JavaScript is a part of the core
7+
technologies powering the World Wide Web and the Internet we know today.
8+
9+
Though it was intended to be used as a client-side scripting language to generate dynamic web pages,
10+
JS has different variants that can handle applications such as the *front-end* of a website/web
11+
application (Vue.js, React.js, etc) and server-side scripting a.k.a the *back-end* of a website/web
12+
application (Node.js, etc).
13+
14+
Some of its variants are also used in creating desktop and mobile native apps (Proton, Electron, etc)
15+
16+
> The file extension of JavaScript is .js
17+
18+
```md
19+
The ".js" extension in the names of some frameworks like React.js is supposed to mean that they
20+
are related to JavaScript and not that they are individual files written in JavaScript.
21+
```

book/languages/js/misc.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Some interesting facts
2+
3+
* Some say that the name JavaScript was chosen intentionally as part of a marketing strategy to promote
4+
user adoption. This similarity in naming was meant to take advantage of the already established Java
5+
programming language in creating an impression that JavaScript is an extension of Java.
6+
7+
* Currently JavaScript is a trademark of *Oracle Corporation* in the United States. If you haven't
8+
guessed this company is better known for its virtual machine technologies.
9+
10+
* The internal codename of the Mosaic Netscape or the Netscape Navigator browser was **Mozilla**.
11+
12+
* The Mozilla Foundation was founded in 1998 by the members of Netscape Communications.
13+
14+
* JS is licensed by Oracle to Netscape Communications then and currently to the Mozilla Foundation.
15+
16+
## An Example
17+
18+
This section will compare Hello World program in JavaScript with other languages.
19+
20+
### JavaScript
21+
22+
```JavaScript
23+
"use strict" // This declares strict mode and using it is a good security practice.
24+
console.log("Hello world!"); // semicolon is not mandatory but recommended
25+
```
26+
27+
### Kotlin
28+
29+
```Kotlin
30+
fun main(args: Array<String>) {
31+
println("Hello world!")
32+
}
33+
```
34+
35+
### Python
36+
37+
```Python
38+
print "Hello world!"
39+
```
40+
41+
### Ruby
42+
43+
```Ruby
44+
puts "Hello world!"
45+
```
46+
47+
Though the example was a simple one, we all start from writing Hello World, don't we? :)

0 commit comments

Comments
 (0)