
Angular 2 Release Candidate - clessg
https://github.com/angular/angular/blob/master/CHANGELOG.md
======
jalami
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 for something new fresh and
solid: Framework competition from React and the like. Maybe that second group
is a lot louder in certain circles, startup-y hackernews being one, but it
sounds like Angular will eventually reside in the shadow of React if it stays
that way for long. Google pulling the plug on things fairly commonly doesn't
help with the uncertainty.

Just seems like anytime Angular comes up in conversation, React isn't far
behind. This post is no exception I guess, I just can't see Google maintaining
Angular if it becomes Dojo in the eyes of developers.

~~~
craigvn
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?

~~~
rk06
short answer: "No".

Explanation: In js land, Long term Support means "6 months". so your best bet
is to have a framework which makes migrations easy and does not introduce
changes.

With angular being backed by google, there is no guarantee if angular will be
maintained 4 years down the line.

PS: feel free to keep your million dollar.

~~~
huskyr
> With angular being backed by google, there is

> no guarantee if angular will be maintained 4 years

> down the line.

It's interesting to see that the reason why many companies choose Angular
(Google backs it) now seems one of it's biggest disadvantages.

------
robwormald
Lots more work to do here, but we're pretty happy with how the core looks! For
those worried about size (which has absolutely been a fair concern over the
alpha/beta process) - here's a "hello world" built with Rollup and our offline
template precompilation. Clocks in at 200kb min/47k gzipped, with a bit more
room from optimization over the next couple of weeks... [https://ng2-compiler-
test2.firebaseapp.com/](https://ng2-compiler-test2.firebaseapp.com/)

~~~
viraptor
That seems a lot for:

    
    
        <html>
        <body>
        Hello world<br>
        <blink>hello child</blink>
    

(yes, I know it's not the same under the covers - take it as a comment on the
ecosystem, not on the implementation (although it can be a comment on dead
code detection too))

~~~
jwarren
I see a lot of complaints about toy app size/complexity. There's definitely a
judgement call to makes about app complexity when someone starts a project
with a framework. I inevitably find that development in the middle/end of the
project is substantially easier when using a good setup like React/Redux/etc
or Angular, and changes are easier to make, whereas vanilla development is
(relatively) substantially easier at the beginning of a project.

Yeah, Hello World might be expensive in size, but when you've got a
substantially complex and fast app for not much more size, you start to feel
the real benefits.

~~~
glass-animal
But what is Angular doing with that 200k (which is minified)? It doesn't seem
like I should need to pull in the whole of Angular to make a component with a
template.

Granted, React is pretty big too, but other frameworks, like Riot.js, have
shown that they can be much smaller. Then there's Polymer which gets smaller
as web components roll out.

In the competition again native apps, web apps have to load really, really
fast. Their ability to run without installation is an advantage that needs to
be maximized, an on potentially slow and high-latency mobile networks.

------
ErikAugust
"Having to rewrite for our Angular 1 app for Angular 2".

Honestly, there is so little continuity that you have the option of just
switching to React.

Or perhaps, just maintaining your Angular 1 app - and then assuming the 1.x
fork will be carried on for a long time.

~~~
zxcvcxz
> just switching to React.

That's what I did :)

I spent a whole bunch of time learning Angular1, was in a coma for close to a
year after a bad accident, wake up and find my projects are all outdated and I
have to basically learn a new framework. Decided if I was going to learn a new
framework it was going to be something not made by google. React was simple to
learn, unlike Angular. Everything you do in angular requires you to learn the
"angular way", once you can create components and understand flux react is
fairly straight forward and doesn't require you to re-learn web development.

~~~
ErikAugust
Awesome that you bounced back from a coma!

Yes - you also make a great point about React, and switching to React.

We are talking about _JavaScript_ frameworks, the keyword being JavaScript.

It is not as much of a sunk cost to switch to React because it is very
_JavaScript_ compared to Angular. Given that your team already knows
JavaScript (probably, maybe, hehe) - they can pick up React fast.

And now looking at Angular 2, where people are suggesting writing Dart or
TypeScript over ES6 - this seems like yet another unique Angular learning
curve.

------
merb
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 "application"
fit's the SPA scheme so good, but these frameworks changes so much over the
years that it's nearly not maintainable will a small group.

~~~
SeriousM
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.

~~~
paganel
> I mean WTF is bugging you?

Not the OP, but having to write four lines of code instead of one does not
look that good. Less is more. Code bloat should be called out.

~~~
Bahamut
The code blocks written don't tell the whole story - the analog to the .Class
is the controller in Angular 1, which one would have to specify a controller
name or define it right in the component, therefore giving equivalent lines
for the most part.

It sounds like the person is awfully resistant to TypeScript as well, as the
syntax for a component in TS is just

    
    
        @Component({
        })
        class Foo {
        }

~~~
merb
Actually I'm not resistant to TypeScript. I just don't want it. Reasons are:
\- Google changes their mind so freaking often that it's simple not a good
idea to follow them there. (Just look at GWT, good project however the
direction is more and more confusing especially the communication is really
really akward. \- Why changing to Angular 2 and TypeScript when there are way
many other frameworks that are either in JavaScript or just a little bit
better suited for some things? \- Why can't I upgrade in a slow path with
small deprecations? (i.e. emberjs, react)

That are the most reasonable. Actually there are some others which has more
something todo with our internal things and that ScalaJS < = > Scala is so
good at the current stage.

------
robwormald
Angular core team member here, happy to answer questions

~~~
rk06
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.

~~~
robwormald
This really comes down to your team - try them out and see what feels good for
you. React is a great library, and as an angular1 dev before joining the core
team, I learned a TON from playing with React and especially Dan Abramov and
Redux - most of the same patterns are immediately portable to angular2.

------
notsotrue
I'm looking forward to trying this out. Having written Ember, Angular, and
React apps now, I feel like they are all getting closer, but a lot of rough
edges still exist.

Ember: interesting framework, but all too often, you would hear a team mate
say "wait, why is that working, it shouldn't be?" Mixed with equal parts
"logically, that SHOULD work, what am I missing?"

React: I love the component focus, and redux is pretty slick. However, the
insistence on using JavaScript in lieu of helpful abstractions that clean up
the code for easier maintainability, is frustrating. The whole point of JSX is
syntactical sugar, but the team went with half measures. You also end up with
a lot more plumbing code than the other two. Sure, I can reuse some of these
components, but in truth, most of your components will be single use.

Angular 1: by far the easiest and most intuitive. Enough magic to make setup
and a basic app easy, but not so much magic that you can't figure out why
something is working. However, the more complex an app, the less Angular 1
serves. And you really need to use directives as a component, and follow a
more react pattern, or you're going to have a bad time. Also, the dependency
injection is a nice thought for simple directives, but when you're done,
you'll very likely have so many dependencies being injected that unit testing
becomes burdensome. And if it's burdensome, it won't be done as much as
needed.

All that being said, if your app is primarily collecting data through forms,
you can't beat angular. If it's highly dynamic, and you want a more native
feel to your app, react is the clear winner. Ember is a neat, but I won't be
using it again.

Angular 2 doesn't fix all of my complaints, but it's getting closer.

~~~
spriggan3
> However, the more complex an app, the less Angular 1 serves.

That's not really true.

The problem is that all three frameworks are supposed* to require the same
discipline when it comes to managing state, but only React forces that
discipline onto the developer.

I'm not saying React is better, but learning from React is important to be
able to write maintainable applications in any framework. You don't want to
have 30 services, each services managing there own little state in AngularJS
for instance. Unfortunately that's usually what happens when an app grows with
time.

Angular2 does seem to get rid of the dirty checking, allowing better
performances. It also has a good router. But does it really bring something
new in terms of view layer and state management, considering the cost ?

I like Angular1, it's one js file you drop in an HTML page, no need for
nodejs, NPM, a third party language and what not. And it's mature. It's
absolutely unfortunate that Angular2 basically forces developers to use
Typescript. That's a huge mistake IMHO.

edited _

~~~
notsotrue
I'm curious, what would you consider a complex app?

------
maxharris
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 the code in a large project.

Also, are there any real advantages over React that would be big enough for
someone to consider pushing for a switch? If so, what are they?

~~~
keithnz
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 faster) and its closer to
the web component standard than react, so if/when web components become
mainstream it could be a lot easier migrating from angular2. However, both of
those wouldn't be my prime reasons for choosing a framework though.

~~~
Scarbutt
So Java Servlets was the right approach all this time?

~~~
jhall1468
Pretty sure PHP predated Servlets (if not by much).

~~~
mateuszf
Which is predated by CGI scripts working conceptually in the same way.

------
thomas-b
I'm happy to see Angular2 getting closer to a release, and as many other
companies we are in the case of what decision after Angular1.

One thing I think will be a great push for Angular2 is Ionic2 which alone is
reason enough but to be honest I prefer the `Aurelia way` when it comes to
writing web apps which sounds more natural, Sad to see Aurelia hype haven't
took much so far (understandable that it's getting harder to get people on
board a new `revolutionary` JS framework).

~~~
codecamper
I too like the look of aurelia. However, I really like the auto import
management, refactoring, syntax highlighting. I use Webstorm & didn't see any
blog posts or anything about how to set up Webstorm with Aurelia. So I'll go
on learning Angular 2 for now.

------
bdcravens
Saw references to rc0 in the angular2-seed earlier - wasn't too sure what to
make of that, as I still saw the beta in the main repo.

"This is the first release candidate that contains repackaging of Angular into
individual packages one per each feature area. ... This changes how Angular is
installed via npm and how you import the code"

This seems like a pretty big change to include as part of the first RC??

------
oolongCat
Ask HN: Why would I spend time upgrading my Angular1 code to Angular2 when I
can migrate to React Or Vue.js.

I am honestly intrigued as to what Angular2 offers, that other JS frameworks
wont?

~~~
dudus
They are competitors. People will make arguments to either side.

In my point of view react is easier to use while angular is better for
testing.

My personal choice is angular. I'm really excited for v2. But both are super
powerful.

~~~
Sacho
Perhaps the question could be rephrased as: I am happy with how React handles
my view layer. What more does angular bring that would make me want to switch,
from React + whatever else I'm using as libraries?

I don't really think angular and React are direct competitors.

------
samuell
When I read up about Angular 2 a year ago or so, based on my very shallow
understanding it seemed like the perfect combination of the automagics of
Angular 1, and the light-weightedness of React. But what do you JS folks think
about this?

~~~
romankolpak
What gave you the impression of light-weightedness though? My understanding
was that Angular 2 is aiming at being a fully featured (and thus heavy)
framework.

------
spriggan3
Isn't it ironic that, as we are moving away from fat servers, we are now
writing even fatter clients ( which still need a server since one wants in
many case to be able to render pages server side and one has to serve static
assets anyway ) .

So what is the concrete difference between an API + a node-js server to serve
assets and render templates server-side (so with a lot of business logic) + an
angular2 client written in typescript , all this VS something like Rich Faces
or Prime Faces in a servlet container ? We just rebuild the exact same thing
that is hated by most "modern developers", with worse tooling on top of it.
Both solutions need a third party language that is not Javascript, both
solutions need a compilation step, and command line tools(or an IDE in the
case of Java).

Some will say "Well, now the client and server are independent, and if the
server changes, one can keep the fat client". But in practice, which side gets
rewritten ? the server or the client with the "framework du jour" ?

~~~
JustSomeNobody
This was designed for the enterprise C#/Java developers. Anything this
monstrous can only ever be fully appreciated by enterprise devs.

------
qaq
Angular 2 is a great option especially for people who like TypeScript. Hope
release will be ready soon.

------
MrDosu
I just love how the same people that called me the devil for using WPF back
when .NET 3 came out are now calling me about angular with 'have you heard
about this new and exciting paradigm?'...

------
Wintamute
Really like the new npm multi-module architecture under the @angular
namespace. Thumbs up.

------
ejsmith
Aurelia ([http://aurelia.io](http://aurelia.io)) is the ONLY framework that I
have seen where you DON'T see the framework when you look through the code.
You see YOUR app and YOUR logic. To me this is incredibly important for the
longevity and simplicity of your code base. Please people, do yourselves a
favor and checkout Aurelia.

------
doczoidberg
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.

~~~
robwormald
WebStorm has been pretty amazing in keeping up with us, a fair number of our
team use it. Even more exciting is upcoming tooling integrations we'll get
from Typescript - there's a cool GIF in this issue tracking the work
[https://github.com/Microsoft/TypeScript/issues/6508](https://github.com/Microsoft/TypeScript/issues/6508)

------
rk06
Congrats on the RC.

