top | item 8451208

AngularJS 1.3.0

159 points| EugeneOZ | 11 years ago |angularjs.blogspot.com | reply

86 comments

order
[+] rmsaksida|11 years ago|reply
I feel Angular is better than almost everything out there but still not quite right. It seems way too complex for what it does, and the syntax looks like somebody vomited all over your code. Does two-way databinding have to be so awkward? Angular does help you in writing maintainable code (which is vital for JavaScript - dealing with large JS codebases is hard), but it also ties you to a technology which is probably transitional. I have high hopes for 2.0, and I hope they work out these issues.
[+] JDDunn9|11 years ago|reply
> Does two-way databinding have to be so awkward?

The verbose parts have nothing to do with the data-binding. The dependency injection is there for testability (https://docs.angularjs.org/guide/unit-testing), you have to use array notation because JS changes variable names upon minification. The rest is just objects being used to set up options.

[+] lukasm|11 years ago|reply
I had the same feeling, but after 6 months is seems more natural than jQuery. It's kind of like git. You have to change your mindset coming from SVN.
[+] Cthulhu_|11 years ago|reply
How are you finding it awkward? It's the simplest way of getting data into a template that I know of - assign a value to a scope and done, no hassle. And vice-versa, too.

(disclaimer: I come from Backbone, where we did all data and event binding by hand)

[+] aikah|11 years ago|reply
Nice!

Angular is described by its creator as a better browser. That's why it gets so much heat. Because you actually have to hook into a app lifecycle you dont control.

And you know what ? that's great,because it means there is only one way to skin a cat and when you have to work with a huge team,it's time saving as there is no architectural debate. That's frankly why I like big and opinionated frameworks such as Angular.

It's basically the framework's way or the highway,code becomes predictable and you only need to know how the frameworks works to understand other's people code. You know there will be no DOM manipulation in controllers. You know that the view layer will communicate with other layers through services.You know that developpers will have to use promises. And you know you'll be forced to write testable code that makes heavy use of dependency injection.

[+] jbigelow76|11 years ago|reply

    >That's frankly why I like big and opinionated frameworks such as Angular.
That's weird that you say that Angular is opinionated, or maybe it's not.

When I first started hearing about Angular, the story was that Angular was very opinionated compared to Backbone which made you figure everything out on your own.

Then as Ember gelled Angular became the un-opinionated framework that left the developers to their own devices compared to the very opinionated "Ember way".

I guess every framework is what you want it to be, or what you don't.

[+] hippich|11 years ago|reply
It probably depends on how far you try to get from angular in angular-based project. As soon as you try to do something differently - it might bite you and bite you badly.

As for promises - try to define custom parser or formatter on ngModelController using anything asynchronous :)

And yes, you are right - it might be easy to understand other's angular code for you, but when javascript developer come into angular project, try to explain why utility library called 'Service' and why DI does not take care of loading these dependencies :)

[+] ninkendo|11 years ago|reply
I'd agree with you but then I realize I just got done pruning pure dom-manipulating jQuery code out of a colleague's angular directive today. Honestly I wish angular were more opinionated.
[+] heydenberk|11 years ago|reply
> One-time bindings – by prefixing an expression with "::", it will only be interpolated once, and then no longer watched.

Does anyone else find the DSL(s) in Angular to be maddening?

[+] pixie_|11 years ago|reply
If Angular wasn't endorsed by Google would it be as popular as it is?
[+] omouse|11 years ago|reply
The biggest mistake they've made with Angular is that they're using a custom documentation system that's also written in Angular and JavaScript.

The DSLs would be okay to work with if they were better documented and had better examples and an easy to use docs system.

[+] mikaraento|11 years ago|reply
Most templating languages have binding syntax, and most people want them to have some.

That said, I too find the documentation too brief, especially on things like ng-repeat's filters.

[+] davej|11 years ago|reply
Shameless plug for my open-source project Angular Classy. Recently pre-released a beta for 1.0, of course it's fully tested and compatible AngularJS 1.3.

http://davej.github.io/angular-classy/beta.html

Feedback is always appreciated.

[+] atomical|11 years ago|reply
Could include a short description with your shameless plug?
[+] flaie|11 years ago|reply
Looks cool, congrats !

I'll probably give it a try. I like the DRY part regarding the injected dependencies.

[+] junto|11 years ago|reply
Small sidenote. Whilst I understand that the Angular team feel obliged to use Blogger, can people please not use the Blogger dynamic views. No content without JavaScript. Why doesn't Google come up with their own standard Google Blogger template for their project teams anyway?
[+] luikore|11 years ago|reply
> And as we announced back in December, AngularJS 1.3.0 no longer supports IE8. This allowed us to make improvements and performance enhancements that otherwise would not be possible.

It is possible, see how rivetsjs did that years ago. But it is still a very nice thing to drop IE8.

[+] Touche|11 years ago|reply
If Microsoft no longer supports IE8, why should web developers?
[+] keda|11 years ago|reply
Excited to see the bind once expression introduce.
[+] davej|11 years ago|reply
Yes, this is a big deal for performance!

Having to run through 1000s of watchers in a digest cycle is not unusual with a typical Angular site and oftentimes most of those watchers are redundant.

[+] skeletonjelly|11 years ago|reply
I still don't get what this will be for. Detail pages?
[+] Bahamut|11 years ago|reply
Looking forward to start playing around with 1.3 soon - got lots of bug fixing to do around the Angular ecosystem I'm sure.
[+] RonnieJGarcia|11 years ago|reply
Exciting to see, Angular JS is what is allowing my small team to create some pretty complex backend :)
[+] clubhi|11 years ago|reply
Shouldn't it allow you to make a succinct frontend?
[+] itbeho|11 years ago|reply
just curious but how is Angular helping on the backend?
[+] adamnemecek|11 years ago|reply
do you mean front-end?
[+] JanezStupar|11 years ago|reply
I don't like Angular. Everybody likes it but I don't.

