Re: What is better practice?

From: Jay B. Harlow [MVP - Outlook] (Jay_Harlow_MVP_at_msn.com)
Date: 08/01/04


Date: Sun, 1 Aug 2004 10:40:24 -0500

Eric,
I would strongly recommend you read Martin Fowler's book "Patterns of
Enterprise Application Architecture" from Addison Wesley
http://martinfowler.com/books.html#eaa

As he covers various patterns for handling "data" both representing the
"data", such as Domain Model verses Table Module & Record Set. Plus
retrieving & storing that data, such as Table Data Gateway verses Data
Mapper.

He covers both the patterns and when you would apply each.

I have used both Domain Model with Data Mappers and Table Module with Table
Data Gateway in different solutions. Which I used was based on the
requirements unique to each solution.

In addition to Martin's book, Rockford Lhotka's book "Expert One-on-One
Visual Basic .NET Business Objects" from A! Press provides a pre-implemented
variation of Fowler's Domain Model & Data Mapper patterns.
http://www.lhotka.net/

Hope this helps
Jay

"Beringer" <borden_eric@invalid.com> wrote in message
news:03_Oc.13272$8G6.5120@fed1read04...
> I'm new to the Framework and C# so I ask the following:
>
> What is better to do when using data? Should data reside in a Dataset and
> be pulled from it or should the data be placed in classes that model the
> dataset and dispose of the Dataset? I suppose if changes are to be made
the
> Dataset would be best because then you could simply update the datastore
> when done. What if the data is not changed and simply displayed?
>
> Thanks in advance,
> Eric
>
>



Relevant Pages

  • Re: OOD/OOP and databases
    ... I would consider a Table Module & Table Data Gateway approach if my "Domain ... http://www.martinfowler.com/eaaCatalog/tableDataGateway.html patterns. ... Domain Model and Data Mapper approach. ... > I've been reading a lot of great OOD/OOP books lately (e.g.. ...
    (microsoft.public.dotnet.general)
  • Re: OOD/OOP and databases
    ... If you view the interaction with the domain model as a series of messages, ... > start with something a bit lighter which Design Patterns Explained was (a ... > business rules is much more than validation. ... > don't se much of this kind in the OO books. ...
    (microsoft.public.dotnet.general)
  • Re: P-EAA, .NET + Domain Model
    ... domain model then by all means avoid the domain model. ... So is P-EAA the shorthand for Fowler's "Patterns of Enterprise ... do with the implementation level or detailed design phases. ... can use GoF patterns to make these object work well together. ...
    (comp.object)
  • Re: OOP Question
    ... Martin Fowler's book "Patterns of Enterprise Application Architecture" from ... Domain Model & Data Mapper patterns. ... > Can someone tell me the OOP way to code classes for small tables of data? ...
    (microsoft.public.dotnet.languages.vb)