Wednesday, July 24, 2013

Angular Part 2

So, two months ago I started my Angular Journey. One of my co-workers today asked if I still liked it and I have to say: yes!



Not everyone in my organization loves it though.

The Criticisms
"It is too magical", "The docs kinda suck", "What a weird style", "It hides too much", "It does too much". These are the things that I have heard after introducing it to my fellow coders. These are all people I respect and are all what I consider programmers first. They are generally used to either jQuery or YUI and much more comfortable than I with the innards of Javascript. As a JS n00b and a pragmatist at heart I suppose I don't have the same perception on how things have been done nor should be done in JS. I merely wanted to get things done, period.

To be fair there, Angular can be pretty hard to wrap your brain around: the rendering pipeline and stages are starting to become more obvious in docs and talks but can be pretty strange; data sharing outside nested controllers is not readily apparent; the docs in general need some updating and improving. The underlying architecture is a complicated and crazy beast with timings and event handlers  and is still non-obvious. I have seen the question for how to do something after the directive renders a lot for example.

Part of the problem is also angular-ui(at least for my co-workers). They have built some CRAZY awesome directives and tools that do some very advanced things with not a lot of code. On the flips side, trying to explain the innards of angular-ui to these folks(looking at you $dialog) along with 'resolve' and the rest of it was a major challenge and I don't think I completely succeeded. I have to give the UI folks credit though. It is still a young project that was going through a significant restructure during the course of my project.

I also have to take a good chunk of the responsibility myself. I didn't really understand the framework, nor my audience really, before I tried to evangelize them. Angular is a full complex framework, but it is very well done and well led.

The Positives
The overall structure of the application, and encouraged by angular-generator, plus the clear separation of responsibilities and shear lack of code was a major hit. Also, while I am still learning it, the emphasis on testability was heartily hailed. We like tests here, and have several TDD zealots so I have a feeling that I need to spend more time learning that piece in general. One thing that seemed to calm concerns has been the awesome and active community. The fact that there is so much excitement by the wider community on top of the support from Google gives me confidence that it won't disappear like other frameworks.

My Final Take
After all of this I still really enjoy using this framework. The community, the improving docs, the design and coding standards all allow me to be very productive in not a lot of time. I do wish that the project leads were a little more transparent though. We got lots of fun information about 1.2 and lots of great code is in the unstable 1.1.x series but there has been no RC and no timeline released. I just simply prefer developing against stable branches than unstable ones but there are so many fixes and features in 1.1.x that it makes me impatient. All in all though, as I look back at this and also look at the code we have currently on the site and the lack of code that I had to write my thoughts settle on this:

I am sure glad the Angular people do!