Live data from Hacker News

Angular 2 Core

docs.google.com

211–220 of 279 posts

Re: Angular 2 Core

#211

It's sad to see a post on HN specifically devoted to Angular utterly devolve into framework flame wars. If the title were "Why Angular 2 will be better than React" I could understand, but this is just a sneak preview of features to come. Can we please just choose the tools we prefer and build stuff instead of nursing our insecurities about the choices we've made?

Reason is -- Angular 2 is quite a departure from Angular 1 and a good number of poeple will at that point might choose to envaluate other frameworks.

React is the _other_ popular framework today so people are talking about.

In large the discussion is fairly civil (so far), people are passionate and seem to care about the topic and are discussing it.

Re: Angular 2 Core

#212

I think it's hilarious how javascript frameworks are beginning to resemble java frameworks. This new release is really starting to look like Spring, including annotations. The increasingly complex DI is also looking like Spring.

I that is what I thought too. I believe in a couple of years we'll be hearing jokes about the "fat" frameworks we used and shot ourselves in the foot.

Kind of like how people make fun of Enterprise Java Beans' FactoryFactory... methods.

Re: Angular 2 Core

#213
post #174
post #129

Earlier quoted context omitted.

Honestly, that's why you don't develop a new production system in a framework that's just a few years old. I had a coworker suggest using Angular on our main product that pays our bills. My reply was, it looks great... i'm excited about it, but I think we should use it on less critical systems until it matures. There's too many unknowns. There's no reason every new platform you develop needs to be using literally the…

Too many unknowns is way too broad of a reason when it comes to JS. JS is already the language of unknowns. It really depends on the framework, timing of things, people behind it. Angular is by Google, but also Google is pushing Web Components at the same time, which can integrate with Angular 2, but it challenges it as well. Also with Angular 2's goals being known for a long time, anyone could tell that ES6 would be…

Google does use Angular on many sites in production - the number is somewhere over 120 according to their metrics last I heard. They even use it for static pages - I noticed that the older Google Nexus pages were done in Angular. They prominently tout using Angular for DoubleClick, among other sites. It is also used widely internally.

Angular is also used by a formidable set of companies in production - Microsoft, Google, Apple, VMware, Netflix, MSNBC, Bloomberg, Washington Post, USA Today, US News & World Report, Amazon, Udacity, Cisco, and countless others. I have heard of it being used in the financial sector quite a bit as well. The prevalance of Angular and the strong support by Google is far more telling.

Re: Angular 2 Core

#214
post #191

Earlier quoted context omitted.

I have to agree. Will there be backwards compatibility? If not, upgrading to angular 2 is going to require so much work and we'll probably end up switching frameworks. This could end up like Python 2 & 3.

It is not an upgrade if your old stuffs stop working. Man, 1.0 used to mean something.

What did 1.0 used to mean? I thought that major version upgrades typically mean that backwards-incompatible API changes have been made.

Re: Angular 2 Core

#215
post #32

Earlier quoted context omitted.

I remember when I looked into React that I was basically writing HTML templates into javascript code. Are there ways around doing that now with React? Because I find that to be a pretty big affront to separation of concerns

Having used React for a year now, I have long concluded that React doesn't violate any separation of concerns at all. React implements UI views and controllers. You write views that know how to render themselves, and then you write views that control them; the latter type of view fulfills the role of the classical MVC controller. For example, consider how Cocoa works. It's a classical MVC framework: You have a view c…

>The fact that there is a separation isn't actually useful to anyone. You generally cannot edit the view layout without breaking code, and you can't edit the code without breaking the view: They have to be maintained completely in sync with each other

As someone working on a team that practices a good amount of separation of concerns, this is patently false. This is more dependent on how good your template language is than anything, but this separation helps to assure that we're not introducing new bugs or the like.

The main arguments for React along what you're saying is that people seem to abuse the "view model" concept. It's rarely as necessary as people seem to want to make it (though again, dependent on template language).

Re: Angular 2 Core

#216

It took a lot of time for me to get the hang of AngularJS 1.x and now AngularJS 2 seems very promising but shifting along with the new syntax, programming logic is really painful.. They should provide a path to easily shift programmers thinking from 1.x to 2 (hopefully it is already in their roadmap)

