Introduction to JavaScript Client side scripting language

Today’s topic is,

JavaScript Client side scripting language

This is an introduction to JavaScript, its past and present. This is not an mandatory tutorial for many – I thought before going deep into JavaScript, I shall put forth the basics and evolution of JavaScript so was called LiveScript. After this introduction, I’m planning to put in quality tutorials like JavaScript form validations which will be much simplified and most of all the tutorials I put here will be explained step by step – think it will be silly not a problem it will help the newbies!!

JavaScript Client side scripting language - PepFry

JavaScript Client side scripting language

History of JavaScript Client side scripting language

JavaScript was previously called as LiveScript. It was first released as a Beta version along with the Netscape Navigator version 2.0 in September 1995.

Behind the development of JavaScript there was a strong strategy

The strategy was to enhance User Interaction. Interact with users & behave as the user wants it to be by asynchronously transfer dynamic content to the website or the application which the user is using.

This Scripting Language was developed by Netscape to enable Web Authors/Creators to design user interactive websites. JavaScript interacts with HTML source code, since JavaScript is embedded inside HTML, thus enabling Web authors to develop sites with dynamic content.

JavaScript is another Client Slide Scripting Language amongst many other Open Source language in the market available for the anyone and can use without having a need to hold a license. Also, It is supported by majority of new browsers available in market for free – ranging from Firefox, Google Chrome, Internet Explorer (Limited Support), Apple Safari etc.

JavaScript is an interpreted computer programming language & is a part of web browsers so that it could interact with users and have asynchronous communication and alter websites or applications content that is displayed on the screen for the user. Also, JavaScript’s are extensively used in applications outside of websites. For Example: In PDF documents etc.

(As per Wikipedia)

JavaScript was formalized in the ECMAScript language standard and is primarily used in the form of client-side JavaScript (as part of a web browser). JavaScript was originally developed in Netscape, by Brendan Eich. Battling with Microsoft over the Internet, Netscape considered their client-server solution as a distributed OS, running a portable version of Sun Microsystems’ Java. Because Java was a competitor of C++ and aimed at professional programmers, Netscape also wanted a lightweight interpreted language that would complement Java by appealing to nonprofessional programmers, like Microsoft’s Visual Basic.

So guys that was JavaScript’s Past & Present!

What is JavaScript?

JavaScript is a Scripting Language which Runs at the Client Machines/Systems/Computers. To make it clearer – JavaScript doesn’t Run at the Server Side. Because, it is meant to be a Client Side Scripting Language & not a Server Side Scripting Language.

How JavaScript is Processed? Who Processes it?

JavaScript written on the Client Side application will be processes by the JavaScript Run-time Engine. Once the Browser detects that there is a JavaScript application within the HTML – The Browser send the information to the JavaScript Run-time Engine and the Engine then processes the JavaScript and give back the desired output that the Developer wanted.

What can JavaScript do?

JavaScript can perform many unbelievable things on Web, to list some of them:

  •  It can detect Platform where the user is on.
  •  Can detect Browser Information and its version details etc.
  •  JavaScript can add Functionality which can make huge differences while checking for Cross Cross Browser issues.

These are the very basic things what JavaScript can perform. It can even perform toughest tasks with ease – of which we’ll talk later.

How to inform Browser, that we have a JavaScript Application inside the HTML file?

It is imperative that we inform the Browser that we have embedded out JavaScript in the HTML that we are about to Run.

To accomplish that – we wrap our JavaScript within the <script> tag.

Does old Browsers support JavaScript? If it doesn’t – what will happen to the Script?

No, older Browsers doesn’t support JavaScript. If the Script is encountered on an older version of any Browser – Your script will be displayed on the screen as such in the HTML file.

To overcome this kind of issues we have a great solution!

We can solve this by again wrapping all of your script in between the HTML Comment tags, as follows:

As simple as that!
This technique is very simple. We are just making use of the Older Browsers Dis-advantage to block the Code or Script from displayed on the Screen. You have noticed that we have wrapped the Script entirely between the HTML Comment tag. That means the older Browsers stops displaying anything inside the HTML Comment. So again, I mean to say that the other way around is that Older Browser considers JavaScript or any other Scripts as HTML. Hence it stops displaying those scripts when ever encountered.

What is JavaScript Hierarchies? How does JavaScript Prioritize Objects in the HTML Page?

When your Browser loads any HTML Page on it, the JavaScript Engine automatically creates a set of Objects on the basis of what content you have in your HTML Page. Depending upon the content you have – It keeps those sets of Objects in Hierarchy Level. Which there after can be used to Call or Reference the Objects and their Properties.

Now that you might be guessing what are JavaScript Objects.

Here are some of the very common and most used Objects by Developers. The below Objects are listed in Hierarchical Level:

  •  Window
  •  Document
  •  Link
  •  Image

There will be many Objects, when we consider a whole HTML Web Page. The above list of Objects where just to make you to recall what Objects were and are!!

Hope you enjoyed this tutorial “JavaScript Client side scripting language“.

Any question – please write back to me, I’ll try to answer it asap. Hope to see your positive suggestions as well.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">