[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

validations in 3 tier application

Posted on 2012-03-19
4
Medium Priority
?
281 Views
Last Modified: 2012-03-21
Hello experts,

M developing the 3 tier application. I have one entry form and i want to put the validations for this entry form. Where do i put it? In BAL (Business access layer) or UI or somewhere else?

Please guide me.

Many thanks
0
Comment
Question by:dotsandcoms
4 Comments
 
LVL 53

Accepted Solution

by:
Dhaest earned 1500 total points
ID: 37736534
The best method is to perform the business-validations in the BAL.

It is never wrong to perform also some validations (like required fields, numeric fields, ...) in the GUI.


http://shoutingwords.com/creating-3-tier-layered-application-using-c-sharp.html
0
 
LVL 20

Expert Comment

by:BuggyCoder
ID: 37736535
Quoting steve from http://forums.asp.net/t/1597280.aspx/1

Validation at the presentation layer makes for a better user experience.

Validation at the 'lower' levels is important because the presentation layer may not be what is modifying the data.  Maybe it's a bulk import program or maybe it's SQL Studio that is modifying the data.

The most important validation is at the database level.  Because if invalid data gets in the system, all hope is lost.   And maybe someone's job!

Read these discussions too:-
http://msforums.ph/forums/p/54654/269489.aspx
http://asp.net.bigresource.com/Architecture-Data-Validation-in-a-3-tier-application--s9sQx80X2.html
0
 
LVL 25

Expert Comment

by:Rouchie
ID: 37736663
They should really be in both shouldn't they?

Totally agree about the user experience.  In my own 3-tier app I validate in the form to ensure that dates/blank fields etc are all recognised immediately.  Then I have further validation in the BAL to ensure that database logic is being followed.  Some of this happens in stored procedures, others in the BAL layer itself.
0
 

Author Closing Comment

by:dotsandcoms
ID: 37746135
excellent solution
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses
Course of the Month19 days, 5 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question