Live data from Hacker News

Angular 2.0

blog.angularjs.org

101–110 of 169 posts

Re: Angular 2.0

#101
post #65

Earlier quoted context omitted.

This is true. AngularJS is much better than what we had before, it is kind of large and monolithic. The cycle probably goes thusly: Large monolithic framework comes and shows everyone a new way of doing things (Angular/Django). People think it is too large and monolithic, so make microframeworks (Flask/Whatever comes after Angular). The next step will be a kind of happy medium.

I never understood how JQuery and JS were just dumped the past 3-4 years in favor of all thse complex frameworks like AngularJS, Ember, etc... is there something these frameworks can do that JQuery can't? Can they make fancy single page apps and JQuery can't? I need to be enlightened. Or is it simply ppl need to exercise their mental creativity?

Among other things that Angular, Ember & others bring, what you should understand here is that JQuery does not help you to structure your code. Those frameworks offer the type of structure that makes it easier to reason about how an app should be built, and it helps a lot when you're working in a team.

JQuery and JS were certainly not dumped, it is just that people writing single page apps moved on and are now using tools that help them.

Re: Angular 2.0

#102
post #65

Earlier quoted context omitted.

This is true. AngularJS is much better than what we had before, it is kind of large and monolithic. The cycle probably goes thusly: Large monolithic framework comes and shows everyone a new way of doing things (Angular/Django). People think it is too large and monolithic, so make microframeworks (Flask/Whatever comes after Angular). The next step will be a kind of happy medium.

I never understood how JQuery and JS were just dumped the past 3-4 years in favor of all thse complex frameworks like AngularJS, Ember, etc... is there something these frameworks can do that JQuery can't? Can they make fancy single page apps and JQuery can't? I need to be enlightened. Or is it simply ppl need to exercise their mental creativity?

Personally, the two big draws to me of Angular were "free" (as in, I don't have to write much code) DOMdata binding, and the explicit goal of testability.

As a learning exercise, I wrote a page using just jquery, rewrote it in backbone, and then rewrote it in angular. Backbone helped me separate concerns; Angular helped me do that while writing _way_ less code, since I didn't have to manage keeping the DOM and the JS model in sync.

Re: Angular 2.0

#103
post #65

Earlier quoted context omitted.

This is true. AngularJS is much better than what we had before, it is kind of large and monolithic. The cycle probably goes thusly: Large monolithic framework comes and shows everyone a new way of doing things (Angular/Django). People think it is too large and monolithic, so make microframeworks (Flask/Whatever comes after Angular). The next step will be a kind of happy medium.

I never understood how JQuery and JS were just dumped the past 3-4 years in favor of all thse complex frameworks like AngularJS, Ember, etc... is there something these frameworks can do that JQuery can't? Can they make fancy single page apps and JQuery can't? I need to be enlightened. Or is it simply ppl need to exercise their mental creativity?

"I never understood how JQuery and JS were just dumped the past 3-4 years in favor of all thse complex frameworks like AngularJS, Ember, etc..."

Well, you can't have Angular without JS so we'll focus on the point of jQuery here.

jQuery does a few things really well – so well that Angular itself uses jQuery (or jqLite by default). angular.element(selector) returns a jQuery object.

Angular also does a few things well. Code reusability and testability are much easier to achieve with Angular, in my opinion. Features like data-binding also help to reduce boilerplate code.

Re: Angular 2.0

#104
post #102

Earlier quoted context omitted.

I never understood how JQuery and JS were just dumped the past 3-4 years in favor of all thse complex frameworks like AngularJS, Ember, etc... is there something these frameworks can do that JQuery can't? Can they make fancy single page apps and JQuery can't? I need to be enlightened. Or is it simply ppl need to exercise their mental creativity?

Personally, the two big draws to me of Angular were "free" (as in, I don't have to write much code) DOM data binding, and the explicit goal of testability. As a learning exercise, I wrote a page using just jquery, rewrote it in backbone, and then rewrote it in angular. Backbone helped me separate concerns; Angular helped me do that while writing _way_ less code, since I didn't have to manage keeping the DOM and the J…

Agreed - data-binding and "magic" automatic updates to the view when the model changes are key to what make Angular attractive. The focus on testing is nice too, though.

Re: Angular 2.0

#105
post #15

AngularJS has a J2EE mindset. Where libraries grow to become as hard to learn as programming languages themselves. It does not make semantic sense to me anymore. Here is an example from the site: Length (float): {{length}} This is not a valid float number! How semantic is ng-show="form.length.$error.float? smart-float sounds like C++. If programming languages worked like this, we wouldn't have built many apps. The pr…

smart-float is an HTML attribute. It does not "sound" like C++. Maybe you should learn HTML5 first?

Why this is the top comment is beyond me. This is whining.

Re: Angular 2.0

#106

Earlier quoted context omitted.

I never understood how JQuery and JS were just dumped the past 3-4 years in favor of all thse complex frameworks like AngularJS, Ember, etc... is there something these frameworks can do that JQuery can't? Can they make fancy single page apps and JQuery can't? I need to be enlightened. Or is it simply ppl need to exercise their mental creativity?

"I never understood how JQuery and JS were just dumped the past 3-4 years in favor of all thse complex frameworks like AngularJS, Ember, etc..." Well, you can't have Angular without JS so we'll focus on the point of jQuery here. jQuery does a few things really well – so well that Angular itself uses jQuery (or jqLite by default). angular.element(selector) returns a jQuery object. Angular also does a few things well.…

> Well, you can't have Angular without JS

Well you certainly can use it without writing any JS:

https://github.com/angular/angular.dart

However, you're going to compile it to JS when you're done.

Re: Angular 2.0

#107
The new DI system looks promising, looks like they are trying to make a JS version of Guice which I love in java. The whole thing of using annotations in javascript seems a bit out of place though especially when ide/text don't support them. Also the logging framework, seems they are making sure that they cover some "enterprise" concerns.

Re: Angular 2.0

#108
post #65

Earlier quoted context omitted.

This is true. AngularJS is much better than what we had before, it is kind of large and monolithic. The cycle probably goes thusly: Large monolithic framework comes and shows everyone a new way of doing things (Angular/Django). People think it is too large and monolithic, so make microframeworks (Flask/Whatever comes after Angular). The next step will be a kind of happy medium.

I never understood how JQuery and JS were just dumped the past 3-4 years in favor of all thse complex frameworks like AngularJS, Ember, etc... is there something these frameworks can do that JQuery can't? Can they make fancy single page apps and JQuery can't? I need to be enlightened. Or is it simply ppl need to exercise their mental creativity?

Yes, there are a tons of things that jQuery cant do out of the box, like handle state in your application or keeping your client and server data reliably in sync, list goes on. Also, lots of frameworks haven't ditched jQuery, for instance, Ember.$ is a reference to Embers copy of jQuery.

Re: Angular 2.0

#109

Earlier quoted context omitted.

I never understood how JQuery and JS were just dumped the past 3-4 years in favor of all thse complex frameworks like AngularJS, Ember, etc... is there something these frameworks can do that JQuery can't? Can they make fancy single page apps and JQuery can't? I need to be enlightened. Or is it simply ppl need to exercise their mental creativity?

"I never understood how JQuery and JS were just dumped the past 3-4 years in favor of all thse complex frameworks like AngularJS, Ember, etc..." Well, you can't have Angular without JS so we'll focus on the point of jQuery here. jQuery does a few things really well – so well that Angular itself uses jQuery (or jqLite by default). angular.element(selector) returns a jQuery object. Angular also does a few things well.…

Ok, cool. if Angular returns a jQuery object then its proof that it uses jQuery quite extensively. So does Ember.

Re: Angular 2.0

#110

> Dependency Injection is still a key differentiator between Angular and other client side frameworks Why not just take Require.JS and use it as a dependency injector, like any other client-side frameworks allow you to do? IMO Angular is trying too hard to be everything, while it is now de facto a template system with an excellent support of custom directives and two-way data-binding. For example, Angular could be a…

Require.JS is a service locator. It's not an inversion of control dependency injector. You can swap in a different service locator for your tests, but it's messier than just directly passing in different dependencies for your tests.
Post reply on HN