BlackKnight
Programmer
Hi folks,
I am trying to implement a 3-tier solution in VB6. I partially understand the concept of a 3-tier app but I wanted to confirm/correct my assumptions about what each tier, CODE-WISE, is supposed to do and not do. Here is how I understand a 3-tier solution:
1st tier (client)
=================
-A standard EXE project which contains forms or webpages.
-It creates object(s) based upon classes in the 2nd tier DLL to make data requests/saves etc
2nd tier (business logic)
=========================
-An ActiveX DLL
-It has classes to handle data validation, business constraints, and each collection of data objects.
-It manages collections of data objects as in adding, removing, iterating data objects in the collections.
-It handles the data requests from the 1st tier by returning the requested data as an XML document property. (string) which is based upon the collections it manages.
3rd tier (backend)
=========================
-An ActiveX DLL
-It contains objects that represent the data (tables, etc)
with the fields as properties.
-Each data object should be able to connect on its own to the backend so it handles the connection, SQL stored procedures, and db-specific tasks like SPADE.
-Each data object represents ONLY ONE record in a table? (not sure about this one)
-A data object is returned as an XML document property. (string) to the 2nd tier ONLY (meaning not directly to 1st.)
Given my understanding of a 3-tier solution that if a data object represents ONLY ONE record in the 3rd tier, and the 2nd tier is supposed to manage collections of data objects.
my question is:
How do I go about returning more than one record to the 2nd tier without violating the rule that a data object reprsents ONLY ONE record and that the 2nd tier doesn't know about recordsets?
For instance, if I have a customer data object in the 3rd tier and a collection of customers in the 2nd tier. If the 2nd tier requests all customers, in order, to fill out its customers collection, from the 3rd tier how is this done without the 2nd tier knowing about recordsets etc?
Thanx in advance.
Have a good one!
BK
I am trying to implement a 3-tier solution in VB6. I partially understand the concept of a 3-tier app but I wanted to confirm/correct my assumptions about what each tier, CODE-WISE, is supposed to do and not do. Here is how I understand a 3-tier solution:
1st tier (client)
=================
-A standard EXE project which contains forms or webpages.
-It creates object(s) based upon classes in the 2nd tier DLL to make data requests/saves etc
2nd tier (business logic)
=========================
-An ActiveX DLL
-It has classes to handle data validation, business constraints, and each collection of data objects.
-It manages collections of data objects as in adding, removing, iterating data objects in the collections.
-It handles the data requests from the 1st tier by returning the requested data as an XML document property. (string) which is based upon the collections it manages.
3rd tier (backend)
=========================
-An ActiveX DLL
-It contains objects that represent the data (tables, etc)
with the fields as properties.
-Each data object should be able to connect on its own to the backend so it handles the connection, SQL stored procedures, and db-specific tasks like SPADE.
-Each data object represents ONLY ONE record in a table? (not sure about this one)
-A data object is returned as an XML document property. (string) to the 2nd tier ONLY (meaning not directly to 1st.)
Given my understanding of a 3-tier solution that if a data object represents ONLY ONE record in the 3rd tier, and the 2nd tier is supposed to manage collections of data objects.
my question is:
How do I go about returning more than one record to the 2nd tier without violating the rule that a data object reprsents ONLY ONE record and that the 2nd tier doesn't know about recordsets?
For instance, if I have a customer data object in the 3rd tier and a collection of customers in the 2nd tier. If the 2nd tier requests all customers, in order, to fill out its customers collection, from the 3rd tier how is this done without the 2nd tier knowing about recordsets etc?
Thanx in advance.
Have a good one!
BK