Live data from Hacker News

Angular 2 Core

docs.google.com

251–260 of 279 posts

Re: Angular 2 Core

#251
post #152

Earlier quoted context omitted.

Ever since reading Angular 2's goals, I put 2 and 2 together, the API was definitely going to have to change massively to accommodate ES6. I'm sure they're using Object.observe it just wasn't mentioned in the presentation.

Object.observe is ES7

Yes but it's in Chrome Stable right now, I'm sure that when ES6 is implemented by vendors next year, they might throw in a few ES7 bits.

Re: Angular 2 Core

#252

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…

> Sometimes I think Angular is mainly popular because it's supported by Google. If any regular developer made these drastic changes in HTML with non valid tags and attributes people would not be happy with that project. This is a pretty interesting statement and I want to give it more thought. I've used Angular on plenty of projects and admittedly, It's felt a bit dirty to go back to spaghetti DOM that we worked for…

It is also a very productive solution to front-end development. Regarding the mix of logic and views there seems to be more and more projects that thinks this is ok. React also mixes the two, maybe even harder than Angular. If you want to create component you have to have a component-view and component-logic as one pair and they will probably always be depending on each other. That said you can say that all single page applications can put a lot of their logic on the server, very clearly separated from the views.

Re: Angular 2 Core

#253
post #176

Earlier quoted context omitted.

This is not even ES6, its some weird abomination (AtScript) on top of ES6. We definitely wont be switching to Angular 2.0. Hello React.

I like how a lot of people see React as a full-on alternative to AngularJS. It's not, React is just for the view (think jQuery), you'll need other components or a lot of manual work to build a full application with React.

The awkward DI/module system, I'm fine with loosing that.

The router I will probably miss, but there are decent router components for react.

Services, factories and providers? Rather big words for some insignificant differences.

The only thing I'll really miss is simple data-binding - but it has too high of a performance cost anyway. Simpler server-side rendering and testing will more than make up for that.

Looking at directives vs react components, it seems like many Angular features are just workarounds for some of its design choices.

What bugs me the most is the cognitive dissonance caused by what I'm reading about the new Angular. Its supposed to be more modular. Yet the thinking shown on these slides is quite the opposite:

* it introduces attribute changes in the markup that seem disharmonious with CSS selector syntax.

* it now also coupled with a new language in order to be used sensibly, which reintroduces annotations - another language-in-language that may lack the proper design care to make it composable and usable (e.g. how do you combine 5 annotations into one? I have no idea, guess you'll have to copy-paste them)

In short, to me it seems like Angular 2.0 is intent on going forward with adding even more complexity while breaking backward compatibility. "More modular" is not what I'm seeing here at all.

Re: Angular 2 Core

#254
post #91

Earlier quoted context omitted.

... because jobs? I'm in agreement with your point, but... if 'the market' wants angular... 'the market' is going to have a hell of a time dealing with a mess in a couple of years when many of the decision makers that mandated angular move on to something else and leave piles of mess behind for someone else to clean up.

I don't think that problem is restricted to Angular - it's one that you see with when developers wrote unmodular code period. I saw it with legacy ExtJS code.

Oh I completely agree it's not an angular thing. It was a Rails thing, is or will be a 'node' thing, etc. It will be a docker thing at some point too. There's a rush to 'new' that appears to everyone to be 'it', people use 'it' for a bit, realize it doesn't solve all problems, then move on to something else. They've done a lot of learning on someone's dime, moved on, but left a mess of code for someone else to 'maintain' for years. The cycle will continue to repeat itself for a long time...

Re: Angular 2 Core

#255
post #36

To everybody trying to make this into a tech fight about Angular vs. React/whatever, I've been repeating this like a mantra and even mentioned it in a talk on javascript once[0]: You can argue about the minor details of the tech stack till you turn green and blue, but Angular wins because it succeeds in the only metric that really counts. jQuery: (for reference) 5,656 commits 7 branches 122 releases 199 contributors…

Actually I think there are a few metrics that may be interesting. And different teams and organisations may put different weight to each metric. Have you seen Sarah Mei's talk about metrics and choosing a technology? She talks about Ruby but it seems to work the same for any technology choice. https://www.youtube.com/watch?v=dE4toi7y1MM

Re: Angular 2 Core

#256

Every large opinionated framework is "overblown" (aka "scary") until you actually take the time to learn it and code a few large non-trivial projects with it. I've learnt more MVC frameworks than you can shake a stick at and Angular is hands down one of the best. Once you're comfortable with it you can fly and code things so quickly and cleanly, and it scales well into complex apps too. Angular is largely designed th…

TBH, I'm both amazed by the power and simplicity of Angular && mad at how difficult and unpredictable is to unit test services that use promises and/or depend on other services.

I think promises are hard to test regardless of framework. As a side note most Angular examples seems to do more functional testing than unit testing since they don't mock many other services.

Re: Angular 2 Core

#257
post #253

Earlier quoted context omitted.

I like how a lot of people see React as a full-on alternative to AngularJS. It's not, React is just for the view (think jQuery), you'll need other components or a lot of manual work to build a full application with React.

The awkward DI/module system, I'm fine with loosing that. The router I will probably miss, but there are decent router components for react. Services, factories and providers? Rather big words for some insignificant differences. The only thing I'll really miss is simple data-binding - but it has too high of a performance cost anyway. Simpler server-side rendering and testing will more than make up for that. Looking a…

Oh, now I get it. The whole reason that AtScript exists is because they just can't give up the desire to have that bizarre Javaesque IoC container.

Re: Angular 2 Core

#258

I tried both EmberJS and Angular. To me it seems Ember is years ahead, the main advantages: - clean model abstraction, which prevents soo much boilerplate - clean templates - components, partials, great re usability

I've built one significant project in Ember, and three in Angular (multi-month projects with a small team; requiring maintenance for the next 3-4 years; Ember 'feels' so much more right to me. I really enjoyed working with it and it reminded me of the desktop frameworks I used to work with. It's not without it's faults, but what is.

But sadly Ember just doesn't seem to be holding it's head up in the ongoing swell of JS frameworks. I think that is a great pity. But time goes on and they'll all be forgotten in a few years.

Re: Angular 2 Core

#259
post #248

Earlier quoted context omitted.

> When I realized it was "passing stuff in" I wanted to shout, I have done that for years! Well, it's the "automatic" part that is important, not just the DI.

So the setter gets called automatically, but now you have to store the object names as strings or in an XML file. How is that better?

Loose coopling?

Re: Angular 2 Core

#260
post #174

Earlier quoted context omitted.

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, Go…

I will challenge that 'strong support by Google'. Angular.js 2.0 is an abandonment of Angular.js.
Post reply on HN