Re: Design question: transferring data between business objects and the data layer
- From: Michael Nemtsev <nemtsev@xxxxxxx>
- Date: Tue, 31 Oct 2006 06:40:55 +0000 (UTC)
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
.
- References:
- Prev by Date: How to get Procees USERNAME (Local/Remote)
- Next by Date: Re: Clearing last item from combobox?
- Previous by thread: Re: Design question: transferring data between business objects and the data layer
- Next by thread: Re: Design question: transferring data between business objects and the data layer
- Index(es):
Relevant Pages
|
Loading