Trying out the shoes of another

// Published January 22, 2015 by Swati

We are developing a new product at work and have the pleasure of choosing the technologies we want to work with. Having worked with only legacy code before, these choices is quite an exciting endeavor. But of course, with choices come preferences, and with preferences come debates…

We are using MVC for server side and AngularJS for client side. Except I am finding that AngularJS and MVC conflict more than they work together. They compete rather than complement. The more and more I work with AngularJS, the more frustrating I find it to be — it’s way more of an application than it is a toolkit!

Suppose I want to present the user with a list of items, and I want them to be searchable client-side. AngularJS requires me to create a controller, retrieve the model via an API, and then all this functionality of filtering, etc. is free to me. However, suppose I wanted to use MVC because we’re using Display Templates extensively to keep consistent how we show a user on every page (with an icon and a link? who knows)…well, now its pretty hard to use AngularJS. You’ve got to use some sort of ng-init hacks. It’s kind of silly.

I am convinced that we are not using AngularJS the way it was designed to be used; AngularJS seems to be oriented for single-page-applications and we are not developing one and we’ve already decided that we don’t want to.  However, a co-worker disagrees….

The beautiful part from all of this is how civil our disagreements are. I know that the interactivity that AngularJS brings us leads to a much more beautiful UI and even better UX. Either there was a realization that it’s not AngularJS that brings us all those things but instead just plain ol’ Javascript; or they were just really civil. The discussions were just that: discussions. They weren’t an argument. They were very civil.

In the end when we couldn’t reach an agreement, a mediator suggested that we both try to implement a small subset of our code with the way other wants to do it to understand the benefits the other is trying to explain…

At a previous work place, it would’ve been a heated debate with probably some name calling hidden behind some awkward laughter. It’s great to be out of such a toxic environment and into a healthy one.