Still later, other, more extensive frameworks popped up. We started seeing frameworks like Durandal, Ember, and Angular, which brought far better models of development to the client side, effectively bringing the client-server model that was once the domain of desktop applications into the browser. They brought with them templating systems, like mustache and handlebars, that made templating much simpler on the client (although, they had their own fun issues as well). In addition, they brought modularization that allowed developers to compose fairly complex systems on the client side of the application that could talk to services on the back-end. Web sockets got used more frequently (and more impressively as well), and better patterns for dealing with asynchronous calls were developed, such as promises, which are a fair bit cleaner than the callback-based mechanisms we used to use back in the old days with jQuery. It seemed like a golden age had dawned, with web technology not only being clean and integrated well, but in actually expanding to other environments, such as the server (NodeJS), living within native apps on various platforms, and even making inroads into database technology.
So, here is my frustration. I’m working on a major re-imagining of the flagship application at the day job. I also have a side project that is getting close to being ready to release, along with several ideas that are on the back burner. I expect a clear winner for my use cases to emerge in the next twelve to eighteen months. However, that winner isn’t present right now. It’s an enormously risky time, as picking a path means being married to it for the foreseeable future, as none of these projects can be trivially rewritten. It looks like the options are those below:
- Pick a framework that is great right now and meets my use cases. The clear winner at the moment for me is AngularJS, bar none. With TypeScript on the back end, this is an enormously powerful tool for me. However, I don’t know how long the existing version of Angular will be supported once the new version comes out. A year? Eighteen months? Or will it be forked and maintained for several years, ala. jQuery 1.x? Right now, that’s up in the air.
- Pick several frameworks that together can provide what I need. If I go this way, I’d likely shoot for ReactJS and Flux. I like what I see with those and React is not likely to die anytime soon, with Facebook supporting it. The trick here isn’t the long term support, but rather the short term support. I’ve been burned by depending on code that dealt with Facebook and I’m concerned that breaking changes may be made more quickly than I can handle them (remember, I’m building products which are also going to need bug fixes, additional features, etc. – that’s hard to do with the framework being moved under you). I’m also not entirely sure of how well the tooling will work for me on Visual Studio, even though that’s increasingly less of a problem as Microsoft wades into the open source world.
- Pick one of the upcoming frameworks that I think has excellent potential, but isn’t ready to go out the door yet. For this, I would probably go with Aurelia, which is somewhat the next version of Durandal. Quite frankly, Rob Eisenberg impresses me a lot. His work has been flat out solid, and his departure from the Angular 2.0 team initially made me a little nervous about the future of that project (but to be fair, they have a most excellent team as well, so I would consider them a near second nipping at his heels and I’d be interested to see how they look six months hence). I’d probably try to use it right now, but the site FAQ tells me not to use it in production yet.
So what’s a fellow to do? I can’t put everything on hold while everything is in flux like it is now, and making a good judgement call is going to be tricky. There is so much promise in the landscape right now that it is incredibly frustrating to try and pick a single direction to go. It’s not a bad frustration to have (it beats having two choices, both of which stink), but there are enough choices to induce paralysis by analysis. I think much of the rest of the industry is in the same boat. I’m leaning strongly towards continuing to use AngularJS in its current form, while carefully refactoring based on the 2.0 migration guidance as it comes out. I think this offers me the best chance of getting something built in the near term, while helping to insulate from problems further out. I’ll also need to build a full set of regression tests, as even with good guidance, the migration to the next version will not be easy. I’ll need to be able to quickly identify areas where changes have caused code to break (Typescript will help as well).
What are the thoughts from the peanut gallery on this? Am I going to look back on this a year or two hence and regret this decision?