IIRC, in the larger Google Doc cache of their Core documentation for Angular 2.x, they've stated in the manifesto of sorts that, well, that "easy shift" may just not be possible. Primarily when it comes to migrating existing applications.

Although I am looking forward to the Angular 2.x mainly to see what it has in store in terms of performance.. i had had faced performance issues with Angular regularly

Re: Angular 2 Core

#217
post #17

Angular 1 developers should see this as an opportunity to abandon Angular and move on to React. React is by far and away the best the market has to offer right now. From my perspective client-side applications are a solved problem thanks to React.

> From my perspective client-side applications are a solved problem thanks to React.

React is very cool, no doubt, and I use it in my own app, but let's not get ahead of ourselves. React is far from perfect:

- the Virtual DOM is a leaky abstraction: you sometimes need to get your hands on a real DOM node: http://facebook.github.io/react/docs/working-with-the-browse...

- if you're updating the virtual DOM from anywhere other than React's event loop (for example from a setTimeout() or XHR callback), batching doesn't happen properly which can lead to inefficiency. Needing to be aware of what runs inside a React event loop vs. what doesn't can add application complexity. More info: https://groups.google.com/forum/#!topic/reactjs/LkTihnf6Ey8

- writing manual event handlers is a somewhat more manual and less expressive than some of the two-way data binding approaches like Knockout.js or Angular.js.

Re: Angular 2 Core

#218
post #126

I feel that Angular changes too much in HTML to be considered useful for long term projects.The new syntax is also disturbing. My ideal MVC for front end utilizes regular javascript and html tags. At most just add data-ang-click="" something like that instead of "(click)" the latter isn't even valid HTML. Sometimes I think Angular is mainly popular because it's supported by Google. If any regular developer made these…

I've been using Vue.js recently, it's a lot like Angular (inspired by?), without all the crazy nonsense: http://vuejs.org/api/

Is it really comparable? The two-way binding is just a small part of Angular and not something you use that often in most applications.

Re: Angular 2 Core

#219
post #215

Earlier quoted context omitted.

Having used React for a year now, I have long concluded that React doesn't violate any separation of concerns at all. React implements UI views and controllers. You write views that know how to render themselves, and then you write views that control them; the latter type of view fulfills the role of the classical MVC controller. For example, consider how Cocoa works. It's a classical MVC framework: You have a view c…

>The fact that there is a separation isn't actually useful to anyone. You generally cannot edit the view layout without breaking code, and you can't edit the code without breaking the view: They have to be maintained completely in sync with each other As someone working on a team that practices a good amount of separation of concerns, this is patently false. This is more dependent on how good your template language i…

The fact that you're able to do it doesn't mean it's a good idea. On the contrary, I believe it's a bad idea.

It has nothing to do with how good your template language is. It's simply that a controller's main controller (not talking about partials here) has an implicit dependency on the controller, and the controller has a dependency on the template. Unlike, say, data models, the relationship is not unidirectional.

But really, what is this separation for? What does it gain us? We generally separate stuff out into declarations and files because it gains us modularity ("separation of concerns") and reusability. Data models are constantly reused, for example, as are views. But that one template belonging exclusively to the controller isn't reusable. It's separated out for no particular reason other than the fact that, historically, it has been expressed in a different language and must be parsed and "compiled" separately, so it has not been about "concerns" but about implementation details.

React removes that step, and because the template is unequivocally tied to the controller, there is nothing gained by separating them. The point of React is that the "template" is the component. The component's rendering is intimately tied to how its internal state and data model is wired up because the one half wouldn't work without the other, and vice versa.

(As an aside, in a well-designed, pure component, there is little state and the component is mostly template, anyway.)

(As an aside, most template languages don't even let you validate a template's inputs — that is, declaring that it requires specific named inputs and what their types/structure are. No idea why, seems pretty obvious defensive functionality to me. But React does this.)

Re: Angular 2 Core

#220
post #203
post #124

Earlier quoted context omitted.

For example, if an instance of House requires a Door it is not enough to just require('Door'). You still have to do the equivalent of `new Door()` in your House module to get an instance. By doing so within the House module you just tightly coupled House to Door (your House now knows how to create Doors). So what? What is so bad about House and Door being "tightly coupled"? Here's a House constructor that can take an…

I felt the same way about DI until I watched this video: http://www.youtube.com/watch?v=_OGGsf1ZXMs

Great video!
Post reply on HN