Advantages and Disadvantages of a client side programming language

Moving simple validation tasks from the server to the client is a simple task and is a big advantage of client-side scripting. If the Web page has a simple validation script then the user would be immediately notified of his data entry error, and more importantly, the page would not have been sent to the server until it was validated and complete.

 

Client-side validation is one of the first processing tasks that you will perform with scripting. But Client-side Scripting  is a powerful scripting platform, and with a little programming you can do very complex processing right inside your user's browser.

 

Your goal should be to keep the processing as close to the source of data as possible. What this means is that data input by your user should be processed and prepared as much as possible on the client before it is sent to the server. The opposite is also true--if the data source is a database on your Web server, you should do the bulk of the processing of that data on the server before it is sent back to the user's browser

.

Creating Interactive Web Pages

The days of static Web pages are nearing an end. Web users are demanding live, interactive Web pages. With the introduction of Visual InterDev, you have all the tools you need to create exciting and entertaining Web content.

Learning client-side scripting is an important step in creating interactive Web pages. To create a high-quality Web site, you need to interact with users, not just present them with information. You'll do this by using VBScript to ask the user for information, and then create a custom Web page based on their input. This "dynamic" page will give them just the information they want, in a format specifically designed for them. That's interactive!

 

Manipulating the User Interface

As you look at the advantages and disadvantages of client-side versus server-side scripting, you'll find many areas where one method is much better equipped than the other. manipulating the user interface is one of these areas. Server-side scripting can do very little to modify the user's interface, but client-side scripting offers you a wealth of options.

The HTML document itself provides much of the interface that your Web users see. With client-side scripting, you can control much more than just the appearance of the document. The MsgBox and InputBox functions give you an easy way to provide the user with feedback or gather additional information for the user. But you see the real power of interface control when you realize that the browser itself is an ActiveX control that can be controlled with VBScript.

Using VBScript you can put a custom message in the status bar, open a new browser window, resize the window, or change color; you can even hide the toolbar, status bar, and menu (which users really hate, especially when you forget to turn them back on).

 

Creating Dynamic Forms with Client-Side Scripting

Having a good front-end interface is important in any database application. When creating Web applications for a large diversity of users, creating an interface that is intuitive and easy to use is an absolute necessity. Most applications on the Web today use static forms, meaning that the user is presented with a single form that must be completed in its entirety and then submitted to the server.

Client-side scripting allows the creation of dynamic forms. These forms change dynamically, based on input from the user. Suppose you are designing a patient record form for a medical firm. One field on the form would be a yes/no question to ask if the user is currently taking any medication. If she answers yes, then the form would want to know what types of medications she is currently using. Using a static form, the user would be presented with the yes/no question, and even if she answered no, she would have to tab past all of the input boxes regarding the types of medication. The same question built with client-side scripting would show the users only the yes/no question. If the user answers "yes," then all the additional fields would be shown, but a "no" response would skip directly to the next question.

Dynamic forms are much more sensitive to users' needs and are easy to create with client-side scripting.

 

Instant Feedback to Users

How many times has this happened to you? You visit a Web site to pick up a new beta software product you've heard about. Of course, the software vendor wants you to complete a registration form before he gives you access to the download page. You see twenty fields in front of you, asking your name, address, and so on. Being an Internet-savvy user, you fill out your name and e-mail and leave everything else blank. (You just want to get the software, not get on a mailing list). Now you hit the Submit button and wait for the download page to appear. Minutes go by (actually just a few seconds, but it seems like minutes) and you get a screen back that says, "sorry, but you must enter your phone number." You enter the phone number and press Submit again. This time it comes back "sorry, but you must enter your zip code." This time you look carefully at the input screen and you see that all the required fields have an asterisk on them, so now you complete the form and finally get to your download page.

With client-side scripting, this needs never happen. On a well-designed Web form, you can validate the fields the instant the user presses the Submit button (or even sooner, as he leaves the field). The client-side script can pop up a message box, telling the user what's wrong with the input, and then move the cursor to the offending field. Best of all, this is all done on the client, so feedback to the user is instantaneous and the page is not uploaded to the Web server until it is complete.

 

Disadvantages of Client-Side Scripting

Browser-Dependent Client-Side Scripts

 

 

What is a scripting language?

A scripting language is a lightweight programming language.

A scripting language is one in which people think they are writing scripts and a programming language is one in which they think they are writing programs. You can come up with rules of thumb, e.g. scripting languages tend to be interpreted.