Home » .NET Programming | Database Programming | Web Development | Javascript Programming

A little peek behind the scenes

February 17, 2009 by Nick Spiers 0 Comments

When you, the end user, are looking at a web page there are a whole lot of things going on behind the scenes that are invisible to you.  Sub procedures, functions, event listeners, postbacks, loops, case switches, and more words that probably mean nothing to you!  As you click around on a website there are crazy amounts of information flying around behind what you see.  Every action you make on a page that causes this information to fly around is classified as either client side or server side.

 

Server side operations are anything that THE SERVER the website is running on has to handle.  This includes things like getting a new page, or saving information to a database.   The upside to a server side operation is that the server can handle any sort of request that you are making.  The server could make calculations, save information to a database, retrieve information from a database, select the page that you need to view and send it back to you, all in one request.  The downside to a server side operation is that the actual request has to travel through the cloud we call the internet to the server, which in turn has to do whatever work you requested, write a response, and then send it back through the internet to land in your browser.  All this takes time, and could be bothersome for the user.  A quick example of a server side operation: 

Refresh Page

Notice the speed that this took to process.  A couple of seconds, for the information to go from YOU to SERVER back to YOU where your browser shows you the new information.


Client side operations are everything that YOUR INTERNET BROWSER is handling.  These operations are usually very light weight and can include stuff like effects, and text changes on the page.  The upside to a client side operation is that it is normally quick and very user friendly.  The request made by the user does not have to make a trip to the server and back to get any information.  No refresh to the page is needed!  The downside to the client side operation is that there is no way for information to be transmitted to the server.  Thus it is impossible for a purely client side operation to save anything to a database on the server for future reference.  A quick example of a client side operation to the right:

Notice the speed that this took to process.  Milliseconds.  There was no round trip to the server needed.  You browser did the work to make the image disappear/reappear. 

New technologies close this gap between server side and client side operations.  AJAX is a cutting edge technology that allows client side operations to CREATE server side operations.  So some page you never see is doing your work for you and then giving you a response from the server, with you browser never being let in on the secret that a server side operation is going down.  What's this mean for you?  Faster, more productive, user friendly web sites and applications.

It's incredible to see the day to day changes that are creating the coolest websites ever.  It's fun to take ideas and inspirations that are ranked as the best, and build upon them, thus contributing to the newest generation of sites, commonly known as Web 2.0.  It's all done to create a website that just makes you say "Wow"!