eddyystop / mithril-components

Components, mixins, patterns and sample code for mithril (lhorie/mithril.js)
MIT License
114 stars 3 forks source link

readme uses `legend` instead of `label` #2

Closed Satyam closed 10 years ago

Satyam commented 10 years ago

See: https://github.com/eddyystop/mithril-components/blob/master/components/tabs/readme#L53

eddyystop commented 10 years ago

Thanks for that catch! The working example had it wrong too. Fix pushed. I'm keeping an eye on your mithril-isomorphic.

Satyam commented 10 years ago

And I'm keeping an eye on your components. I hope you don't mind.

I have already switched to your tabs component in mithril-isomorphic.

eddyystop commented 10 years ago

I'm pleased for you to use whatever's useful. BTW, I find the concept of mixins very useful for the app I'm working on.

Satyam commented 10 years ago

I've been looking at the mixins and I'm really not sure what the solder class is meant to do, it doesn't seem to be particularly useful, not much that cannot be done by simply instantiating those mixins and storing them anywhere you wanted. Unless it is doing something that escapes me, I think solder simply adds mystery to something that is quite simple.

eddyystop commented 10 years ago

Solder allows the component to be tested by mocking out its dependencies. It also allows dependencies to be switched to something else with the same interface. Solder.extend lets you build a mixin which adds features to another mixin.

So basically Solder prevents modules from getting coupled too tightly. And, yes, its as magic as any dependency injection.

p.s. I created an issue to discussion occlusionController.