index > Architecture General > Datasets as the DAL?

Datasets as the DAL?

I was wondering if using datasets/adapters/datatables is a good way to manage my data access layer, or if I should keeping using this generic database library one of my friend wrote.

Thanks,

John

sontek

All depends, datasets are like BD in memory, but construct it is quite long. You should use datareaders for readonly data. It should improve performance drastically.

Perhaps you could consider nhibernate or something, just to put more doubts :)

creaturita

Well, since I don't know anything about the "generic database library" your friend wrote - I can't comment about it

Arnon Rotem Gal Oz

I am in complete agreement with Arnon.

Another important part of the decision should be based around the skill set of the development team. If your development team is not strong with OOAD then DDD is probably the wrong way to go. Let me tell you there is NOTHING worse than a poorly implemented domain model :D

Requirements also go a long way towards choosing an approach ... If this is code is for a small system ... often times the problems DDD helps solve are not too big of a deal (i.e. code duplication) if you only have 3000 lines of code total and could redo the entire app in a week or two ... isolating yourself from change is probably not a very good investment (chances are the application will never become a maintenance nightmare, and if it does it can simply be re-written.

Often times delivery schedules have alot to do with the choice as well ...

Cheers,

Greg

Greg Young

The decision should most likely be determined by the type of application you are building, and where it will run.

Sean Walker

DataSet (in addition to scalar types; int string etc) would be an appropriate type to return from a DAL:

  1. It is provider neutral, so your could change the underlying provider without affecting the consumer.
  2. DataSets works well with quick and dirty solutions where you want to bind UI controls with less work.

PS: DDD is not applicable to DAL. DAL and DDD are two different levels of abstraction. DAL deals with data, DDD deals with data+domain logic.

Thomas





Senior .net developer - framework development
Topmcsd
Topmcsd wrote:

PS: DDD is not applicable to DAL. DAL and DDD are two different levels of abstraction. DAL deals with data, DDD deals with data+domain logic.

If you are practicing DDD you would probably want to seperate the Domain object from the data access (Single Resposibility Principle). The DAL is an adaptor that lets you format the Domain object to storage (a.k.a. Hexagonal Architecture)

Arnon




http://www.rgoarchitects.com/blog
Arnon Rotem Gal Oz
reply 7

You can use google to search for other answers

 

More Articles

• ExitWindowsEx Shutdown v Restart
• OTP NTBackup
• Mediator Pattern or Windows Event-based Pattern for the UI?
• Business Logic & SQL
• Has anyone received this type of error?
• WSE 3.0 cannot be used with the Compact Framework 2.0 on Mobile 5...
• Keyboard hook failes
• Is there any UI framework for vc6.0 or vc2005 which I can downloa...
• Implementing Menus using CAB
• Any books to recommend?
Bookmark and Share
Welcome to Bokebb   New Update  
 

New Articles

• Want a Guideline of Object Design and Im
• Looking for database design patterns
• M/ Security UPdates for Internet explorer
• Benchmark for IIS and .Net 1.1 +
• Guidance Needed on User Interface Proces
• FAT16 file creation problem
• Replication of remote objects on remote
• OTP where to create a blog
• Load Balancing MSMQ
• Best place to store across Layers
• scalability implies using web services?
• General business object requirements
• Pros/Con on using seperated Forest for 3
• Where can I find older versions of Micro
• optimistic concurrency with daab 2.0

Hot Articles

• Data Auditing Techniques in SQL Server
• Entities
• designing an online & offline applic
• Have you tried NHibernate?
• Any idea regarding generic UI from Busin
• Help with Architecture
• Smart Client for Web applications
• Faster Reporting Solution or XSLT Replac
• Data access application block Vs Tool ge
• CSNW registry settings
• Define BLL and DAL as static classes ?
• N-tier layer separations and connection/
• Web farm architecture
• Does Windows Workflow Muddy The Water?
• Windows Operative System Architecture

Recommend Articles

• Architecture to access userdater of mult
• What would prevent GPO from being deploy
• Multiscreen/player synchronization
• Loading User Controls into page
• What object is responsilbe for an action
• Changing "Wake On Settings" Us
• Mediator Pattern or Windows Event-based
• Welcome to the Architecture General Forum!
• SQL Server 2005 Software Architecture
• business layer strategies
• Data Modelling Tool in Visual Studio 2005
• Architecture question - how to store loc
• Dependency Injection?
• Tear-off interfaces
• How framework speaks with OS