Hacker News new | ask | show | jobs
by robwormald 3369 days ago
Angular core team here, we're pretty excited about this release.

Main change, as noted, is the new View Engine. The design doc[0] is worth a read if you're interested in front-end at all.

Happy to answer any questions!

[0] https://docs.google.com/document/d/195L4WaDSoI_kkW094LlShH6g...

7 comments

1) I'm still new to this, but why would someone not use Angular Universal/why is it not default? I have only read positives, but am sure there must be a reason.

2) Why do we need Angular Material 2, when Google's official Material Components Web project is meant to be used with all kinds of frameworks and even has framework integration examples with Angular2: https://github.com/material-components/material-components-w...

3) Should I follow Quickstart or CLI Quickstart in the docs to get started? I have heard that the CLI is recommended nowadays, but the Angular 4.0 release blog says the CLI isn't even stable.

1) the core of Angular Universal "graduated" into @angular/platform-server with 4.0 - previously it was a more experimental project. We're officially supporting a "renderToString()" API that can be used however you like.

So really, it's brand new, and we're excited to see what the community does with it.

Philosophically, pre-rendering every SPA server side isn't a silver bullet. For a ton of cases it makes a lot of sense, but we want to avoid the impression that we're positioning SSR as a replacement for making your app fast.

2) The expectation of the Material Components Web project is that everything be "wrapped" for the specific framework. Angular Material is native Angular, and we have a team dedicated to that. Polymer has a material suite as well, and most of those components can work in Angular apps too. Components for everyone!

2a) you're asking a Googler that question. We have like, 11 messaging apps. I don't know what to tell you.

3) CLI went stable today, with its 1.0 release. We'll be moving the docs over to use the CLI everywhere soon - personally, i'd use the CLI to generate a new project and then follow along the tutorials.

Thank you, that was really helpful!
I have a question.

Who thought it was a good idea to make Angular 2 incompatible with Angular 1?

You had it, and you blew it. Most people aren't going to use any version of Angular, now, and have switched to React and Vue.

"Who thought it was a good idea to make Angular 2 incompatible with Angular 1?"

This is so much discussed that I am not going to answer that. Google it.

But according to the latest StackOverflow survey [1] Angular is still bigger than you think: AngularJS 44.3%, React 19.5%

[1] http://stackoverflow.com/insights/survey/2017/

Most companies don't switch quickly.

We have a huge Angular 1.x app, but after hiring some new developers for our team we found the pool of React devs was huge compared to Angular devs. So much developer goodwill and mindshare has been lost.

After carefully evaluating the technical aspects of Angular and React and externalities like the above, we decided to start building new software with React.

Angular won't go away overnight, it will see a very steady and slow attrition, with developers themselves leading the way.

I also skipped Angular 2 and moved to VueJS. Never been happier.

But I was responding to "You had it, and you blew it. Most people aren't going to use any version of Angular, now, and have switched to React and Vue."

When you look at the stats and look at other places online there are still very much people liking and using Angular. So it's not going away soon.

Also take a look at Google trends: https://trends.google.com/trends/explore?q=angular,react Both Angular and React are growing at an equal pace.

So the claim that developing new versions of Angular is a waste of time is nonsense.

Better trend comparison (the other one the first example query for react was "Youtubers react")

https://trends.google.com/trends/explore?q=%2Fm%2F0j45p7w,%2...

These fad shifts are inherent because there is little point in competing with 0 years experience in an established tech if the market will allow breaking changes.

Angular is actually better off with the break as new graduates may use it to replace vue as the new fad once vue has replaced react.

Similar to what happened with backbone when angular gained traction.
Because Angular was the only real choice for awhile. That's like saying PHP is still bigger than you think because half the web runs on PHP but that is old legacy shit. Almost othing new and serious is using it.
What do you consider "serious"? Plenty of large applications are being built right now in PHP 7.
"Serious" means it was started by a person who regularly blogs or tweets about how to choose a technology.
There was Ember.
Discourse uses Ember. It's pretty successful. http://www.discourse.org/
Ember has bad performance on Android[0]. The Discourse team had to write their own Virtual DOM renderer to work around this[1].

[0] https://discuss.emberjs.com/t/why-is-ember-3x-5x-slower-on-a...

[1]https://eviltrout.com/2016/02/25/fixing-android-performance....

Emphasis on the past tense -- "was" :)
What does this actually mean?
That's legacy projects I bet. Of course, big projects have to stay with a technology for at least 2 years, can't keep rewriting things every time a new framework comes out. In this case, they unfortunately picked a framework that was discontinued.

I talked to many devs who didn't accept a job because it was Angular instead of React.

That is purely anecdotal. There are a lot of companies and devs outside your circles that don't jump on the new shiny, and will continue to use Angular going forward.
No answer is better than arrogant answer.
I didn't want to sound arrogant. But when Angular 2 was released the whole web broke down in anger and had questions like this. So there are a lot of good answers on StackOverflow and other sites.

So my answer to the question was something like: "You can find a lot of info by Googling it".

But I am not able to change my comment anymore.

It was a rhetorical question...
If you are not going to answer it, don't add noise to the discussion.
Angular 2 is a different framework, plain and simple. You can continue to use AngularJS 1.x if you were on that framework.

I understand the frustration of someone who has used AngularJS 1.x. There is not really a straightforward and low risk path to upgrading a production app.

But that is like saying there is not really a straightforward risk to switching from AngularJS 1.x to React. They're different frameworks. AngularJS is different from Angular.

In my opinion the Angular team has created something really special with this new framework. I think it falls into a category of its own, very difficult to compare it to something like Vue.

> Angular 2 is a different framework, plain and simple.

I wonder if, strategically, it would have been a better idea to give it a new name rather than a subsequent version number?

I always figured it was to give the illusion of stability and continuity (ironically). Like "Angular has been out since 2010, before React and Ember" especially since a common criticism of Google is that they frequently abandon their projects.
This is ridiculous.

Give it another name, then.

You can't get people to adopt your framework, stop developing it leaving millions of projects in shit, and then expect people to do it all over again.

I'm glad that Google paid this strategic error dearly, having a huge percentage of people switching to React. Perhaps next time they'll think about it more deeply.

> Angular 2 is a different framework, plain and simple.

Yes. Retaining the Angular name is just a way to slightly disguise that they've dropped a framework altogether and left its user high and dry.

Good to read this comment because I definitely feel this way too. Angular 2 just made things weird and confusing for everyone, experts and newbies.

Even though there are some things common but the differences are just too many. It would have been better if it was just release under a different banner altogether.

We're using the universal fork of the CLI with the recent AOT (client side) patch for a current project. Will my upgrade path be straightforward? The project is a simple content based website which consumes a ruby API that we had built earlier. We use universal for setting up meta tags, crawlability, etc.
https://github.com/devCrossNet/universal-cli/issues/101#issu... looks like the fork is going to be deprecated soon. I find the lack of documentation on universal a little bit frustrating, the only documentation I found is a blog post https://www.softwarearchitekt.at/post/2017/03/07/server-side... but the whole process is built on ng eject which removes some cli automations.
Can we expect Angular 4 best practices before 2020?
By their plan, in 2020 it will be Angular 10.
The next release is Angular 8. As every other major release is not backwards compatible, it is advised to wait until Angular 16 in 2024. /s
And we will at least have angular 4 best practices consolidated? Because ng2 is in the past now and don't have.
is it really smaller and faster. i got the impression the payload size reduction might come at a cost to render performance?
That's discussed in the doc (and there's some metrics). Update speed takes a (minimal) performance hit, in exchange for code size reductions.

We (and our colleagues at Google working on the web in general) find that the largest impact on performance comes from simply shipping less code.

Edit: correction: turns out our tests show we didn't take a perf hit on updates at all, and in fact ever-so-slightly improved. So win win :D

Is it me or has the Angular1 site received an update? Is that platform still supported?
It's still supported.
"If you're interested in front-end at all"

Am I being dense? Shouldn't that be everyone reading this thread?