Webocreation

Tuesday, September 22, 2009

Define JavaScript? List advantages and disadvantages between java and JavaScript?

Define JavaScript? List advantages and disadvantages between java and JavaScript?
JavaScript is a compact, object-based scripting language for developing client Internet applications. It was designed to add interactivity to HTML pages. JavaScript is a scripting language - a scripting language is a lightweight programming language. A JavaScript is usually embedded directly in HTML pages. JavaScript is an interpreted language (means that scripts execute without preliminary compilation).Everyone can use JavaScript without purchasing a license. All major browsers, like Netscape and Internet Explorer, support JavaScript. JavaScript was developed by Netscape as Live Script - changed to JavaScript when endorsed by Sun 1993, version 1.0 released with Netscape 2.0. JavaScript is a powerful scripting language that is also capable of performing extensive form data collecting and form processing functions.
For instance, the following is an example of a complete script JavaScript tag:

Advantages of JavaScript
• Cross Browser supporting:
This means that the JavaScript codes are supported by various browsers like Internet Explorer, Netscape Navigator, and Mozilla etc.
• Platform Independent:
JavaScript codes can be executed in any platform like Linux, Microsoft Windows and many other operating systems.
• Lightweight for fast downloading:
The JavaScript codes runs directly in the client machine. The code should be downloaded all the way from server to the client and this time duration is very minimum and the executing the codes of JavaScript is also very fast.
• Validating Data:
The data can be validated in the two different ways:
 Validating in server side or in server machine.
 Validating in client side or in client machine.
In these two different types of validation of data the second one is much more faster, and this is done through JavaScript.
• Sophisticated User Interfaces:
By
using JavaScript you can create a user interactive interfaces that can
communicate with the user and the Browser.
• In-Built software:
To you don't need any extra tools to write JavaScript, any plain text or HTML editor will do, so there's no expensive development software to buy.
• Easy to Learn:
The JavaScript programmer should know the minimal syntax of JavaScript since it supports many syntax and data types as C and C++.
It's also an easy language to learn, and there's a thriving and supportive online community of JavaScript developers and information resources.
• Designed for programming User-Events:
JavaScript supports Object/Event based programming. So the code written in JavaScript can easily be break down into sub-modules.
Disadvantages of JavaScript:
• Launching an application on the client computer.
JavaScript is not used to create stand-alone application; it is only used to add some functionality in any web page.
• Reading or writing files:
JavaScript cannot read and write files into the client machines. It can only be used as a utility language to develop any web site.
• Retrieving the text contents of HTML pages or files from the server.
• Reading and Writing files to the server:
JavaScript can read and write to any file in the server as well.
• Sending secret e-mails from Web site visitors to you:
JavaScript cannot be used to send email to the visitors or user of the web site.
This can be done only with the server side scripting.
• Cannot create Database Application:
By using JavaScript you cannot connect the web site to the database. For this you need to use server-side scripting.
• Browser Compatibility Issues:
Not all browsers support the JavaScript codes. The browser may support JavaScript as a whole, but may not support the codes or lines of codes written in JavaScript and may interpret differently.
• JavaScript does not implement multiprocessing or multithreading.
• Use printers or other devices on the user's system or the client-side LAN.
• JavaScript has limitations of writing in a client machine. It can only write the cookie in client machine that is also of a certain size i.e. 4K.

No comments:

Post a Comment