Saturday, July 23, 2016

lesson 1

JavaScript Tutorial

JavaScript is a light and interpreted programming language. It is designed for creating network-centric applications. It is highly favorable to be  integrated with Java. JavaScript is very easy to implement because it is integrated with HTML. It is open and cross-platform

Audience
This tutorial is  prepared for the  JavaScript beginners to help them understand the basic functionality of JavaScript to make dynamic web pages and web applications.

precondition
For this tutorial, it is assumed that the reader have a prior knowledge of HTML coding. this will help if the reader have  some prior exposure to object-oriented programming concepts and a normal idea on creating online application.

<html>
   <body>
   
      <script language="javascript" type="text/javascript">
         <!--
            document.write("Hello World!")
         //-->
      </script>
      
   </body>
</html>

"What is JavaScript and where to use it" ?

JavaScript is a dynamic computer programming language. It is lightweight and most commonly used as a unit of web pages, whose pursuit allows client-side script to interact with the user and make dynamic pages. It is an explained programming language with Object-Oriented capabilities.
JavaScript was first known as LiveScript, but its name changed to "javascript" by Netscape. possibly because of the excitement being generated by Java. JavaScript made its first appearing in Netscape 2.0 in 1995 with the name LiveScript. The general-purpose  of the language has been inserted in Netscape, Internet Explorer, crome and other web browsers.
The ECMA-262 Specification explained a standard version of the core JavaScript language.
• JavaScript is a lightweight, interpreted programming language.
• Executed for creating network-centric applications.
• Complementary to and intrigued with Java.
• Complementary to and involved with HTML.
• Open &  cross-platform

client-side JavaScript

Client-side JavaScript is a common form of the language. The script should be involved in or reference by an HTML document for the code to be interpreted by the browser.

It means that it is not necessary for a web page to be a static HTML, but can include programs that interact with the user, control the browser, and dynamically created HTML content.

The JavaScript client-side mechanism provides many advantages over traditional CGI server-side scripts. For example, you may use JavaScript to check if the user has entered a valid e-mail address in a form field.

The JavaScript code is accomplished when the user submits the form, and only if all the entries are valid, 
that would be submitted to the Web Server.

JavaScript can be used to trap user-initiated events such as button clicks, link navigation, and other action that the user initiated explicitly or implicitly.
Advantages of JavaScript

The merits of use of JavaScript are −
• Less server communication − You can validate user input before sending the page off to the server. which saves server traffic, which means lower load on your server.
• Immediate feedback to the visitors − They do not  need to wait for a page reload to see if they have forgotten to enter something.
• Increased interactivity − You can make interfaces that react when the user hovers over them with a mouse or activates them via the keyboard.
• Richer interfaces −  useage JavaScript to include such items as drag-and-drop components and sliders to give a Rich Interface to your site visitors.

Limits of JavaScript


We cannot use JavaScript as a full-fledged programming language. It lacks the following important features −
• Client side JavaScript do not allows the reading or writing of files. This has been kept for security reason.
• we can not use JavaScript  for networking applications because there is no such support available.
• JavaScript does not  have any multi threading or multi processing capabilities.
Once again, JavaScript is a lightweight, interpreted programming language that allowed us  to build interactivity into otherwise static HTML pages.

JavaScript Development Tools

One of major strength of JavaScript is,  it does not require expensive development tools. You can start with a simple text editor such as Notepad or any other text editor tool. Since it is an interpreted language inside the context of a web browser, you do not need to buy a compiler.

To make our life simple, various vendors have come up with very nice JavaScript editing tools. Some of them are listed here −

• Microsoft Front Page: − Microsoft has developed a popular HTML editor called FrontPage. FrontPage also gives web developers with a number of JavaScript tools to assist in the creation of interactive websites.

• Dreamweaver : − Macromedia Dreamweaver mx  is a very popular HTML and JavaScript editor in the professional web development crowd. It provides several s of  handy prebuilt JavaScript components, integrates well with databases, and conforms the new standards such as XHTML and XML.

• Macromedia HomeSite 5 − HomeSite 5 is a well-liked HTML and JavaScript editor from Macromedia that can be used to supervise personal websites effectively.

Where is JavaScript Today ?

The ECMA Script Edition 5 standard is the first update to be released in over four years. JavaScript 2.0 conforms to Edition 5 of the ECMAScript standard, and the difference separating the two is highly minor.

Today, Netscape's JavaScript and Microsoft's JScript conform to the ECMAScript standard, though both the languages still support the features that are not a part of the standard.

JavaScript can be achieved using JavaScript statements that are placed within the <script>... </script> HTML tags in a web page.
You can use the >script< tags, containing your JavaScript, anywhere within you web page, but it is usually suggested  that you should keep it within the <head> tags.

The <script> tag alerts the browser program to start interacting all the text in  between these tags as a script. A simple syntax of your JavaScript will appear as follows.

The specification of JavaScript 2.0 can be tracked on the web site:http://www.ecmascript.org/

LUCENT QUICK REVISION WITH 500 BACK TO BACK REVISION

              LUCENT QUICK REVISION WITH 500 BACK TO BACK REVISION