Introduction
Many people mistake Javscript as a programming language, however it is not. To many, Javascript is also seen as a security flaw as it can be manipulated by hackers, thus making it somewhat unpopular. I will be also explaining how JQuery saves coders a lot of time as it saves them from writing many pages of code.
Javascript
The purpose of Javscript is to extend functionality in websites, and it is client side scripting language. Javscript is not a programming language it is a scripting language. The reason why a scripting language is not a programming language is because scripting languages are interpreted within another program, for example Javascript is coded into HTML and then the browser interprets the code. Programming languages on the other hand are compiled in a compact form, and does not need to be interpreted by a different application; the output result of compiled code is the standalone. Javascript is compatible with almost every browser available, at least all the most popular ones, such as Chrome and IE.
Another reason why Javascript is often mistaken as a programming language, is because it contains some similar features of other languages, for example, Javscript is seen as dynamically typed, whereas languages such as Java are static. In both languages, you have to declare a variable, however in Java, you will need to declare a variable in a certain way, for example, int x; this would suggest that you are declaring a numerical variable only.
In Javascript when declaring a variable you can use 'var', this will store string, numerical etc.
Javascript also works on all browsers making it very efficient. However, one of the flaws of Javascript is that it has many security issues and turns many developers off from using it. Javascript is very fast at processing information as it is processed via the client side.
When you request a HTML page that contains Javascript, the script is then sent to the browser, however the browser is what interprets what to do with the script. This is because Javascript does not compile into a standalone application by itself and this makes it unable to perform any actions that saves to the disk drive. If you want to save to the disk, you would need to make the browser do it instead.
A huge problem with Javscript is that it has many security flaws, one of which allows hackers to manipulate the CSS to return malicious scripts that will execute on the clients system.
Javascript contains many features of other programming languages, for example C++. They both must close the code with a semicolon and both use if statements that look similar. Javascript is mainly used for interaction and validation. For example form validation, Javascript is able to check to see if a text box within the form contains any letters and output specific messages. As for interaction, Javscript allows coders to create buttons that can perform specific tasks. Javascript allows coders to validate information such as dates, emails (can check to see if '@' has been inputted or not), calculations in forms, can detect what browser is being used and adjust the web page to the browser and customise HTML etc.
A key feature of Javascript is that is very fast when it comes to processing compared to Java. Outputting information is usually instant with Javascript. Javscript can be fast at processing because the tasks are not processed on the websites server; this skips the process of sending and receiving.
JQuery
The purpose of JQuery is it is a library of code (Javascript library) that can be used in the future, thus saving time; often referred to as "write less, do more". JQuery is not a language, however it is written in Javascript. JQuery uses the Javascript framework, the purpose of JQuery is to make Javascript easier to use. JQuery makes a lot of things easier such as, animation and event handling.
Another reason why JQuery saves a lot of time for coders is the fact that it takes a lot of the functionality that you would write in Javscript and pack them into separate functions that can be called easily with a single line of code. JQuery will also simplify complex things from Javascript such as DOM manipulation and AJAX calls.
Conclusion
Javascript is a very useful scripting language to use, as it makes coding a lot easier for web developers. Without Javascript, you as a developer would be unable to add animation effects, such as fading images when the mouse pointer is over it. JQuery makes things even easier for a developer to write code as it is a library of pre written Javascript.
Resources
http://www.yorku.ca/nmw/facs1939f13/javascript_all/js_scriptingVSprogramming.html
http://stackoverflow.com/questions/3387603/what-can-javascript-do
No comments:
Post a Comment