Ask the Expert

What are the advantages of programming server side in JSP, ASP or PHP than client side programming i

What are the advantages of programming server side in JSP, ASP or PHP than client side programming in Javascript or VBScript? Do they both do the same thing? How does server side differ from client-side?

    Requires Free Membership to View

Client side scripting and server side scripting generally accomplish two very different tasks. Each has different advantages and disadvantages. To summarize:

Client-side scripting is generally a light-weight, less full-featured language. You don't have the ability to write files, access databases or other sophisticated application development necessities. This is primarily for security reasons, since these scripts run on the client-side and the client would not wish to allow the scripts access to resources on the local machine. That being said, it can be useful at times to push some computing off on the client, although generally, this should only be display logic. You don't want anything critical or anything secure to be dealt with on the client, because generally the user will have access to these scripts to view and modify.

Server-side scripting, as the name implies runs on the server machine and then the results of that scripting, generally HTML are sent out to the client. Server-side scripting and development languages have a broader feature set, including database access. These are more appropriate when you have complex interaction with the server such as session management and interaction with server-side resources or objects. In some cases, like JSP, it isn't even really a scripting language. A JSP page compiles to a full Java servlet, so unlike any client-side script, it does not need to be parsed and interpreted every time. Server-side scripting allows you to do very sophisticated display logic while not requiring the client to have a high-end machine.

Often a full application will have both components. Server-side scripting for the main display logic and client-side scripting for the dressing, like roll-over buttons or pop-up menus.


This was first published in September 2001

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: