3 tier design best practices for multi user data entry applications

Hi experts,

Some design experience required please.

I'm about to create a 3-tier data-entry application (win forms) and am unsure about the link between Business tier (middle) and Data Access tiers. My impression was that the Data Access tier handles all access to the database and populates class properties in the middle tier. The middle tier therefore has no access to any data objects (dataset, datareader, connections etc).

Most of the literature/code samples I've found have data objects all over the application or have a thin Data Access tier returning a data object to the middle tier for processing.

I'm looking for other developers experiences that I can scale up to larger applications and web applications as future projects are increasing in size compared to current/earlier projects. Links to useful articles are also highly desired.

I've put the maximum points on here as I believe there may be many responses that deserve points.

Thanks

PF
LVL 1
PFranksAsked:
Who is Participating?
 
dancebertCommented:
>I've always been of the opinion that the data tier should contain all the data related activity and this is abstracted from the middle tier

Agreed.  One compromise I've done is that when the data is read only, a data object is passed to the middle tier, but if there is any calculations or updating then the info gets passed as a class or some collection of classes.  

0
 
dancebertCommented:
>Most of the literature/code samples I've found have data objects
>all over the application or have a thin Data Access tier returning
>a data object to the middle tier for processing.

Yep.  It's easier and faster to code that way.  The downside is that the app is tightly coupled to the data access model and the database.  Switching databases, say from Sql Server to Oracle, in a app like this requires a huge rewrite.

But how often does one need to switch databases or data access models (e.g., ADO)?  Not very.  [set cynicism on] Besides, if either does need to be switched, the original developer will probably be long gone and it's not his problem.  The time needed to develop the app is his problem [set cynicism off]

Rockford Lhotka wrote some decent stuff on VB6 N-tier for Wrox, don't know what he's done lately.
0
 
PFranksAuthor Commented:
Thanks dancebert

I've always been of the opinion that the data tier should contain all the data related activity and this is abstracted from the middle tier (ie. no access to connections, datasets etc from the middle tier - a DB version of each class exists in the data tier which proccesses and populates the contents of its middle tier equivalent).

I'm coming to the conclusion that most application development is done based on getting the job done quickly, not with a well designed model. To me this is a short term gain as a well designed model can start paying for itself after using it a couple of times.

I'll look into Lhotka's recent work .

Thanks
PF
0
 
PFranksAuthor Commented:
Thanks for confirming I wasn't looking at this the wrong way.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.