Header Ads

What is Server Side Language?

A server-side language is one whose code is meant to run on the server which holds the page content; the opposite is a client-side language, which is run on the computer of the user viewing the content.

The main advantage of server-side languages is that they are almost always more powerful. Why? Mostly because they're not relying on the capabilities of an unknown system that could be anything from a 286 to a dual P4. More specifically, it doesn't rely on the interpretation of that language by the browser; because it will always run on the server, the programmer can test it and know exactly what it will do. Common examples of server-side languages are PHP and Perl.

The main advantage of client-side languages is that they can interact with the user in realtime without making another call to the server. Put differently, if you click a button and something changes immediately, it's a client-side language. If the page reloads with the changes, it's probably server-side (client-side languages CAN reload the page, they just don't have to). That works because by the time you load the page the first time, your computer already has the site's script on it. The browser just runs it locally and makes adjustments to the page as needed. Common examples of client-side languages are CSS (which is a markup language--the rest of these are programming languages) and Javascript.

Understanding the above is the easiest way for a user to know which is which. If you don't use any features of the language which give it away, they could look at the file extension (e.g. answerbag.com/a_edit.php is PHP and therefore server-side) or page source (client-side code is part of the page and will be visible in the source; server-side code isn't and won't).

No comments

Terima kasih.