Re: Design question: transferring data between business objects and the data layer



Hello olduncleamos,

o> What is, in general, the preferred practice to transfer data between
o> business objects and the data layer? To be more specific, I have a
o> couple of business objects with state data that are stored in
o> external storage. The data layer take care of communicating with the
o> storage and return data in dataset or file stream or simple arrays.

o> Have the business objects directly consume a dataset seems
o> inflexible. What would be the prefered way of handling this most
o> common situation?

Everything depends on your requirements - if they are always (that usually ends up they are not in some time later) will be physically nearby there is no bad to consume DL directly. And it's not the problem to distribute them later with using WS/COM+/.NET Remoting, the problem is the interface for the communication - your all data communications should be performed through well-known (read published) contract (read interfaces)


o> To take this discussion further, let say that the current requirments
o> only requires data to come from a single source. But it is clear that
o> different data sources will be needed down the road. Would this extra
o> consideration impact your design? If so, how?

You can create DL Factory class that will be used by BL and will responsible for creating specific DL objects to do some kind of job or your can incapsulate your data sources in interfaces - look at the DataBase providers architecture, your just have the set of interfaces and your are free to know which DB (oracle, sql) u are using


---
WBR,
Michael Nemtsev :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do not cease to be insipid." (c) Friedrich Nietzsche


.



Relevant Pages

  • Re: Design question: transferring data between business objects and the data layer
    ... What is, in general, the preferred practice to transfer data between ... business objects and the data layer? ... couple of business objects with state data that are stored in external ... only requires data to come from a single source. ...
    (microsoft.public.dotnet.languages.csharp)
  • Design question: transferring data between business objects and the data layer
    ... What is, in general, the preferred practice to transfer data between ... business objects and the data layer? ... couple of business objects with state data that are stored in external ... only requires data to come from a single source. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Design question: transferring data between business objects and the data layer
    ... What is, in general, the preferred practice to transfer data between ... business objects and the data layer? ... couple of business objects with state data that are stored in external ... only requires data to come from a single source. ...
    (microsoft.public.dotnet.languages.csharp)
  • Up and Down Casting clases and interfaces
    ... I am contemplating a rather complex inplementation that calls for a factory ... class that can instantiate a large number of specific business objects, ... Since all of these are remoted, presume that the interfaces are: ... ISalesOrderManager remoteSalesOrder = ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: database drive code generated software architecture
    ... between the business layer and data layer I have found that generating ... business objects which directly map to database tables works for me. ... I have investigated a number of ORM tools. ...
    (comp.object)

Loading