Solved

validations in 3 tier application

Posted on 2012-03-19
4
269 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 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
excellent solution
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

772 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now