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
Solved

Data Layer Architecture

Posted on 2004-10-13
3
251 Views
Last Modified: 2010-04-23
I've inherited a project on which the previous architect either didn't know or care about what "good design" means.

The application being developed is a "fat" (WinForms) client with a SQL Server 2000 back-end.  Unfortunately, I've been tasked with revamping the design of the application (it's best described as a 1.25 tier application).  The UI makes direct accesses to the data repository, the business layer directly manipulates UI elements - it's a real mess.  However, I've developed an object model that will remedy most of the existing issues.  We simply have to make it a reality and then re-work the UI to consume the services provided by the objects.

I'm very concerned about the data layer.  The model is hierarchical - that is class 1 can contain a collection of class 2 objects, which in turn can contain a collection of class 3 objects, and so on.  If each of these classes either inherits the data access manager or declares it's own private instance, then it seems there's a lot of overhead that's unnecessary.  How does one implement an "encapsulated" data layer in VB.NET which is divorced from the data objects?  Is remoting with both the client and listener on the same machine the answer?  If so, singleton or single use?

Several years ago, I was involved in a project that leveraged an out-of-process server for data repository services.  It was a singleton (public shared) active-x app.  It worked well and I believe this is the approach that we should be taking to "slim down" our current application.  Am I focused on a non-issue here, or is there some other approach that I'm not giving appropriate consideration to?

Any response is greatly appreciated!
0
Comment
Question by:milimol
3 Comments
 
LVL 6

Accepted Solution

by:
etmendz earned 500 total points
ID: 12295633
Have you seen the Microsoft Data Access Application Block for .Net? It is a generic data access class that supports connection pooling and transactions. You can play around with it, modify it and improve it if desired. Get the code here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/daab-rm.asp

One good thing about this design is that the methods are Shared so you don't need to create an instance of the class.

Have fun...
0
 
LVL 9

Expert Comment

by:checoo
ID: 12295765
0
 
LVL 14

Expert Comment

by:ptakja
ID: 12296661
Have you thought about Web Services and encapsulating the data access stuff on a local web server?
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VS.net 2010 11 48
vb.net 1 month apart 11 35
Generate Numbers in JQuery file 11 66
how to hit button in form and close application from main() 4 20
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

808 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