That would have been exactly my point.
The isolation and explicitness is indeed a good thing. I sure hope that you did not interpret my comments as a reasoning to propose reverting that, because that is most certainly not my intention. My primary concern is where and how the explicitness is to be implemented. In the templates in a format that is not really suitable and harder to maintain.
I’ve been trying to convince you there is room for improvement here. Whilst you haven’t really confirmed this, if I interpret your reply correctly you’re also not denying it and you are open to suggestions.
Basically I’m searching for a solution that would mitigate my concerns while preserving explicitness. Personally I would like to move some explicitness away from the template and into the components. Increasing templates maintainability with some obfuscation in the template as a trade-off.
So far I came up with one approach which isn’t entirely thought through yet, but we should start from somewhere. If you believe it would be a useful addition to Ember I wouldn’t mind turning it into an RFC.
I’m thinking of the possibility to define keywords in a component. This definition would contain the default component and bindings to use. So instead of having to write:
{{profile-component profile=poster}}
With the defined keyword “poster”, component “profile-component” default binding “profile=poster” you could simply write:
{{poster}}
The other way around I think it ought to be possible to explicitly define the attributes a component accepts and whether it’s required or optional. Perhaps even with type checking when debugging and maybe an option to disallow the binding of not explicitly defined attributes.
I agree on the personal taste thing. I’m primarily annoyed by the dash requirement. I would like to have this in pods:
post/navigation/component.js
post/navigation/item/component.js
instead of
post/post-navigation/component.js
post/navigation/navigation-item/component.js
or
post/post-navigation/navigation-item/component.js
I think I’ve gotten a bit used to the dash notation in Ember but I still find a little odd to have camel-case naming in my javascript with the dash notation counterparts as file names.