Add section on Module Unification Packages#3536
Add section on Module Unification Packages#3536jayjayjpg merged 2 commits intoblog/embertimes-62from
Conversation
This might be a bit too long? Not sure where to cut it or if I maybe need to add more?
|
|
||
| ## [SECTION TITLE](#section-url) | ||
| ## [Module Unification with Ember Addons](https://github.com/emberjs/rfcs/pull/367) 🎁 | ||
| [Module Unification Packages](https://github.com/emberjs/rfcs/pull/367) is a new RFC, created by [@mixonic](https://github.com/mixonic), that sets out to describe how packages, **Ember Addons**, work and how apps and addons will migrate to the new [Module Unification](https://github.com/emberjs/rfcs/blob/master/text/0143-module-unification.md) structure from the classic structure. This RFC iterates on and is set to replace another RFC called [Module Unification Namespaces](https://github.com/emberjs/rfcs/pull/309) which had some syntax, like the `::` syntax, that proved problematic. |
There was a problem hiding this comment.
that sets out to describe how packages, Ember Addons
I suggest sticking with "describe how Ember apps and addons will migrate to the new...". The terminology of "package" is confusing if this is someones first introduction to the RFC. Focusing on "this is how addons and apps work under MU" is a good high level message.
| {{! invokes node_modules/gadget/src/ui/components/Widget/component.js }} | ||
|
|
||
| {{use Widget from 'gadget'}} | ||
| <Widget @options=someOptions @value=someValue /> |
There was a problem hiding this comment.
My syntax here was incorrect, I need to fix it in the RFC. This should be:
| ## [Module Unification with Ember Addons](https://github.com/emberjs/rfcs/pull/367) 🎁 | ||
| [Module Unification Packages](https://github.com/emberjs/rfcs/pull/367) is a new RFC, created by [@mixonic](https://github.com/mixonic), that sets out to describe how packages, **Ember Addons**, work and how apps and addons will migrate to the new [Module Unification](https://github.com/emberjs/rfcs/blob/master/text/0143-module-unification.md) structure from the classic structure. This RFC iterates on and is set to replace another RFC called [Module Unification Namespaces](https://github.com/emberjs/rfcs/pull/309) which had some syntax, like the `::` syntax, that proved problematic. | ||
|
|
||
| This RFC proposes to add a new `{{use}}` helper that will be used to call external components that are provided by addons. This helper is a subset of the javascript imports that we are used to. |
There was a problem hiding this comment.
Maybe:
This RFC proposes to add a new
{{use}}helper. This helper imports components from an addon into an application's template. The helper provides a subset of the functionality JavaScript imports have, but is syntactically slightly different.
|
|
||
| Something else that is proposed in this RFC is the use of a template `prelude.hbs` that, **at compile time**, will be injected into every template in the app. This can be used to inject global components such as the widely used `{{t 'token'}}` component used for *internationalization*. | ||
|
|
||
| Services also get some **love** in this RFC. The suggestion is that all service calls to addons will become more verbose in that the injected service will need to provide where to inject from. |
There was a problem hiding this comment.
Perhaps:
Services also get some love in this RFC. The suggestion is that all service injections from an addon to an app will need to be explicit about their source package. This results in more verbosity, but also greater clarity and opportunity for optimizations.
| }); | ||
| ``` | ||
|
|
||
| There is also some proposals regarding `owner` APIs such as `owner.lookup()` and `owner.factoryFor()` which have also become more explicit. |
| There is also some proposals regarding `owner` APIs such as `owner.lookup()` and `owner.factoryFor()` which have also become more explicit. | ||
|
|
||
| All in all this, **very well written**, RFC is a great chance to learn about possible changes to Ember and the Module Unification structure. | ||
| If you have any concerns or questions feel free to ask in the [RFC issue](https://github.com/emberjs/rfcs/pull/367) and join in on the conversation. |
There was a problem hiding this comment.
join in the conversation by visiting
#st-module-unificationon Ember.js Community Slack.
|
Finished fixing comments by @mixonic. Thanks for the help! |
jayjayjpg
left a comment
There was a problem hiding this comment.
This reads great ✨ Thank you for another awesome writeup this week!
This might be a bit too long? Not sure where to cut it or if I maybe need to add more?
What it does
Related Issue(s)
Sources