en
de

Aurelia – The “Next Gen” JavaScript Framework?

While Google is still working on Angular 2.0, another JavaScript framework called Aurelia emerged. Aurelia is an official product from Durandal Inc. and shall be the next generation version of their Single Page Application framework Durandal. It’s being advertised as “the next generation UI Framework” and “the most advanced and developer friendly front-end framework today”. The principles Aurelia is following and the plans they have for the future are indeed very promising, so I decided to take a closer look at it.

Blue glowing jellyfish

Blue glowing jellyfish

Catching Fire

Aurelia caught my attention because I already knew their SPA-Framework Durandal which colleagues of mine used in a project once. Another reason might be that Durandal Inc. CEO Rob Eisenberg was a former Angular 2 member and is known to be an experienced framework developer. After it turned out that the direction in which Angular 2 was heading doesn’t align with his vision anymore he left and started his own thing. So I followed the progression of Aurelia and after a short time they already announced and released the first beta version at the end of 2015. And this was huge.

Feels natural

I tried out Aurelia a few months ago. Using the provided navigation skeleton, I was surprised how easy it was to write my first little Aurelia Application. If you are already used to tools like Gulp, NPM and package managers then Aurelia feels quite natural and clean. This might be due to some main design principles of Aurelia as well as the fact that it’s built upon modern well-known web tools and best practices instead of trying to re-invent the wheel.

One of Aurelia’s principles is “Convention over Configuration”. You have to write less boilerplate code, saving time and making your code more easily understandable and less error-prone. As always you should know what you are doing, know the conventions and understand why it “just works”. However, if you want to be more flexible, it is also possible to change the conventions or even not use them at all.

Instead of shipping as one heavy framework, Aurelia is split up into several modules which allows you to decide which parts you really need and easily plug them together. Registered plugins can then be injected into modules by the Dependency Injection system. This loose coupling is a very nice thing to have and makes testing a lot more comfortable.

Next Generation

Aurelia itself is written in ECMAScript 2016 and ECMAScript 2017 and doesn’t rely on jQuery or something similar. This is great because your application is mainly just future JavaScript and not over and over soaked by framework-specific stuff. So when working with Aurelia you are writing your code in ES7 and transpile it to today’s JavaScript before execution. Aurelia itself uses Babel as a transpiler but you can also use Traceur, TypeScript or Coffeescript. Due to the fact that we are using TypeScript a lot at our company, especially with .NET Backends, I tried to use that with Aurelia. I got it working but it was not that easy. Therefore, I was very delighted to see that Aurelia officially announced TypeScript support and released a TypeScript Navigation Skeleton and Starter Kit with the new beta version.

Another fact that makes Aurelia a “next generation” framework is its support for another “next big thing”: Web Components. Aurelia Components can be easily written as Web Components and then exported to other web applications, even if these are not written in Aurelia. It is also possible to import third-party Web Components into your Aurelia app. This greatly helps to make your app components more future-proof and reusable.

Aurelia is primarily designed for “evergreen” browsers but also provides a polyfill to support older browsers like IE9. Hopefully though, polyfilling won’t be necessary that much longer, since Microsoft has stopped the support for browsers older than IE 11. Fortunately  you are not limited to desktop web browsers as Aurelia is also designed to be compatible with hybrid mobile and desktop app strategies.

Community

Aurelia itself is open source. All plugins can be found on Github, including tests and “more or less” also documentation. Aurelia is still beta but the community and number of contributors are growing fast which leads to more people using and improving Aurelia. The Aurelia team members are not only developers of the framework itself but also “real world” web developers who are using Aurelia for their projects. Therefore, they exactly know the features that are needed and the challenges a framework has to face in order to actually help you with your daily work instead of getting in your way. The community is primarily active on their gitter channel. Here you can ask your questions, get answers and start discussions with the community, the Aurelia team members and even Rob Eisenberg himself.

This really great support from the team and the thriving community that it spawned on gitter, StackOverflow, GitHub and many blogs might due to the fact that Aurelia is an official product from Durandal Inc. and not just a side project. They see developers as their customers and provide commercial support as well as training material. This is rather unique – with other frameworks you often have the impression that their creators don’t care if the documentation is bad or their features are uncomfortable to use.

Conclusion

In my opinion Aurelia can rightfully be called the “next gen” JavaScript framework. The code is written in future JavaScript, the framework uses modern web development tools and best practices and it supports Web Components, even despite the fact that their browser support is still missing.

Of course you always have to pick the right tool for the right job and Aurelia is not a magic bullet, but if you want to write a Single Page Application and are looking for a suitable framework, then Aurelia is a good way to go. There are several other SPA frameworks out there but they often have a steep learning curve. With Aurelia, especially if you have some experience with modern web development, you can make fast progress, write clean, modern JavaScript and always rely on good support.

I am really excited about Aurelia and looking forward for version 1.0 and the features that will ship with it, for instance Aurelia Interface which will be a tool for writing Hybrid Apps with Aurelia, much like Ionic. I would definitely pick Aurelia as the framework for the next SPA I write, and I can’t wait to see what the future has in store for it.

Comments (2)

Darryl Wagoner

24 February 2017 at 00:27

I found Aurelia course on Plural Sight after having a lot of friction with Angular 2. I needed a framework that I could write a SPA quick after work that wouldn’t create a lot of friction. Since this was a personal project that had to be done in a few months I couldn’t afford to lose hours looking for a typo which has happen in Angular.

Aurelia just worked! Any problems, I normally find in a few minutes and never more than 15mins.

It also just makes sense to my .NET brain. It isn’t .NET, but at least it makes sense to me. I also use TypeScript 2.0 on my project.

I love Aurelia

    Katharina Bähr

    Katharina Bähr

    24 February 2017 at 00:38

    Nice to hear. We had similar experiences. We were developing a lot of applications with Angular 1.x so using Angular 2 seemed to be the natural choice… but now we are using Aurelia in some of our projects too 🙂

    If you want, you can read more about our experiences with Aurelia on my personal blog: http://kabaehr.de/blog/Aurelia-production-experiences/

×

Sign up for our Updates

Sign up now for our updates.

This field is required
This field is required
This field is required

I'm interested in:

Select at least one category
You were signed up successfully.