Solved

validations in 3 tier application

Posted on 2012-03-19
4
273 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ASP.NET Calendar Control 5 52
C# Get Current Exchange Rate from XE 9 42
GET INFO ABOUT WHAT THE PRINTER IS DOING ? 11 73
Need Help With GDI+ in VB.Net 8 39
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

737 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