Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Where to put these objects (3-tier question, again)
Message
From
15/01/2003 11:44:14
 
 
To
15/01/2003 11:14:43
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00741808
Message ID:
00741973
Views:
30
This message has been marked as the solution to the initial question of the thread.
The middle tier should have an AddUser method that does the following:

1. Call validation methods if any are needed.
2. Pass the data onto the AddUser method of the data tier.

The business tier should have no knowledge of how the data is actually saved. (Is it an INSERT, an APPEND BLANK, a SQL INSERT?) The business tier neither knows nor cares. The data ojbect handles the actual implementation of the insert (or however you implement it).


>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
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform