Live data from Hacker News

Angular 2 Release Candidate

github.com

71–80 of 139 posts

Re: Angular 2 Release Candidate

#72
post #22
post #5

I realize a lot of companies flocked to Angular and it's used in a lot of places, but from the outside it seems to be fighting on two fronts. 1. Companies currently implementing it not wanting it to change or for there to be a quick and painless migration from 1.x to 2.x. So, less change, more hand-holding. The web changed a lot though, so its change is understandable. 2. Trendsetters and upcoming companies looking f…

It is the million dollar question. If you are building a large product with an expected life of 10+ years, can you trust Angular to still be maintained?

Angular 1.x has been around since 2009 - 7 years - that predates pretty much every framework in use today, before modules (commonJS, let alone ES6) were widely in use, etc. At some point, we had to make a decision to be forward looking towards the future of the language. Support for 1.x won't disappear for some time. Angular 1.5 had a number of big upgrades - a focus will be easing the transition to 2.x over time ( .component(), lifecycle hooks, etc...)

Re: Angular 2 Release Candidate

#73

Half off topic but I want just to add that Webstorm IDE has already quite a good NG2 support. For example you can jump from html to a component function via F12 or auto import unresolved statements. You see VS Code on many NG2 presentations. I think Webstorm helps more getting quicker into NG2. Also Angular-CLI helps a lot. I mention this here because many people seem to struggle with the boilerplate code.

angular/angular2-seed seems to be good, without alot of the opinions in some of the other seeds out there.

I admit I've been a bit nervous about angular-cli calling itself still in alpha - probably a good time to take a look at it

Re: Angular 2 Release Candidate

#74
post #5

I realize a lot of companies flocked to Angular and it's used in a lot of places, but from the outside it seems to be fighting on two fronts. 1. Companies currently implementing it not wanting it to change or for there to be a quick and painless migration from 1.x to 2.x. So, less change, more hand-holding. The web changed a lot though, so its change is understandable. 2. Trendsetters and upcoming companies looking f…

React and Angular are two very different experiences.

Using Angular 2 with TypeScript is almost like using WPF and C# on the desktop - it has that enterprise framework feeling - hierarchical DI everywhere, everything out of the box (DI, routing, events, forms, etc.), classes and OO are the foundation, decorators, even "functional" parts adopts RX from .NET. Using Dart gets you even more stuff working "out of the box" with a functional package manager and build system but it seems like that language might be a dead end so TS is a safer bet. Tooling provided powered by TS is top notch.

React is much more of a JS approach - sure the core library is smaller but in the end you throw in a bunch of libraries to compose your own framework and you're stuck with good old JS decision hell (should I use redux, which routing lib, etc.) - this may be an advantage if you you have a bunch of front end devs that like to sink time in to exploring the ecosystem and chasing the latest fads to keep up to date with what's being supported - but if you need a library to give to your corporate C#/Java devs angular would be my go-to. Coding styles are classic JS mix-and-match pseudo functional + pseudo OO.

Angular 2 feels slightly over-engineered but at the same time I'm more comfortable with this approach - even after using clojure full-time for 2 years - react feels too messy both from a functional/OO and ecosystem standpoint.

Re: Angular 2 Release Candidate

#75
post #11

I'm coming at this from the perspective of someone who has never used Angular 1.x or 2.x. I guess the first thing on my mind is: can I make Angular 2 work just like React does? Is there any way to use it without making/(being allowed to make) separate HTML templates and CSS files? If not, this is a serious disadvantage. Having the view layer scattered across 3X the files (vs React) would make it very hard to follow t…

I read something a while ago that I think really sums the key difference, is that angular and other frameworks inject javascript into html and its awkward. React injects HTML into javascript, and it seems, that way around is a lot more powerful as you have all of javascript to manipulate html rather than having HTML/Templating/Extensions to manipulate Javascript. The two advantages are speed (it's supposed to be fast…

I like that summary but I think it is dishonest. Angular doesn't use HTML, it uses strings with templates that use a superset of HTML with barely well-formed special attribute names.

And React doesn't use HTML either. It uses function calls that can be made to look kinda like XML by using a transpiler.

Neither puts HTML in JS or JS in HTML because neither actually uses HTML. Both build a virtual DOM: React does it explicitly with nested function calls, Angular does it implicitly using flat pseudo-HTML templates as strings.

React is really just a DSL for components that looks kinda like XML but if you consider React Native it is apparent that being able to render those components to HTML (on the server) or to the DOM is just an implementation detail of the renderer (i.e. ReactDOM, React Native, React Windows, WebGL, etc).

Re: Angular 2 Release Candidate

#76

Earlier quoted context omitted.

React with redux allows to write most of the code in a purely functional / no side effects manner, which makes testing code almost a joy.

I've used flux and redux in angular for years. You can write purely functional directives. Angular is much more than just a view library. I've built quite a bit in both react and angular.

That's nice but then you don't have the "angular is the standard and I don't have to choose anything" advantage anymore.

Re: Angular 2 Release Candidate

#77
post #22
post #5

I realize a lot of companies flocked to Angular and it's used in a lot of places, but from the outside it seems to be fighting on two fronts. 1. Companies currently implementing it not wanting it to change or for there to be a quick and painless migration from 1.x to 2.x. So, less change, more hand-holding. The web changed a lot though, so its change is understandable. 2. Trendsetters and upcoming companies looking f…

It is the million dollar question. If you are building a large product with an expected life of 10+ years, can you trust Angular to still be maintained?

I think there is another problem. With framework the size of of angular is hard to maintain. It will be hard for others to take over if needed. With react's smaller parts every part (redux, react-router, etc) can be maintained by a small group of people. If some part isn't maintained anymore you can switch out that part. With angular you might have to rewrite the whole application. That is a risk I would like to avoid.

Re: Angular 2 Release Candidate

#78
post #47

After taking a look at Angular2 I definitv know that my when I need to rewrite my app with something like that: app.AppComponent = ng.core.Component({ }) .Class({ }); from angular.component('name', {}); I will go a totally other route than upgrading. I mean wtf. the JavaScript Part of Angular 2 is horrible. Since I'm on a Scala Server I possible try to look at Scala JS and rewrite something. It's too bad that our "ap…

No problem. People like you have to stick with the old stuff because of this mindset. I mean WTF is bugging you? It's just code you have to write in order to get the thing running. You could also complain about the empty object in the angular1 method.

From a limited perspective, writing code in angular can be a little jarring process. Compared to js in the browser and node, js in ng comes in the way of the thought process.

Re: Angular 2 Release Candidate

#79
post #48

Angular core team member here, happy to answer questions

I hear a lot about angular and that it has gotten quite a competition from react, aurelia and vue. I personally will never use react. but i want to know, in which situations, it would be better to use angular and in which situations it would be better to use aurelia or vue.

Since angular 2 is very new (not even released) it's hard to have any experience from real projects. I have used both angular 1 and react for over a year each and I don't really see any projects where I would choose angular 1 over react except if that is what the team knows.

Re: Angular 2 Release Candidate

#80
post #22
post #5

I realize a lot of companies flocked to Angular and it's used in a lot of places, but from the outside it seems to be fighting on two fronts. 1. Companies currently implementing it not wanting it to change or for there to be a quick and painless migration from 1.x to 2.x. So, less change, more hand-holding. The web changed a lot though, so its change is understandable. 2. Trendsetters and upcoming companies looking f…

It is the million dollar question. If you are building a large product with an expected life of 10+ years, can you trust Angular to still be maintained?

It is easy to expect that during 10 years, at some point this application might get completely rewritten...so not that important either, if we are talking about the framework longevity...
Post reply on HN