This is the first presentation of the "Advanced JavaScript" article series. Here I want to present JavaScript, rather I can say the advanced features of JavaScript. So, if you are very new to the web development platform then this article is probably not suitable to you for learning JavaScript from the very beginning. I suggest that yopu get a basic understanding first at first and then accept a warm welcome from this series. (Hey, you may visit w3cschools.com to begin with it.)
Now, let's get to the interesting part. Why this article series? Is JavaScript really as useful in web programming? The title of this article "Back to the old days" is given purposefully; in this article we will explain the functionality and characteristics of the old web and we will see how JavaScript has changed the face of the old static web. We will then look back at the history of the JavaScript programming language.
Old is gold but not good
People says that, or it is the proverb that "Old is gold", but it is not true for Web applications. Let's go back in time to the span of 1990 to 1998/2000. The senior and experienced person (if you are a junior developer like me then there are two options; try to imagine or go to Google and search the image of the old web) can remember the nature of those web sites. Most of the web sites were static in nature, there was very little (or no) interaction with a database and the content was not changed frequently. so, if there is need to change the content then the option was to change and edit the physical file.
Ok, so we are seeing that old web was very static in nature and it was not very interactive. So, it was a great problem because if there is a need to change something then there was no easy way and developer's interaction was necessary in each and every change.
Solution by JavaScript and it's history
In the year 1995 JavaScript came to the market holding the hand of "Brendan Eich"( great man, who has designed the face of the modern web), an employee of Netscape.
It was the web battle year between Netscape and Microsoft. Netscape considered their client-server offering a distributed OS, running a portable version of Sun Microsystem's Java. Because at that time Java was a competitor of C++ and aimed at professional programmers to develop software. Netscape wanted a lightweight interpreted language that would complement Java by appealing to nonprofessional programmers, like VB of Microsoft.
It was the first inception of JavaScript, though today it is "JavaScript" to us, but that day it was named as "Moche", the language was officially called "LiveScript" and when it is first shipped in beta release of Netscape Navigator 2.0 September 1995 , it was named "JavaScript".
Now, when Netscape changed the name, confusion began in the early developer community. Dear reader, let's confess one thing, have you ever mixed Java and JavaScript in your old college days, when you were about to learn web technology? I know many of you are in this category and the truth that I also did, when I did't have a clear concept of web applications (I still don't).
So, the developer community started to mix up Java and JavaScript. But they are not the same at all; whereas Java is an entire platform and JavaScript is an interpreted language and only used for web programming.
Why it is called script
This is another question that came to my mind when I began learning it. After a few searches and talking with people I came across the idea of what a script is. Yes, manuscript is the first thing taht comes to mind when we say script. Now, the nature of a script is small (in general) and hand written. So, generally the small hand written lines are called a script. When JavaScript was evolved basically it was used to write a small amount of code within the web page by hand, not by any automated code generated tool (probably those inventor guys had not enough vision to imagine modern jQuery and other third-party libraries). So those codes were called scripts and so that it's JavaScript.
When the internet began to be smart
Long ago by introducing the concept of DHTML in web applications. Now, what is DHTML? Is it another language? No, It's just a practice to change (read play) the DOM model using JavaScript. So, DHTML is not a language but a way to insert/update/delete the existing DOM model of web pages.
And hence, the golden era of the internet had begun. So, we can say that JavaScript has taken the great role behind the modern web (yes, the smartness of server-side language is in our mind).
And, from my little personal experience I can provide the prediction that, one day JavaScript will work in parall with server-side languages. What do you think? Leave your view in the comment section.
Now a days, a huge number of JavaScript library is coming in the market; what are they not doing? From DOM changes to form validation, even talking with databases (SQLite currently) and real-time communication. It has the power to process XML and JSON data that is like hot cakes in the modern web, various services have come in the market (WCF, Web API and so on) and jQuery has many functions to talk with them. So, everything happens using JavaScript.
Ajax made it smarter
In the above paragraph, we were talking about the smart web, but the modern web is more than that, smarter. If we see any modern (such as FaceBook, Twitter, Google+) web application we can observe many ultra-modern behaviors. Real-time notification is popping up within a fraction of a second, people are chatting, posting, tagging, commenting and doing much more.
Think about the comment section that is created by pressing a comment button in FaceBook. How does the section get generated dynamically? Ultimately the DOM model is getting changed. Right? And JavaScript has the capability to do the magic using Ajax. Since this article is entitled with the word "Advanced" and you are still reading; that means you know very well how Ajax is useful in a web page. I don't want to bore you by explaining.
Conclusion
Ok. I am planning to conclude this article. I hope you will agree with the great future of JavaScript in the modern web. Happy learning.
Next article: Advance JavaScript: Play with Object in JavaScript