General information
Category:
Object Oriented Programming
Marcus
I'm currently working on a very simple app in order to get me into this.
I'm starting with a simple business object for USERS. What I've done so far is have a USER Data-object, and a USER business-object. The USER business-object creates the USER data-object and uses that object to obtain data from the USER table (talking in ADO).
One of the things that's stumping me is, where to insert/delete records from? The middle-tier or the data-tier? If I insert a new record do I need to pass the data-object all the field values etc?
Am I on the right track?
Thanks
Kev
>Hi Kevin,
>
>best way is to have a Data Acccess Object that is instantiated from the middle tier. This brings you back Data as a cursor. (e.g. as a view)
>
>If you then more e.g. o sql server you just have to change the data access object. (e.g. instantiate one that loads data over a remote view).
>
>In my opinion there is no way around taking a seperate data access object.
>What you get from it can differ.
>You can also think of the data access object delivering XML Data wich is always converted in the middle tier......
>
>But the key to it is a differnt object.
>
>Marcus
>
>>For example, if I have a business object called Customer (based on table Customer), how would Customer obtain customer records from the data-layer? Would it be via a data-object that sits in the middle-tier, would it execute the query directly from the data-layer? or is there another way?
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only