Monday, 14 March 2011

The purpose and uses of scripting

To understand the purpose of server side scripting, we are first going to clarify client side so the relationship and purpose is clear for both. As in any website there is a place for client side and server side scripting.

Client side
Client side scripting is used for two aspects of a webpage:

Enhancing interactivity: Creating a pop-up window to display information in a separate window from the Web page that triggered it. This is useful if the user requires to perform a simple calculation or consult a calendar for inputting dates.

This is achieved by embedding ActiveX controls or Java applets into the script.

Validating the content of fields: When filling in forms, each field, especially required fields denoted by an asterisk, are validated for correct input If the field is left blank or incorrect information entered then a user message will be generated and you may not continue.

Server side
Server side scripting involved the page being processed before it is sent to the client. Therefore this ability to change the page before sending it, give the server side scripting several functional possibility over client side scripting.

Access Control
This is the ability for the script to validate any page prior to sending to the client machine. It is possibility to tailor the client output so that, depending on the users role they would see a different web page.

So a sales assistant would see a different page to that of there supervisor. The login script would direct the sales assistant to one page and the supervisor to another.

Dynamic Content
This is the ability for the script to build the requested page from information stored and update elsewhere, typically a database.

This could be a list of arrival/departure times for today's aeroplanes at the local airport, or the current marks for a student.

All of these are the script reading a database and building the page from this information. As the database is updated so is the webpage.

E-commerce
With the ability of forms through HTML and dynamic content then we can purchase items.

Users can logon and create a list of item they would like to purchase, then with the use of secure HTTP, they can enter their payment details and purchase there desired items.

No comments:

Post a Comment