Solved

Data Layer Architecture

Posted on 2004-10-13
3
247 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
Comment Utility
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
Comment Utility
0
 
LVL 14

Expert Comment

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

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

771 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

9 Experts available now in Live!

Get 1:1 Help Now