What is server side scripting?

What is server side scripting?


Server-side scripting is a web technology that allows custom HTML to be delivered to a client machine where the code that generates the custom HTML is processed on the web server before the HTML is sent to the user's machine over the internet. Server-side scripting is a option for delivering customized HTML in contrast to client-side scripting, where the HTML is modified typically by java-script in the client's machine after the HTML and java are sent from the web
What are the advantages of server side scripting?
Aside from the access of databases, server-side scripting languages (preferably PHP) you can make a webpage extremely dynamic. PHP and ASP have include functions that allow you to accomplish the same idea as old-school HTML frames in a more consistent, standard, sustainable way.
You can add username/password features, as well.

Difference between client side scripting and server side scripting with example?

Server side scripting is when the users browser makes a request back to the server and the script creates the dynamic page based a number of conditions. Languages usually used are PHP or ASP.
Example: On a website and the user clicks on the show the products link. The server then runs the PHP/ASP code to create a page by finding all the products in the data base. The page is created and sent back to the users browser for viewing.
Client side scripting is when all the code is already on the users browser and the page alters based on the users input. Language is usually JavaScript.
Example: A JavaScript drop down menu. The JavasScript alters how the menu is displayed but all the code is run locally while it is doing it.


What is difference between client side scripting and server side scripting?



As an example we'll use WikiAnswers. WikiAnswers is the server while you and I are clients. When you search WikiAnswers, a script/program executes on the server to find relevant information and return it to you or I in the form of a web page.
A client side script which is most commonly implemented using Javascript, is downloaded from the server to your computer in the form of a .js file. This script is executed solely on your computer and requires no processing by the server. Examples of this would be things such as a slideshows; pop-up windows; showing/hiding sub-menu


Web 2.0 applications have a server side and the choice of technologies to use server side is even more open than that client side. Client side is the user;s end of the experience, while server side is based on the server's end. As a developer, you can't impose a specific environment or browser client side because you must count on what is installed by your users and that's a severe restriction.

Server side, however, you decide which platforms, operating systems, programming languages, frameworks, and libraries will be used. The choice that has the most impact on the architecture of your applications is usually the programming language. Server side, any programming language can be used to implement various Web applications and the most popular choices are scripting languages such as PHP, Perl, Python, and Ruby, and interpreted languages such as Java and C#.

Client side scripts are executed and changed by the user on his side (the client side), while server side scripts are executed and changed by the user on the server. Server side scripts provide much more functionality for and by the wide variety of users (and their respective computer/browser settings) all around.
Client side Scripting is possible to be blocked , where as server side scripting can't be blocked by the user , so if you validate using CLIENT SIDE only , and client side scripting blocked then even validation can not be done and directly even wrong data can be accepted and thus makes a flaw in the system.

Client-side scripting

Client-side scripting generally refers to the class of computer programs on the web that are executed client-side, by the user's web browser, instead of server-side (on the web server).[1] This type of computer programming is an important part of the Dynamic HTML (DHTML) concept, enabling web pages to be scripted; that is, to have different and changing content depending on user input, environmental conditions (such as the time of day), or other variables.
Web authors write client-side scripts in languages such as JavaScript (Client-side JavaScript) and VBScript.

Method

Client-side scripts are often embedded within an HTML document (hence known as an "embedded script"), but they may also be contained in a separate file, which is referenced by the document (or documents) that use it (hence known as an "external script"). Upon request, the necessary files are sent to the user's computer by the web server (or servers) on which they reside. The user's web browser executes the script, then displays the document, including any visible output from the script. Client-side scripts may also contain instructions for the browser to follow in response to certain user actions, (e.g., clicking a button). Often, these instructions can be followed without further communication with the server.
By viewing the file that contains the script, users may be able to see its source code. Many web authors learn how to write client-side scripts partly by examining the source code for other authors' scripts.
In contrast, server-side scripts, written in languages such as Perl, PHP, and server-side VBScript, are executed by the web server when the user requests a document. They produce output in a format understandable by web browsers (usually HTML), which is then sent to the user's computer. The user cannot see the script's source code (unless the author publishes the code separately), and may not even be aware that a script was executed. Documents produced by server-side scripts may, in turn, contain client-side scripts.
Client-side scripts have greater access to the information and functions available on the user's browser, whereas server-side scripts have greater access to the information and functions available on the server. Server-side scripts require that their language's interpreter be installed on the server, and produce the same output regardless of the client's browser, operating system, or other system details. Client-side scripts do not require additional software on the server (making them popular with authors who lack administrative access to their servers); however, they do require that the user's web browser understands the scripting language in which they are written. It is therefore impractical for an author to write scripts in a language that is not supported by popular web browsers.
Due to security restrictions, client-side scripts may not be allowed to access the user's computer beyond the web browser application. Techniques like ActiveX controls can be used to sidestep this restriction.
Unfortunately, even languages that are supported by a wide variety of browsers may not be implemented in precisely the same way across all browsers and operating systems. Authors are well-advised to review the behavior of their client-side scripts on a variety of platforms before they put them into use.
 
What is PHP?
  • PHP is an open-source server-side scripting language (freely downloadable from php.net and zend.com). PHP version 5.2.14 is available on Webserve (www.indiana.edu, www.iupui.edu, www.iun.edu, and www.iuk.edu).
  • You can create dynamic web pages with the PHP scripting language. A dynamic Web page interacts with the user, so that each user visiting the page sees customized information. PHP can also be used to create dynamic web pages that are generated from information accessed from a MySQL database.
  • You can embed PHP commands within a standard HTML page. PHP's syntax is similar to that of C and Perl, making it easy to learn for anyone with basic programming skills.
  • Another feature that PHP offers is connectivity to most of the common databases. PHP also offers integration with various external libraries, which allow the developer to do anything from generating PDF documents to parsing XML.




Related Posts

Subscribe Our Newsletter

0 Comments to "What is server side scripting?"

Post a Comment