Don of the Day

Don of the Day


Adventures in software development with Xamarin and the Web

Software developer, building things with code in sunny Scottsdale, AZ.

Share


Twitter


I Chose the Aurelia Framework

Don FitzsimmonsDon Fitzsimmons

For the past few months, I've been shopping around for a JavaScript front-end framework. A large and important project that my team is working on involves a Web API on the back-end and the hope is that we could write a nice, feature-rich front-end client to consume it using one of these new fangled frameworks.

My choice of framework is a big deal, both for me and my company. We're about to spend a lot of development dollars on this web app and we have to get it right. You see, in the back of my mind I'm thinking, "I should just stick with what I know. Keep it simple: ASP.Net MVC and some jQuery." But, I figure, since we're consuming a Web API, we would end up writing a JavaScript framework of our own by the time it's all done. No need to reinvent the wheel.

Considerations

When choosing a JavaScript front-end framework, or any framework for that matter, there are many considerations to take into account, but chief among them are:

  1. How stable is it?
  2. How complete is it?
  3. Who created it/is backing it?
  4. How quickly will my team learn how to use it?
  5. Is it a joy to use?

The last thing I want to do is pick a framework, get deep into it and end up regretting my decision down the line. So, I spent months evaluating the big players like Angular, Ember, React and some others with these considerations in mind.

Why I Didn't Choose The Others

I won't go into the minute details about why I didn't choose the other frameworks, but I will touch on each one a bit measured against the above considerations:

Angular 1.x: Everyone thinks of Angular when the topic of JavaScript front-end frameworks comes up. It's by far the most popular option and for good reason. It's stable and has been around for a while now. It's a complete framework with many features. Google created and backs it (although it feels like they do so at a distance). It's fairly easy to pick up and while I wouldn't say it's a joy to use, it's pretty developer friendly.

But, and you know I didn't choose it, so you know there's a but, Angular is being re-written and the new version won't be backwards compatible. This, for me, is a deal breaker. I'm not about to invest my company's development dollars on dead framework. Angular 2 is in beta and has been for a few days as of this writing, so what about that?

Angular 2.x: I'll admit, I didn't spend a lot of time with Angular 2, but the time I did spend was met with some frustration. I've never used TypeScript before and frankly, I didn't like it much. Also, the templating syntax is horrible. It's just weird and awkward. Overall, I had to go with my gut and I just feel like it's way too early for Angular 2. I did like the way it's structured though and it has a good deal of flexibility, but it didn't meet my completeness consideration.

Ember: I really wanted this one to win. Ember has been around a long time as far as these things go, it's complete, stable and backed by a great community. But man, they aren't kidding about the learning curve. It's steep. Was it a joy to use? I don't know, because the learning curve was so steep, I never really found a rhythm. After spending hours trying to get a few simple scenarios working, I just gave up. If it was this hard to learn, my team would lose months just trying to off the ground.

React: I didn't give React much of a try. It's not a framework as much as it the view portion in the whole MVV* equation. I did learn a bit about how it works with Flux, but it didn't feel like a complete solution. It is backed by Facebook, which is good, but I was looking for a complete framework.

Finding Aurelia

At some point, one of our developers pointed me to the Durandal framework. I went and checked it out. At the bottom of the home page there was mention of a new framework from the same people behind Durandal. It looked interesting and there was a nice video showing off how thing worked. After watching that video, I had to learn more.

By this time, I've become quite cynical and I knew this framework would have a fatal flaw. Surely there's something wrong with it. I went through the getting started tutorial and finished it pretty quickly. I like the ES6 syntax, coming from a C# background, it's familiar and comfortable, unlike TypeScript. The templating syntax was nice and clean too.

I've learned that the getting started tutorials always leave you with a good impression because they lead you down a safe path. It's not until you start trying to do something with your own app and its strangeness that you end up cursing the framework authors because you can't get a simple login to work. So I started building the basic pieces of our app using Aurelia and within a few hours, I had a working login form using tokens, some basic API calls spitting out data on the screen and it was down right fun. It was fun to use this framework.

As I got deeper into my work, I did wished there was more documentation, but I was able to figure things out. Aurelia has a good community, but it's also new, so there's not a ton of information out there yet. Overall, my development experience with this framework was good. Better than anything I had experience so far. But, some of my considerations still needed to be addressed.

How stable is it? Aurelia is in beta and the creator, Rob Eisenberg considers it production ready. Okay, that's cool. And my short experience working with it didn't reveal any signs of instability. How complete is it? From what I can tell, as a framework, it's complete. It could use more add ons and I know they are working on it. For instance, Aurelia Interface will serve as a nice UI design add on.

Who created it and is backing it? Apparently, Rob Eisenberg is well known for creating successful frameworks. I hadn't heard of him before, but from what I've read, he worked on the Angular 2 team for a while, but had some disagreement about how things were going and left, ultimately creating Aurelia, which is why Angular 2 and Aurelia are similar in some ways.

There's another benefit of Aurelia in the who's backing it category. Aurelia is a product of Durandal Inc. so it's not just another open source project. To me, this means there's a company behind it that will likely take money to prioritize features or bug fixes. You won't get that with any of the other frameworks.

It's been a few weeks since that first getting started tutorial and I'm enjoying the development experience more and more with Aurelia. So far, I feel like I made the right choice, but only time will tell. If you're shopping around for a JavaScript front-end framework, I suggest you give Aurelia a try.

In future posts, I hope to get into more detail about Aurelia, how it works and what I learn along the way, so stay tuned.

Software developer, building things with code in sunny Scottsdale, AZ.

Comments