I too feel that Polymer is overreaching by providing a module registry 
API... but at least it appears to be completely optional (unlike Angular's 
DI).
I don't mind if Polymer uses this internally, but would prefer it stays 
internal, not be exposed/documented as a public API, and not have other 
API's use it (mixins).


On Sunday, February 22, 2015 at 2:24:12 PM UTC-6, Erik Ringsmuth wrote:
>
> Polymer 0.5 is good because it isn't a framework. It has a limited scope 
> of adding template binding and event mapping to custom elements and the 
> template tag. The addition of a "module registry" is crossing the line from 
> library to framework.
>
> https://github.com/Polymer/polymer/blob/0.8-preview/PRIMER.md#module-registry
>
> This feels like a knee jerk reaction to the people asking for the ability 
> to load JS. It looks like a combination of RequireJS and Angular 1.0 DI 
> which is just a glorified namespace system.
>
> The module registry looks like a very small subset of RequireJS that only 
> implements named modules http://requirejs.org/docs/api.html#modulename 
> and requires loading them beforehand either with HTML imports with inline 
> script tags, or loading a JS file that calls modulate(). Named modules are 
> one of the dangerous/sketchy features of RequireJS and was implemented so 
> the r.js optimization tool could bundle modules into a single file.
>
> When Angular 1.0 was released, there was only RequireJS. Now we are in the 
> era of SystemJS, RequireJS, and soon ES6 modules. There is a huge amount of 
> utility in offering a module system, but why create yet another one? I see 
> this leading to a future where everyone is writing Polymer modules rather 
> than ES6 modules. It's tightly coupling the module system to the framework 
> just like Angular 1.0.
>
> I know I don't really have any say in the matter, but I would leave out 
> the module registry altogether or have it be a separate library and give 
> people the option between that, and some of the other options like these.
>
> System.import
> https://github.com/ModuleLoader/es6-module-loader#getting-started
>
> module tag
> https://github.com/ModuleLoader/es6-module-loader#module-tag
>
> SystemJS
> https://github.com/systemjs/systemjs
>
> RequireJS
> http://requirejs.org/
>
> Browserify, Webpack, etc.
>
> Everything else about Polymer is awesome, but I'm struggling with my 
> feelings about 0.8 solely due to the addition of such a non-standard 
> feature to a library devoted to enhancing web standards.
>

Follow Polymer on Google+: plus.google.com/107187849809354688692
--- 
You received this message because you are subscribed to the Google Groups 
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/8c2647d1-d95e-4715-8bd2-4439be5a73d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to