DEV Community

Discussion on: Angular struggles in 2020

Collapse
 
jwp profile image
John Peters

I agree with you, the whole ngmodule system is an absolute disaster. Whoever dreamed that cluster up should have been fired.

Collapse
 
sebbdk profile image
Sebastian Vargr

I can forgive it in AngularJS, different times, we did not even have a standard way to include libraries back then.

Angular2+ using it while requirejs, commonjs and other module loaders being a thing.
That's just senseless.

Thread Thread
 
jwp profile image
John Peters • Edited

And really all the NGModule is for, is the compiler. As if the Angular compiler couldn't hunt down @NGModule, @Component and all other required decorators... It's a typical Angular opinionated way of doing things. All we need is for the compile to create index.js files after compilation. This is all that NPM uses for libraries anyway. To duplicate the majority of the index module system is bad, get rid of it Angular.

Some even argue it's not duplication! Sheesh.

Thread Thread
 
layzee profile image
Lars Gyrup Brink Nielsen

We also had Require.js and CommonJS back in the Angular.js days. That is ancient technology 😃

Thread Thread
 
layzee profile image
Lars Gyrup Brink Nielsen

Svelte's compiler is a lot more advanced in this area.

Thread Thread
 
sebbdk profile image
Sebastian Vargr

Yeah, but they were not as commonly used or known back in 2010. :)

You plugging Svelte made me think:

I've never used Svelte, and I have only looked at the examples.
I figure if state management is separated from the display framework, and I can make a less than 14kb initial payload website with Preact, htm, and Parcel, then why bother looking at new stuff for now?

Why would I learn a new language to do something I can already do perfectly well?

And by extension, how does dividing the development community by adding yet another transpiler add any overall value in terms of not repeating the same CRUD form again and again and again.

Maybe it's a preference thing, but it's the exact same reason I always thought Coffeescript was a waste of time when it came out. :/

I know I am speaking from a place of ignorance here, but what's your take?
What is the unique selling point I am missing here?