Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Avoiding late binding.
Message
From
01/02/2005 15:12:07
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Avoiding late binding.
Miscellaneous
Thread ID:
00982828
Message ID:
00982828
Views:
71
Hi,

In my App I need a replication Manager that knows how to replicate business objects, how to replicate the child and grand child business objects of these objets and to how preserve the same relations between them as the original business objects. Depending on the business object that is asked to replicate, the Replication Manager reads from a meta data table so it knows how the business object and its children are related. To avoid using late binding with reflection by invoking methods read from the meta data table, I categorized the business objects into families (Business Objects that have no children, BO's that haven 1 child, BO's that have 2 children that are related,..). Thus I get replication scenario's associated with a particular business object. The table gives me the type of scenario to follow. The scenario's are known at compile time so no late binding needed.

This still leaves me a problem for the actual replication. Although all business objects inherit from the Mere Mortals abusiness objects I can all the same methods on this business objects. But when the moment comes to insert records, I have to instantiate (Factory) an object that is only known at run time.

Is their in this case an other approach possible to achieve the same effect by means of abstract classes or interfaces without the performance penalty of late binding?


Mark
If everything seems to be going well, you obviously don't know what the hell is going on !
Next
Reply
Map
View

Click here to load this message in the networking platform