I'm trying to create an application composed of components but am running 
into a 
few problems. Most components are composed in an MVC style. Components can 
be 
composed of other components. The main reason for using components is so 
they 
can used accross multiple projects. A simple example of using them in an 
application would be:

Application has a Component.
Component has a Child-Component.
Child-Component has a Product Model.

This is a very simplified example. What I'm working on has many components 
and many 
models.

My question is, if the Child-Component defines its model but this 
particular 
application requires that another field exist how would you go about 
allowing the 
application to adjust the model? I have looked in to hooks but they feel 
cumbersome, 
especially when components can be nested quite deeply. Another option was 
events, 
but these usually fire after the fact, and some of these configurations may 
need 
to be asynchronous.

Does anyone have any useful patterns to achieve this?

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to