Using Data Access Logic Components

H

Henke

I think this is a more architecturaly question but I couldn't find any news
group about this topic.
If you read Designing Data Tier Components and Passing Data Through Tires it
says that Data Access Logic Components should be used to fetch data from the
database and update the business objects. One DALC should be used for every
business object. So there should be one DALC for the Customer object and one
for the Products and so on. But what if one Businessobject contains an other
like this:
class A
{
private int id;
private B b;
}

class B
{
private int id;
private string name;
}

Should the ADalc create a BDalc instance and use it for getting the B
object, or should the business logic first use the Adalc to get the A object
and that use the BDalc to populate the A object with a B object?

Can someone please point me in the right direction here?
/Henke
 
G

Guest

I don't think one strong rule can be applied in all cases.

In this case, I would build a component to build B, then a component to
build A. Call the B building component from the A building component.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top