Presentation on theme: "Server-Side vs. Client-Side Scripting Languages"— Presentation transcript:
1 Server-Side vs. Client-Side Scripting Languages What are they and what are their differences?By Lories Slockbower
2 What is server-side scripting? Server-side scripting is a method of programming for the web that runs software on the server rather than the browser or installed plugins to create dynamic web pages.Languages used for these tasks are normal programming languages which include Perl, PHP, JSP, Ruby, ColdFusion, and Python
3 What can server scripts do? Customize a web page and dynamically change its contentsRespond to queries from users or from HTML formsAccess database and send the information back to the browser
4 Advantages of server-side scripting User does not need to download plugins like Java or FlashUser can create one template for the entire websiteThe site can use a content management system which makes editing simpler.Generally quicker to load than client-side scriptingUser is able to include external files to save codingScripts are hidden from view so it’s more secure. Users only see the HTML output.
5 Disadvantages of server-side scripting The scripts can be used by attackers to access the server. They do this by changing the URL to something that takes advantage of a hole in security. System administrators must keep all server- side scripting updated and use an application firewall to prevent this.Scripting software must be installed on the content management system tools in order to store the dynamic data.
6 Common server-side scripting languages ASP/ASP.net –Active Server Pages developed by Microsoft to make advanced web pages. Unix servers use Chillisoft ASP. Allows user to get any .net-enabled language to program a site.JSP/Servlets – Java Server Pages which include JSP tags mixed in with html. Most popular language for higher level applications.ColdFusion – Runs on top of a JSP/servlet engine. Can cost $1,299 a server. Users can download a free “developer” edition but that is limited to one IP address.
7 Server-side scripting example ASP source:Output result<html> <body> <% response.write("Hello World!")%> </body> </html>Hello world!
8 More server-side scripting languages Perl – Practical Extraction and Reporting Language, first released in 1987, is a powerful language with advanced features. Available for free from various scripting directories. Supported by operating systems UNIX, MAC OS 7-9 andPHP or PHP Hypertext Preprocessor is an open source language. Considered by “standard’ choice for server side scripting in Unix/Linux platforms.Python- Created in 1989, it is not supported by most web hosting companies. Although easy to learn, there is no standard web application framework for it.
9 What is client-side scripting language? Client-side scripts are placed within an HTML document in the user’s web browser rather than the web server to allow greater interactivity in a document. For example – client-side scripting could check the user’s form for errors before submitting itEnables web pages to change content according to user input and other variables, including the time of day. Can also be stored in a separate file that is referenced to the documents that use it.
13 Disadvantages of client-side scripts If the user’s browser is out of date, the website will not display properly.More quality assurance testing is required because different browsers support scripts differentlyNot secure because anyone can look at the code in the page sourceSome browsers will disable the active content and tell the user they may be harmful.