views:

39

answers:

0

Usually I start with pure model objects, usually in a tree structure.

Depending upon the application, I will end up adding functionality to the model heirarchy, such as attaching UI controls and other data depending upon the application.

Usually I'll do this by walking through the heirarchy and placing additional functionality on the model object by wrapping it.

So I end up with the model heirarchy being accessible from two different places: the pure model heirarchy and the "decorated" model heirarchy.

Is there any alternative to this?