Live data from Hacker News

Angular 2 Final Released

angular.io

351–360 of 452 posts

Re: Angular 2 Final Released

#351
post #214
post #48

I evaluated React and Angular 2 several months ago and picked React. Some of the issues I found in Angular 2: The HTML template in Angular 2 is stored in a string. This has several disadvantages: 1. Editors can't do syntax coloring. 2. Editors can't do auto-indenting. 3. Editors can't offer "intellisense" suggestions. 4. Editors can't match tags. You embed variables in this template string like this: ' {{hero.name}}…

You probably missed the best option: Ember.js. It has all the best from other frameworks and it looks the only serious player out there.

But it doesn't have billions of dollars of marketing power behind it to force the kool aid down dev's throats so we are SOL!

Re: Angular 2 Final Released

#352
post #333

Earlier quoted context omitted.

It's very strange to me, any one of the cons from 3-6 will make me avoid a framework. Do you think the pros of the framework outweigh these serious cons?

At the moment? No, I don't think so. To be brutally honest I think the only reason why this is on HN frontpage is because of its name. It's quite telling that they kept the name despite it being a totally different beast with (imho) an entirely different audience. No way they'd get this much support from the webdev community otherwise. However I do see the potential, and one should not forget that this is just the fi…

It kind stinks because they iced the growth of angular 1 when they announced it.

Re: Angular 2 Final Released

#353
post #195

Earlier quoted context omitted.

Cons: 1. Typescript. If your team isn't familiar with it it's not trivial to get everyone on board. The up-front cost can absolutely be worth it in the long run, but there's some friction in the day-to-day work with managing type definition files and looking up esoteric lint-errors from the Typescript compiler. 2. RXJS. Canonical NG2 should use Observables, and rxjs is not a trivial library to learn the ins and outs…

Solid list. Having just used Angular 2 on a side project, I'd also add that I'm not the biggest fan of passing properties between components. @Input and @Output don't seem particular intuitive nor necessary, but maybe I'm just used to React.

I haven't tried ng-2 yet but that does seem like an improvement over ng-1 where AFAIK the best way to do this was to declare some service that directives could depend on.

Re: Angular 2 Final Released

#354
post #75

As someone who uses Angular 1 currently but would pick React for their next project, I'd love to see a list of reasons why I should use Angular 2 over React. If nothing else, Angular just stranded all their developers, while React has a huge head start on mindshare/plugins/tutorials/etc.

For anyone wanting to try react in a side project, scalajs has comprehensive react compatibility and it's just awesome. Only downside is trying to hire Scala frontend devs.

[deleted]

Re: Angular 2 Final Released

#355
post #87

Earlier quoted context omitted.

Obtuse error logging is my biggest problem. A lot of the times you have no idea what's going wrong.

That's a general javascript problem though as soon as you involve any third party library. Something funky going wrong when jQuery's involved? Good luck stepping through that.

This is the reason why I've been separating recent projects into two webpack bundles.

I put all libraries into a common bundle, which I blackbox in the browser debugger. This way only frames from my own code show up in the stack by default, and the debugger won't step into library code.

This also makes stack traces very easy to visually parse, as you can pretty much ignore all the ones ending in "... (common.js)".

Re: Angular 2 Final Released

#356

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…

> I think I still prefere the "feel" of classic websites. Your hacker biases are showing. The sites where 95% of people spend most of their time (Twitter, Facebook, Instagram, etc.) are all built as single page "applications." Users expect rich interactivity from websites these days and are usually not tolerant of UI refreshes. The comparison is not to "desktop" applications but to mobile apps. Users expect a mobile…

One of the key advantages of a single-page application from the User Experience perspective is perceived response time. It takes well under a single frame refresh period (~16ms) to react to some event and either change the page using data you already have, or throw a loading indicator on the screen.

The app may have been slower to load the first time (hopefully not by much) but from then on, they get the perception of instant feedback even if they have to wait a round trip for the backing data sometimes.

SPA frameworks make this sort of interaction very easy to design and reason about as a developer.

Re: Angular 2 Final Released

#358

Earlier quoted context omitted.

Yeah I've been looking at this recently. I like autowire's ability to create typesafe APIs shared across the client and server. Very promising, but not simple to set up... http://www.lihaoyi.com/hands-on-scala-js/#Autowire

You don't need Autowite for that. That's pretty much basic functionality of Scala.js.

Really? From reading that guide I thought that Autowire made it easier by automatically doing the serialisation/deserialisation. How does stock scala.js do that?

Re: Angular 2 Final Released

#359
post #196
post #48

I evaluated React and Angular 2 several months ago and picked React. Some of the issues I found in Angular 2: The HTML template in Angular 2 is stored in a string. This has several disadvantages: 1. Editors can't do syntax coloring. 2. Editors can't do auto-indenting. 3. Editors can't offer "intellisense" suggestions. 4. Editors can't match tags. You embed variables in this template string like this: ' {{hero.name}}…

>The HTML template in Angular 2 is stored in a string. This has several disadvantages This is patently false. Just use "templateUrl" instead of "template". This allows you to specify a file instead. This is the way I always did it in angular 1 as well. I don't really understand why style guides & general practice recommend embedding html in the javascript though. It's horrible.

If you're using TypeScript + templateUrl, you won't get static checking of templates. With React + TypeScript, you will.

Re: Angular 2 Final Released

#360

Earlier quoted context omitted.

I have to agree with you. HTML5, CSS3, and Javascript have matured to the point where they are very powerful and flexible. I don't always see the point of over-complicating things with frameworks.

Yes, they are very powerful and flexible. These frameworks actually payoff and simplify once your project grows beyond a particular size.

> once your project grows beyond

"Premature optimization is the root of all evil."

- Donald Knuth

Post reply on HN