Client Vs Server Side Validation

With the developments in javascript frameworks such as Jquery and the ever growing speed at which we can access the web, are we going about form validation the wrong way? This is a question i have been thinking about a great deal just lately.

Depending on who you ask, you will get a range of answers when it comes to validation. There are of course 2 main schools of thought, both operating in different environments, however both achieving the same ends. Server side validation focuses on using programming languages such as PHP to quickly validate information and check against errors, it benefits from being cross browser compatible, as well as being a faster method of handling the information. The alternative to this, and often the preferred method is to go with client side validation. Using languages such as javascript to handle information before it is sent. This can cause problems across browsers and especially if the user has javascript turned off. The one over riding advantage is that javascript allows form information to be validated before it has even been sent. meaning when information is sent there is no need to validate, or it can be validated server side as well, making absolutley sure the information is valid before it reaches its final destination.

However websites are now being offered the best of both worlds with the introduction of jquery’s ajax functionality which means you can run PHP code through a web page without having to submit any forms or redirect to any other pages. Complete validation from the comfort of your own DOM.

This new technique has been slow to catch on, but finally we are beginning to see the fruits of ajax labour. I hope to bring you a tutorial with a walk through of how to achieve this soon, but until then i strongly recommend anybody who is not familiar with the bassistance
jquery form validation to check it out, its worth its weight in gold

  • Digg
  • StumbleUpon
  • del.icio.us
  • Twitter
  • Google Bookmarks
  • email
  • Facebook
  • RSS

Talk to me