Client Side Scripting

Client Side Scripting

Client-side scripting is based on the idea that the computer which the client is using to browse the web has quite a lot of CPU power that can be used to interpret logical instructions as well as render HTML, for example, such tasks as form input validation might be accomplished on the client side without a roundtrip to the server. Hence, it makes sense to share some of that burden between the client's machine and server by reducing some of the processing by the server and giving it to the client's machine.
The two most popular languages for client-side scripting are JavaScript and VBScript Both technologies allow web developers to encode scripts into their HTML, which can be executed by the user's web browser.

Client-side script is delineated by the <SCRIPT> and </SCRIPT> tags. The browser invokes the language's compiler or interpreter. Client-side script typically responds to input from the browser's user.

JavaScript, an invention of Netscape Communication Corporation, is a cross-platform, object-oriented scripting language. A small, lightweight language; it is not useful as a standalone language, but is designed for easy embedding in other products and applications.

JavaScript is logic embedded into an HTML page that runs immediately on the client machine. JavaScript is object-based. An HTML form has methods, buttons have methods, and images have methods, for example. It's best to think of it in terms of actions you can do to an object in addition to the attributes of the object; both actions and attributes can be exploited by the script logic.

Client-side script is great for image manipulation, form field validation, and non mission critical functions. The disadvantage is that different visitors have their computers configured differently and use different browsers so the results of the scripting can vary. Visitor's can even turn their browser's scripting engines off.

All activity which occurs with client-side script is unavailable to the server unless the visitor submits the information to the server via a form for example. Conversely, Server-side scripting is always available to the server and as a result, it will produce results that are more consistent with database connectivity.

Therefore, lets move on to Server Side Scripting