Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

component inside another component ? #26

Closed
ghost opened this issue Feb 5, 2013 · 3 comments
Closed

component inside another component ? #26

ghost opened this issue Feb 5, 2013 · 3 comments

Comments

@ghost
Copy link

ghost commented Feb 5, 2013

is the architecture designed for this ?

@angus-c
Copy link
Contributor

angus-c commented Feb 5, 2013

Yes, by all means. Components are not defined in terms of DOM nodes, rather you attach an instance of a Component to one or more DOM nodes after it is defined. There is nothing to stop DOM node of one component instance being nested inside the DOM node of another.

Are you having an issue with it?

@danwrong
Copy link
Contributor

danwrong commented Feb 5, 2013

It depends what you mean? Are you thinking of having an attachTo for a component called from inside another component or having components attached to DOM nodes that are decendants of a DOM node that has another component attached?

If its the former, use with extreme caution because it can create strong coupling where you mind not want it. If the latter, then yes, that's very much the pattern Flight is designed to encourage.

@ghost
Copy link
Author

ghost commented Feb 5, 2013

DOM nodes instantiation is important, but not in relation to the the point
i am making about DRY and reusability.

There needs to be an easy and thought out way for coders to be able to take
the component and override aspects of the CSS and the HTML template for it.
This will allow many many users to customise it for their needs.

It will also allow this to be used for the many mobile platforms that are
html5 based that are coming out.

This is a huge opportunity to have a great component system that will be
able to easily adapt to the many needs.
Otherwise it could turn into the Tragedy of the Commons.

The exact same patterns happens with CMS system. You have a component, and
you want to override some of it as a module.
then you can use that module in many different places.
But if the component architecture is good, you can also inject overrides
from the page level down into a module because you will need to change it
in some way for that particular page.

On 5 February 2013 19:27, Dan Webb notifications@github.com wrote:

It depends what you mean? Are you thinking of having an attachTo for a
component called from inside another component or having components
attached to DOM nodes that are decendants of a DOM node that has another
component attached?

If its the former, use with extreme caution because it can create strong
coupling where you mind not want it. If the latter, then yes, that's very
much the pattern Flight is designed to encourage.


Reply to this email directly or view it on GitHubhttps://github.com//issues/26#issuecomment-13143607.

Contact details:
+49 1573 693 8595 (germany)
+46 73 364 67 96 (sweden)
skype: gedw99

@angus-c angus-c closed this as completed Feb 17, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants