P3 + M2: Explain the fundamentals of a scripting
language
This blog
will give you explanations of the different fundamentals of scripting language.
I will explain why it is different to other programming languages, what it
interpreted and provide you examples of client and server side scripting
languages. I will also give you two types of scripting languages for web
purposes and explain what J query is.
1) What is a scripting language?
Scripting
language is a high level programming language which is interpreted instead of
compiled meaning that the “English” language code that is being written out by
the user is translated into a language that the computer system understands.
Scripting languages allow rapid development and can communicate easily with
programs written in other languages. Scripts are used to develop simple
programs. There are a number of scripting languages such as Flash (action
script), pearl script, Java Script, VB script etc.
There are
some scripting languages which can be embedded within HTML and are usually used
to add functionality to a web page. For example, adding a menu style or
displaying different graphics. This language type is a client side scripting
language which changes and affects the data that the end user see’s in a
browser window. However, server side scripting languages are used to manipulate
the data. The sights and sounds you create on your web page are all created
with script programs.
Each
script represents a text document which contains a list of instructions which
need to be followed by a certain program so that the required actions can be
proceeded. This is an advantage to users as it prevents them from having to go
through every complex steps in order to achieve certain results. Scripts are
used to add interactivity to otherwise static Web pages. They also can perform
repetitive tasks like automatically filling out parts of Web-based forms.
2) What does the interpreting?
Scripting
languages are usually interpreted by web browsers such as Internet Explorer.
Web browsers interpret scripts as well as HTML which is the language that web
pages are written in. This process can be done in two ways, firstly; the
programs written in scripting languages can run directly from a server,
secondly; the script can be included directly with the HTML webpage when
someone downloads it to the computer.
What is
Java Script?
Java
script is a client side scripting language meaning it is a computer programming
language that runs inside an internet browser. Java script is a programming
code which can be inserted into HTML pages which then can be executed by all
modern web browsers. Simple web pages are made up from just text and some sort
of code which indicates to the browser how to display the text on the page.
Complex web pages that change in response to the user input require programs
such as JAVA or JAVA script to make them work. Inside a normal Web page you
place some JavaScript code. When the browser loads the page, the browser has a
built-in interpreter that reads the JavaScript code it finds in the page and
runs it. JavaScript is widely used on Web pages for calculations as well as for
displaying messages, drop-down menus and other user interface elements. Many Web sites gather information from users in online
forms, and JavaScript can help validate entries. For example, the programmer
might validate that a person's age entered into a form falls between 1 and 120.
What is JQuery?
JQuery
is a type of framework which is built using Java script. It is used to navigate
HTML documents and also allows the user to modify text, process form data, move
elements on a page, and perform animations.JQuery is a JavaScript
library that allows web developers to add extra functionality to their
websites.
JQuery
is very compact and well written JavaScript code that increases the
productivity of the developer by enabling them to achieve critical
functionality by writing very small amount of code. Below are some advantages
of JQuery:
·
It helps
to improve the performance of the application
·
It helps
to develop most browser compatible web page
·
It helps
to implement UI related critical functionality without writing hundreds of
lines of codes
·
Chaining
capabilities are very powerful.
·
Its light
weight when compared to other javascript framework
·
Save Time
– Five lines of JQuery are equivalent to 25 lines of conventional JavaScript
code. This means smaller files and faster loading web pages.
·
Plug-ins
– There are an abundance of plug-ins on the web that make creating special
effects simple and fast for web developers.
·
Mobile
Devices – jQuery is supported by any mobile device whose web browser
supports JavaScript.
M2
Client side scripting language:
Java Script – JavaScript has the ability to interact with HTML code, enabling developers to create more interactive, appealing Web sites without having to learn a complicated programming language. JavaScript is endorsed by a number of software companies and is an open language that anyone can use without purchasing a license . Client side scripting language allows you to interact within the web page. The reason JavaScript is called a client side language is because it runs scripts on your computer after you've loaded a web page.
Example of java code:
<script>
document.getElementByid(“hello”).innerHTML=’hello’;
</script>
Server side scripting language:
PHP – It is used to enhance web pages. With PHP, you can do things like create username and password login pages, check details from a form, create forums and surveys etc. PHP is known as a server-sided language. That's because the PHP doesn't get executed on your computer, but on the computer you requested the page from. The results are then handed over to you, and displayed in your browser.
Example of PHP code:
<h1 id=”hello”><?php echo ‘Hello’; ?></h1>
Another example would be Google. This is a search engine which uses server scripting language
Another example would be Google. This is a search engine which uses server scripting language
Client side scripting has 2 main purposes:
Validation: checking if data on input is valid and used a lot on web forms to make sure that what you are doing is valid. A number of checks are carried out such as presence check which is done to check if data is there or not, another check is carried out which age/date is/ validity range check.
Speed is an an advantage on client side validation. The validation is done by the client, so it happens on the user’s computer system in the browser. The server saves on processing as the validation tasks are carried out on the client’s machine.
Why is scripting language different from a programming language?
Programming languages are a set of instructions which are carried our directly by the computer hardware such as the operating system, however scripting languages are a set of instructions which are carried out by programs installed on the computer system such as text command line processors or Web Browsers.
Scripting language run with an interpreter that translates the English code that the user writes into a language that the computer understands, however with programming language the code would already be written out. Scripting language is interpreted using Web browsers.
Another difference between the two is that scripting language code are interpreted when they are run meaning when the user wants to run the program, there is a separate program which needs to read the code and interpret it and then follow instructions that the code carries. Such as Visual Basics, JavaScript etc.
On the other hand programming codes are compiled before they are run meaning that it can run any number of times. This is because the code which has been compiles already has been interpreted into a machine language e.g. C, C++ etc. Javascript is widely used on web ages for calculations as well as displaying messages, drop down menus an other user interface elements. Scripting languages allow rapid development and can communicate easily with programs written in other languages.
User interface:
Most Web Pages in modern days are dynamic. This gives the user feedback when a mouse or keyboard event takes place. When a user wants something, it happens such as when a user pressing the power button on the computer, the computer turns on or if we press the switch the lights should turn on. J Query is a java script library.
Most hardware devices include a user interface; it is not as complex as software interface. For example user interface are things such as a hardware device such as a remote control. A typical TV remote has a numeric keypad, volume and channel buttons, mute and power buttons, an input selector, and other buttons that perform various functions. This set of buttons and the way they are laid out on the controller makes up the user interface.
Most hardware devices include a user interface; it is not as complex as software interface. For example user interface are things such as a hardware device such as a remote control. A typical TV remote has a numeric keypad, volume and channel buttons, mute and power buttons, an input selector, and other buttons that perform various functions. This set of buttons and the way they are laid out on the controller makes up the user interface.
REFERENCE:
http://wiki.answers.com/Q/What_is_the_difference_between_scripting_language_and_programming_language
totally RAAD man
ReplyDeletetotally RAAD man
ReplyDeletekys
ReplyDeletekys
ReplyDeletetotally RAAD man
ReplyDelete