It feels like 2004 all over again. SOAP! SOAP! XML! GWT! ColdFusion!!!!1onene!!!1

I also don't like working with Google toolchain, because for a company full of smartest dudes on the planet it certainly seems like these dudes don't care about their customers.

Below is a list of reasons why I dislike Angular.

1. GAE documentation sucks, GoLang documentation sucks and indeed Angular documentation sucks.

2. By using Angular you are throwing away the toolchain we have been honing and making better for the last fifteen years.

3. Debugging - If I have learned anything from the XML dark ages it is that you do not want to program in a language that is not debuggable. And yet, here comes Google and does it again!

4. Overloading semantics. I hate Angular for just going and reinventing so many of the words and context we use in this trade.

5. Angular is not free! I would not use Angular for the same reason I would not use Java. I would hate to tie my future to this uber monstrous corporation's whims.

Thinking about Angular I realized (yet again!) that Google has jumped the shark. It is no longer pragmatic and cheeky startup of fifteen years ago. Nowadays it is more akin IBM and Microsoft of old.

Edit: Basically to me Angular is another stab at the softcoding - where Angular is the app and your code is softcoded definitions of behaviors. And as such it will eventually fail for the same reasons all the similar projects have done so before. Some of which are listed above.

[+] wldlyinaccurate|11 years ago|reply
I may be biased, since I've been using (and enjoying) Angular for quite some time now. But I don't agree with any of your points.

1. I can't think of a single case where the Angular documentation has failed me. Yes, it's sketchy in places, but what open source documentation isn't?

2. I'm not sure which toolchain you're referring to, but Angular is just a framework - you can use whichever toolchain you like. You can even use no toolchain if you wish.

3. Debugging has improved significantly since 1.0, especially since Angular started adding HTML comments to denote where markup is generated from. Browser extensions like AngularJS Batarang and ng-inspector help out as well.

4. Again, I don't know exactly what you're referring to here, but I feel like Angular's concepts and semantics fit in just fine with other systems. Scopes, services, controllers, modules... These all mean what you think they mean.

5. I'm genuinely interested how you think using an open-source JS framework will tie you to a corporation? Hell, I'm interested how using Java will tie you to (I assume) Oracle when things like OpenJDK exist?

[+] Cthulhu_|11 years ago|reply
1. GAE and GoLang is neither here nor there; Angular's documentation was in need of a lot of improvement when I started using it a year ago, but since then they've been working hard on it. (I found myself in the list of contributors actually, all I did was make a small edit to the documentation). If the documentation sucks - and you seem to know what's wrong with it - edit it. There's a big shiny "IMPROVE THIS DOC" button on every documentation page.

2. As others mentioned, what toolchain? At my current project we've got the ol' Grunt toolchain set up, generated by Yeoman, and customized to our needs - no Google involvement there, and it's a massive improvement over the old toolchain, which was an assortiment of tools run from Maven (often in the old Java JS runtime, which was slow)

3. I've yet to encounter any issue in our Angular projects that need debugging; writing proper unit tests (and Angular allows that) and not doing crazy stuff helps a lot in that respect.

4. Such as? Every framework introduces its own semantics; before, I used Backbone, which has routers (which were actually controllers), models and collections (where collections were a subset of models containing models, what?), and views (which often served as controllers as well, creating the ViewController thing). I don't see your point.

5. Yes it is. MIT license, open source, hosted on Github - the comparison with Java probably couldn't be more skewed.

The comparison with other frameworks is somewhat relevant, in that it's a full-scale application framework - not jQuery with a structure layer on top like for example Backbone is. The upsides of that is that it's much easier to achieve the same thing (trust me, I'm rebuilding a 60K Backbone project in Angular with a factor 10 less code required), it's much easier to develop, test and maintain (and with a 12-man development team of varying skill levels you need that), etc. Not to mention, like I said, unlike ColdFusion or Java or Silverlight or whatever, it's an open source project from the start - not something ditched to the community after the company itself lost interest.

[+] wiradikusuma|11 years ago|reply
Err..

1. I admit Angular documentation sucks, but that's not atypical in any open source. It's getting way better btw, and there are tons of resources from 3rd party.

2. Which toolchain are you referring to? If we're talking Web/JavaScript (where Angular is for), I can say the toolchain e.g. Grunt is quite recent.

3. I somewhat agree with this. We can use e.g. Chrome Dev tools and Batarang (Angular Chrome plugin), but definitely there's room for improvements.

5. Care to elaborate your definition of free? Even for Java, I can say a significant ecosystem for Java is open source. Sure, some Enterprise prefer Java Enterprise Edition, but many are satisfied with Spring and other open source Java-based solutions.

[+] ctolsen|11 years ago|reply
I'm honestly curious here – not being an FE developer, but I've wired up Angular in a few projects in the recent past.

I've felt like it's easy to use and to get the job done, not any harder to debug than JS in general, that it wasn't that hard to fiddle with it to a point where I could use my old plain-JS knowledge fairly well, that the documentation wasn't excellent but not bad, and that the online error generation (whatever it's name is) was quite handy.

What haven't I seen yet? I mean, it seems to have its quirks and difficulties that make me go halfway insane, but that's a characteristic of JS development in general.

[+] hellodevnull|11 years ago|reply
Reasons 1 and 3 are enough for me to stop someone who is relatively new to web app development to use something other than Angular. egghead.io saved me when trying to learn it, but before that I was stuck trying to follow their tutorials and docs (which understand are a little better today) and spending hours each day trying to figure out problems - this wasn't the case with Ember and Backbone just for a persona comparison there.