Solved

validations in 3 tier application

Posted on 2012-03-19
4
270 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Needing an event fired when a row is added on a datagridview 4 36
Loop not working 29 47
Any Third party toll for Integrating chat system on ASP.NET ? 2 34
Angular JS Route 3 54
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…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

867 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

12 Experts available now in Live!

Get 1:1 Help Now