JavaScript
  Home arrow JavaScript arrow Page 2 - The Power of Javascript: An Introduction
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVASCRIPT

The Power of Javascript: An Introduction
By: Michael Youssef
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 13
    2005-06-28

    Table of Contents:
  • The Power of Javascript: An Introduction
  • Meet Javascript
  • The Hello World Example
  • Hello World? What's going on?

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    The Power of Javascript: An Introduction - Meet Javascript


    (Page 2 of 4 )

    There is a big misunderstanding about the Javascript language. Some of you may think that it's a minimized version of Sun Microsystems's Java programming Language, and others think that it's a very easy to learn programming language that has been designed specifically for use in Web pages and by non-programmers (Web designers). This is very misleading information about Javascript, so let's meet Javascript.

    Javascript is a scripting language, which is different from programming languages like Java, C++ or Visual Basic. After you write an application in one of those languages, you use a tool called a compiler to convert the code you have written (for example, the C++ code you have written) into an executable file (.exe file) that contains the binary data. The compiler takes the C++ code (or Java) and converts it into a binary file, which the computer understands. This process is done only one time for the program; then you can load the program into memory and work with it. This is not the case with Javascript; we don't have a Javascript compiler.

    As a side note, if you don't know what a binary data file is, let's just say that computers don't understand any of the programming languages we use, like C++ or Visual Basic. Instead, they only understand 0s and 1s, because the computer's memory contains millions of electrical circuits which have two states, 1 or 0, or much more like on or off.

    As we said, Javascript is a scripting language, so let's explain what this means. A scripting language doesn't use a compiler in order to execute the program code. Instead it uses a tool called an interpreter. Let's explain what happens when you want to run a Javascript program (actually we call it a script here, not a program).

    You have written Javascript code and you need to execute it. You load the code into the interpreter, and it will execute the code for you (you will understand this process more when we look at the Hello World example). This happens each time you want to run the program (the script, I mean). This can be used in a wide range of applications and systems but this is not within the purview of our discussion; in this series we discuss Javascript use in browsers only.

    So Java uses a compiler, while Javascript uses an interpreter to execute the code. They are both different languages and have nothing in common except for some syntax similarity. Actually, Netscape used the name Livescript, but it has been changed to Javascript (something to tell the industry that it's as interesting a language as Java, too).

    I will not go into the Javascript versions and browser implementation right now (we will get into that when you get more into the Javascript code). In the coming articles we will just focus on the basics of the language and programming.

    More JavaScript Articles
    More By Michael Youssef


     

    JAVASCRIPT ARTICLES

    - Comparing Fields and Customizing Error Messa...
    - Checking Numbers and File Extensions with jQ...
    - Validating Digits and Dates with jQuery`s Va...
    - Validating Ranges, Emails, and URLs with jQu...
    - More Uses for the jQuery Tooltip Plug-in`s b...
    - Building Image-Based Tooltips with the jQuer...
    - Using the jQuery Tooltip Plug-in`s bodyHandl...
    - Using Rangelength, Min and Max with the Vali...
    - Using Minlength and Maxlength with the Valid...
    - Modifying Tooltip Coordinates with the jQuer...
    - Applying a Fade Out Effect with the jQuery T...
    - Tracking Mouse Movements with the jQuery Too...
    - Checking Online Forms with the Validator jQu...
    - Nested JavaScript Functions as Objects
    - The jQuery Tooltip Plug-in







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek