General information
Category:
Object Oriented Programming
>Hi
>
>In a 3-tier environment, if checking for the presence of empty fields, when a save is called, should the middle-tier validate this, or the presentation-tier?
>
>Thanks
>Kev
Personally, I would put this validation on the backend. My rule of thumb has been that simple data validation should be on the database and that the middle tier should deal with business rules. For example, a business rule could be that each department defined has a employee assigned to it...
This is quite a subjective area, but I really don't think it should go in the presentation logic. As the underlying aim is that you could change your presentation layer, without altering the middle and backend.
Have a good weekend
Mace
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only