Is AngularJS(1.x) ready for Enterprise Application Development?

Before I start, I know that we have tons and tons of posts on this topic, but this was based purely on my experience.

It all started with our new project kick start phase, where AngularJS was suggested out of blue to speed up the development due to the tight deadlines. I’m a J2EE guy, and I’m a not a big fan of JS Framework, but ever since words like Backbone.js, Node.js got around the web, it always fascinated me. Whenever a new one comes in the market, I will be start exploring the tech and get excited for couple of months, before the mainstream development get me involved! But this move, looked like I finally get a chance to use cutting edge, buzz word technology in a project at my workplace. Yay! This should be fun.

So the first few weeks has been excited, and I’m very eager to get the prototype up and running to showcase the team, that AngularJS is the right candidate for this project. The base code which we created for the project was so smooth, we felt that we can REALLY speed up the development, because it was so easy, where we spend 100s of lines of code, AngularJS did it in much fewer and simple way! But that excitement didn’t stay long with me.

Before I get any further, this is not another AngularJS Bashing post, but rather a post to clear the mythical air that surround the front-end JS MVC framework. Let me get into the topic.

  1. Documentation : Most part of the development time was spent trying to understand how certain things worked. Because when I try to find them in official documentation, it isn’t there. For a guy like me, who read official documentation for all my doubts in a framework, this was a big blow. The documentation to getting started with was good, but once you are past that honeymoon period, it will be a tough time to find and understand certain aspects. I strongly feel official documentation should be the main place to dig anything and find solution, or learn a framework. Not in some forums. Infact, SFO helped me a lot with AngularJS than the official documentation!
  2. Learning Curve : One funny thing I noticed about AngularJS was, as much easier as it is to learn the basic, it will get tougher when you get going. I’ve done some learning curve graph for easy understanding.ang-learn-curveIt was exactly what happened. Initial excitement levels gave confidence that we can achieve anything but as we are into middle of the project, things get tough and it becomes a swirl-wind about to destroy the city! But after a lot of digging, it get’s down but after certain point of time, it feels like a landmine hidden somewhere safe, but we don’t know where it is. It is mainly attributed to my first point about Documentation. If it was any easier, it could have saved us a lot of time!
  3. Performance : Hey, I am not complaining, but it isn’t what we believed. Since it is an JS framework, things get uglier if we can’t look under the hood(code!). It’s a like a kid left unnoticed with dangerous toys! Hello world can be snappy but when the code base gets big, headache gets bigger! Of course, it is a developer’s responsibility to make sure to tune up the performance, but kind of added more work for us. As a J2EE guy, we were more into server side tweaking and even after bringing skinny data to client side, it took ages to render them! Why, because bloody watchers infested all over the page. Then it hit us, that now we are not only going to tweak server, but the front end tools too! It took us a while to figure out, but in the end we figured out stuff and moved on.
  4. Browser Rendering Engine : Before this, all we cared about was not how our app will perform in different browsers, because all the stuff will happen at back-end. But now, we need to be cautious about this. It adds one more layer of work. In fact, plain Vanilla AngularJS performed just fine, but with all added plugins and modules, it is pretty tough to make it work across all browsers. It is mainly attributed to the fact that we are newbie at JS framework, but still we never thought of this, because we never had this issue before. Although this might sound silly for many, but when it comes to Enterprise Development, things aren’t as glamorous as it’s with other industry. Client browser restrictions, extreme pressure, unnatural deadlines were just a recipe for stress, and this will put more pressure to already squeezed developers!

Conclusion :

All the points I’ve mentioned are just a few to go with, but in the end, instead of speeding up the development, it did slowed us done after the initial surge. Th main reasons were

  1. Lack of proper R&D. If it’s new and shiny, just pick it up mentality was the big mistake. It would’ve saved us hell a lot of time.
  2. Poor documentation should’ve have been taken into consideration.
  3. People’s general belief. If it’s front-end JS framework, work should be done fast. This is what made some guys go with this new techs, but in the end, without proper understanding about the underlying technology, it is quite opposite.

And there are lot more to say, but I feel you get what I am about to say. If you want to use something, take your sweet time to understand the in and out of the framework before you start churning 100s of lines of code. And if you are seriously tight on deadline, please don’t go with this new shiny thing. Because it can backfire you, if you don’t have the skill and the person.

Finally, after looking at AngularJS 2.0, I am quite confident that it can solve a lot of issues of v1 and the documentation looks a lot better. It sounds quite exciting(see, again I fell for this!) and I hope it will help a lot in enterprise application development.

Thanks for reading!