Presentation is loading. Please wait.

Presentation is loading. Please wait.

Scripting Languages Client Side and Server Side. Examples of client side/server side Examples of client-side side include: JavaScript Jquery (uses a JavaScript.

Similar presentations


Presentation on theme: "Scripting Languages Client Side and Server Side. Examples of client side/server side Examples of client-side side include: JavaScript Jquery (uses a JavaScript."— Presentation transcript:

1 Scripting Languages Client Side and Server Side

2 Examples of client side/server side Examples of client-side side include: JavaScript Jquery (uses a JavaScript library containing very easy to use, condensed functions and syntax - http://jquery.com/download/ )http://jquery.com/download/ VBScript (simplified version of Visual Basic) ActionScript (used in Flash animation/web pages) Examples of server-side include: PHP (.php) ASP (.asp) JSP (.jsp), ASP.NET (.NET) (.aspx), COLDFUSION (.cfm) RUBY (.rb) RUBY ON RAILS (.rbw) PERL (.cgi,.pl,.ipl) PYTHON (.py) Scripting languages require a web server to run, e.g. Apache and IIS. Check the server is capable of running the server-side scripting language

3 Advantages/disadvantages of Client Side Scripts Client side ADVANTAGES Takes load off server (processing done at client end – quicker – uses less bandwidth) Can be used for non essential functions (e.g. navigation, pop ups, rollovers, form validation, etc.) Easy to use – only text editor and a browser required. No testing software needed Makes web pages more interactive DISADVANTAGES Malicious executable code downloaded from a remote server to a web browser's machine, could be installed and run allowing access to data, to install a virus, etc. Different layout engines (browsers/platforms) may render JavaScript differently resulting in inconsistency in terms of functionality and interface. The user can turn settings for JavaScript off in their browser

4 Advantages/disadvantages of Server Side Scripts Client side ADVANTAGES Can be used for security essential functions (e.g. login screens, form validation) Relatively easy to use – require a server to run and editor to write scripts Script is parsed or interpreted at the server end, and sends the web page to the web browser as HTML (user cannot see the server script) Makes web pages more interactive Can access databases and create dynamic web pages DISADVANTAGES Can put more load on server (requires bandwidth, may be sharing server with other websites, may cause delay in web page being sent to browser) Different layout engines (browsers/platforms) may render script differently resulting in inconsistency in terms of functionality and interface.

5 Implementing Client-side Scripts Client-side JavaScript code can be embedded within HTML documents in a number of ways: Between a pair of script tags From an external file specified by the src attribute of a script tag, e.g. In an event handler, specified as the value of an HTML attribute such as onclick, onsubmit or onmouseover, e.g. In an URL that uses the special javascript:// protocol

6 JavaScript Example - Date Today's Date function date( ) { var d = new Date( ); // Create a date object storing today's date and time document.write(d.toLocaleString( )); // Write the value of the date object to the document } The date and time are date( );

7 Links http://www.jscripters.com/javascript-advantages-and-disadvantages/ www.w3schools.com www.apache.org/


Download ppt "Scripting Languages Client Side and Server Side. Examples of client side/server side Examples of client-side side include: JavaScript Jquery (uses a JavaScript."

Similar presentations


Ads by Google