Google AngularJS Framework - Worth the risk? Google AngularJS Framework - Worth the risk? javascript javascript

Google AngularJS Framework - Worth the risk?


We have been developing a port of a Swing fat-client application in AngularJS for the last couple of months and I think it is worth recommending. As far as learning resources go, check out the official project site (and be sure to read the tutorial) and the mailing list (the authors are very helpful).

The good stuff:

  • great testability
  • the two-way data binding is a very powerful feature, and it can be extremely helpful once you "get it"
  • IMO the AngularJS templates are much less brittle than using data- attributes or "special" CSS classes to mark elements that do something
  • it greatly reduces the need for using jquery plugins, because implementing that functionality in AngularJS is very easy (stuff like trees, tabs, accordions, etc.)

The bad stuff:

  • the learning curve seems pretty steep (I didn't have much of a problem, but I've seen some people struggle with it)
  • validations in AngularJS suck for the time being (a new implementation is on the way)
  • not all libraries/jquery plugins play nicely with Angular and usually you have to wrap them
  • the API is still being polished, so expect breaking changes (not a big problem with frequent releases and very good changelog, though)
  • performance is OK up until several thousand bindings on a page - most of the time this is not a limitation, but there are cases when this could be a problem.

Some pointers (if you ever decide to learn AngularJS):

  • some people really overuse widgets. In my experience, it's much better to use HTML "partials" + services, and only use widgets sporadically.
  • read source code of the library - it's the best place to learn stuff about angular
  • no DOM manipulation in services/controllers
  • if you use css classes to bind to events, you are doing it wrong


+1 @psycho's answer

AngularJS is client-side framework, so you can use any language on the server. It's designed to work well together with jQuery, with big emphasis on testing...

Here are some resources you might find useful:

Some example apps:

Adapter for SenchaTouch: https://github.com/tigbro/sencha-touch-angular-adapter

Adapter for jQ Mobile: https://github.com/tigbro/jquery-mobile-angular-adapter

Feel free to ask any question on mailing list !

We are still in beta, but there are already several internal apps at Google, powered by AngularJS.


UPDATE (26th July 2012):

AngularJS v1.0 has been released.

For some public AngularJS-powered apps, check out http://builtwith.angularjs.org


IMHO developing something for a client which they may have difficulty supporting is unprofessional. You have to bear in mind that it will be difficult for your client to hire experienced Angular professionals, or train their own people to climb that "steep learning curve". Also, so far the documentation is not that great. Can you easily, in a few moments, answer the question, "How can I connect my shiny Angular app to my client's database?" Can your client sometime in the future easily grab some existing code and adapt it to their potential future needs? Be honest.

Compare plain old reliable LAMP development to Angular. For a "small web application" I really believe that a professional should give his client something maintainable and simple.

It's not to say that Angular isn't cool and sexy etc etc. But you have your client's future maintainability to think about in addition to the latest framework fad. Tread lightly would be my recommendation. Build your own website with Angular first and see what you think before you bestow your fabulous new skills on some trusting client.