Hacker News new | ask | show | jobs
by camus2 3382 days ago
Should your UI framework ship with an IoC container? you wouldn't expect your ORM to do that, this is a separate concern. If your UI framework is to complicated to be used without the IoC container then there is an issue with it. Even Hibernate or Doctrine don't make using an IoC container mandatory.

So when you eliminate the IoC container, what is left? the router? it's OK but not fantastic. The databinding? again nothing special about it.

The directives and components? these 2 things are really why we are all using JS frameworks today (bonus for test-ability).

So the latter are good yes, but they are no better than React or Vue system. The framework that will succeed now is the one with the largest ecosystem of plugins and collection of components.

In that sense Angular4 is no more entreprisey than the competition.

2 comments

>Should your UI framework ship with an IoC container?

Angular 2 is not a UI framework, it's a fronted application framework - it has IoC, HTTP stack, Router, internationalization, etc.

If C#/Java like tooling and design patterns sound appealing to you (eg. enterprise roots) then Angular 2 is going to feel better than React and others, if you're more of FP guy and you prefer to cobble together for flexibility then React is a better choice - this is from my experience.

And by far the best option I've tried for HTML front end was Angular 2 Dart - Dart default tooling beats NPM/WebPack/whatever ecosystem by a mile.

> Angular 2 is not a UI framework, it's a fronted application framework

> it's a fronted application framework

it is absolutely meaningless.

Angular 2 is a UI framework, calling by any other name won't change that fact. The fact that is has 3rd party dependencies wont change that fact either. You use Angular because you want to use it to design user interfaces in the browser and that's it, that what a browser is for, to display content. internationalization, http calls or routing are separate concerns.

> If C#/Java like tooling and design patterns sound appealing to you (eg. enterprise roots) then Angular 2 is going to feel better than React and others, if you're more of FP guy and you prefer to cobble together for flexibility then React is a better choice - this is from my experience.

Which is bullshit of course. React is closer to what you can find with Java FX or XAML than Angular actually is with its string templates. And neither desktop solutions mandate IoC containers, nor forces you to use their own IoC container, so my point absolutely stands even more. Neither mandate a specific http client, or an internationalization solution either. So stop pretending that Angular 2 is more "enterpisey" than the rest. But I'll let the developer community speak. The lack of popularity of Angular 2 is a sign that it is not going to drive most enterprise front-end.

>internationalization, http calls or routing are separate concerns.

If you view Angular as a UI framework then they are separate, but when you're developing client side applications they are not separate at all - and since Angular is an application framework it ships with those.

>XAML than Angular actually is with its string templates.

String templates ? XAML comparable to React ? Have you actually written a WPF app or worked in an enterprise framework ?

Sounds like you want to argue for sake of arguing or don't understand what you're talking about.

>Should your UI framework ship with an IoC container? you wouldn't expect your ORM to do that, this is a separate concern.

I'd rather compare Angular to Spring, which is also built around IoC and has it's own IoC container.

> I'd rather compare Angular to Spring, which is also built around IoC and has it's own IoC container.

Angular isn't like Spring, it's like JavaFX or SWT, or WFP. Angular isn't a web-server framework. The fact that it tries to come with its own IoC container is a mistake, and a legacy of Angular 1 mindset.