Saturday, November 15, 2008

Server-side vs Client-side validation for ASP.NET web applications

What is validation?
In HTML 'Validation' is not a process, it is merely a concept. HTML simply offers client-side scripting and form-posting. With the web page disconnected, nothing will happen server side until the form is posted - after that nothing more can happen client side until a new web page (response) is received.
Client-side validation
Client-side scripting must occur before server-side scripting. 'Validation' then is a function of our code.
If our code uses client side scripting to validate, it must happen before the form post, if we use server side code to validate it must happen after the form post.
This obviously gives the option of using the client side scripting to cancel the form post if our validation routine is not satisfied.
In .Net Microsoft offered a wizard to generate validation scripts (the validation controls), but this merely generates code as explained above.
Client-side validation is fundamentally flawed in that the 'client' which, strictly speaking is outside the applications control, is detailing whether something is acceptable or not. So, for example, the user might have a browser that does not fully support JavaScript and invalid data might be returned as valid. For this reason it is always recommended to use server side validation.
Server-side validation
Server side validation on the other hand can be very frustrating and with unexpected results. A user can submit a form, wait for long time for it to be processed, only to be told that it is invalid. For this reason we add client side validation to check the form before it is submitted, merely to enhance userability.

Friday, September 19, 2008

Stack overflow

This is a good one - launched early in the week.

Main article in "JoelOnSoftware" website


Friday, July 25, 2008

Working in the UK

Hi folks,

I presently live in UK on a HSMP visa.
I look foward to new opportunities in this market.

I will be available to share my experiences whilst here.



Thursday, February 21, 2008

Installing VSTS 2008

I had a chance to set up the VSTS 2008.

All I can share is that you need to follow the steps as outlined in this link

1. Ensure you meet all the pre-requisites
2. Ensure you follow the step-by-step guide to the letter
3. Enjoy the power of VSTS.

I love the Team Foundation Build, it makes automation of buids so basic. You have to try this!


Thursday, February 07, 2008

Upgrading a Database SQL 2000 to SQL 2005


The main thing to remember is that in SQL 2000, users used to own the objects. A user and a schema were one and the same thing.

In SQL 2005, the schema owns the objects, and the user owns the schema.
Therefore, when upgrading from SQL 2000 to 2005, the user who owned the objects is automatically converted into a schema. You ahve to go an extra mile and create a new user in 2005 and link the user to the schema.

For more details please read on the links below...

And tracking deprecated stuff in SQL 2005:


New Features in Team Build 2008


Nice article here: