Live data from Hacker News

Angular 2 Final Released

angular.io

421–430 of 452 posts

Re: Angular 2 Final Released

#421
post #77

I use Angular 2 in production since November 19, 2015 (alpha.46). Currently I've built 3 web apps (40, 60 and 20 components each), 3 mobile apps (with Ionic 2) and my employer have plans for more apps. Breaking changes during alpha stage were expected, so I didn't have issues with it. Most positive things I want to highlight: 1. Components are encapsulated and truly reusable (and without dependencies hell). 2. You do…

Any chance you can do a quick cons review too? Specifically comparing to the weakness of Angular 1 like bloated complexities, issue with custom directives or scope life-cycle.

1) Build (compilation) system is complicated enough and all of these providers/declarations are not intuitive;

2) amount of boilerplate code for unit-tests (not e2e - everything is fine there);

3) some things were removed by performance reasons - I think would be smarter just rename them with prefix "slow". Sometimes it's more important to have some functionality than don't have it, even if your app is blazing fast.

Re: Angular 2 Final Released

#422

Earlier quoted context omitted.

I am really surprised to know that there are people that use an alpha version in production. I would never ever do that even if it was allowed, and obviously it is not allowed in my company.

alpha guys do that.

Oh, so that's what all these "alpha man" stuff on the Internet is about: folks who are manly enough to use alpha versions in production. Makes sense now.

People who only take it up at the beta stage are obviously inferior, and hence denigrated as "beta men". And then there's the detestable wimps who go only for 'stable' versions, I suppose they must be "omega men", not even worthy of a mention in discussions.

Glad to know Real Programmers[1] still exist amongst us.

[1] https://www.cs.utah.edu/~elb/folklore/mel.html

Re: Angular 2 Final Released

#423

As a developer who didn't care for Angular 1.x and strongly argued in favor of a simple approach for years (Backbone, etc). I've been using Angular 2 in a major enterprise project since RC1. Even with some of the headaches between RC releases; all of the reasoning behind those changes is technically sound. It's easy to write components and wire everything, and even small things like async validators are fluid and eas…

One thing that is hugely helpful that many developers don't do is read the tests for the library they use - in particular with Angular, reading the tests in the Angular codebase actually assist greatly in how to use a feature.

Re: Angular 2 Final Released

#424

Serious question : Why are SPA frameworks so popular these days? When someone asks "What should I use for web development?", It's now all about React/Angular/Ember/etc. But when I look at how are built the sites I like and visit frequently, I'd say 95% of them are not SPA, they are classic sites where the server generate each page (sometimes with one or two Ajax requests)! The Single Page pattern is great for desktop…

There's honestly no need for React/Angular/etc to necessarily power a SPA, you can just use it to build smaller components. I initially got started with Angular to power a reusable video "widget" component on a WordPress site - a far cry from an SPA! It's also a great route to getting your feet wet without committing wholesale to a technology.

+1. I've made nine react apps since last year, only the two last are SPA (because I wanted to try the golang/react combo).

React is super good to take control of a small piece of the page and build a complexe widget on it (can't speak about angular, I only used it twice without getting very far).

Re: Angular 2 Final Released

#425
post #376

I heard that a particular company, Rangle, worked on AngularJS2 and from what I've heard of them they're an MVP/dev-agency so it isn't surprising to see some of the complaints here about broken backwards compatibility and bad documentation around testing. Seems few people know how to steward a free/open source software project that has lasted over 5 yrs.

Rangle only created an Angular 2 successor to Batarang. They had nothing to do with core Angular 2 development.

Angular 2 in beta/rc was in many ways rapid iteration on top of experimentation to get the core APIs & developer experience right. They have finally reached a stability point where they feel completely comfortable with the framework they have ended up with as a result, thus the formal release of 2.0.

If you've actually paid attention to the development cycle of Angular 2, it was very fast - it turns out that Google moves much faster than most shops, which was seen in full display during alpha/beta/rc. However, that goes with the territory there, and the versioning did not lie. It is now following semver though, so we shouldn't be hearing of these problems anymore.

Re: Angular 2 Final Released

#426

Earlier quoted context omitted.

A service based one on top of a component based one has inherent data flow problems. ng-bootstrap, following in the footsteps of UI Bootstrap, takes a promise-based approach because we believe this is clearly the best API pattern out there for dealing with modals from experience working with users' needs. An evented model is extremely cumbersome/awkward, and any component-based model must go that route to signal when…

How does such a service have inherent data flow problems? Especially since the NgbModal service IS built on a component that implements pretty much the same thing as react-bootstrap's Modal.

It uses components, it is not built on a component - the goal is for it to be able to manage multiple modals and some situations that are impossible to do right with component-based modals such as reusing a backdrop (I argue that multiple modals is a bad pattern, but it is a high demand user feature). It also allows flexibility into hooking into the lifecycle in the future with knowing when the modal renders, starts or finishes animation, and similarly for when the modal closes.

With component-based modals, you end up with bad APIs for these use cases, as well as less control over your state.

Re: Angular 2 Final Released

#427
post #382

Earlier quoted context omitted.

Polymer also has a lot of negatives - it still only publishes on bower for example, and the whole vulcanizing situation is sort of bleh. It also uses HTML imports for its components, which is unnatural and sort of munges concerns with the whole ES module import system - this includes importing HTML files for more traditional things such as XHR. To me, all these things put Polymer far behind the curve as something I'm…

Whats wrong with vulcanizing? The product is the same you would get with grunt/gulp and what people were doing for years building their js files. Is bower less reliable than npm? (I do more python work than JS)

bower is pretty much abandoned in favor of npm - in the past 1 - 1 1/2 years, the frontend ecosystem has coalesced around npm as the dependency management tool of choice.

Re: Angular 2 Final Released

#428

Earlier quoted context omitted.

Google does not index my ng2 site without prerendering. There will be always limits for search engines on interpreting js.

That's interesting. I previously researched this with regard to React apps, and the tenor was that server-side rendering was no longer required in order to get indexed by Google. Google itself has this to say: https://webmasters.googleblog.com/2014/05/understanding-web-... Have you tried to figure out the cause using Search Console?

I have also encountered an Angular 1 app in the wild that was indexed by Google, but there are limits to the ability of their crawler - it apparently didn't follow through to other pages.

Re: Angular 2 Final Released

#429

Earlier quoted context omitted.

Why JS declarative manipulation is a much better experience than using templates?

Because you have the full power of JS available to do whatever you want, however you want, to generate HTML. With a templating engine, you only have whatever the templating engine provides.

React would let you use JS-powered templates. Angular would let your use ANY (static html, JS generated, or dynamic/server generated), because its pluggable.

For me, the power offered by Razor(cshtml) is too much to abondon.

Re: Angular 2 Final Released

#430

Earlier quoted context omitted.

In the page you linked the template is stored in an external html file in which case you get syntax checking for html but not the embedded expressions.

I only do backend node.js so I don't know much about the frontend stuff, but when I look at https://blog.jetbrains.com/webstorm/2016/04/angular-2-workfl... it seems to me they in fact do support the embedded expressions?

Yep - thanks, this is a much better example than mine.
Post reply on HN