Get the Newsletter

Aurelia in ASP.NET JavaScriptServices

Posted by AureliaEffect on November 17, 2016

Today I'd like to introduce you to Aurelia community member Keith Katsma. Keith has been a software engineer and architect for almost 20 years. After a lot of work with ASP back in the early 2000s, he veered off into the design and development of service oriented architectures. However, a couple years ago he was reintroduced to UI development through AngularJS, and has recently spent a lot of time getting to know some of the latest JavaScript frameworks - Angular 2, React, and Aurelia. Of particular note, Keith has been doing some great work to improve the Aurelia experience for ASP.NET developers. I'll let him tell you about it in his own words...


In today's complicated web application ecosystem, starting a system from scratch is some seriously hard work. There's an incredible number of choices to make in terms of frameworks, JS language versions, build processes, back end integration, etc. And once you choose these things, you have to piece them together.

Fortunately, there's a number of different starter "seed" projects out on GitHub that provide pre-packaged solutions with much of this work already done. You can generally find something that's using the combination of things you're looking for, in a state that is more or less ready to go. But, while they provide everything you need for front end, they typically don't provide much in the way of back end integration. You'll see them using mocked services with files containing JSON responses, or sometimes calling 3rd party APIs. So when developers want to start incorporating their own back end, they still have some work to do. And, I think not coincidentally, you will often see questions on sites like StackOverflow regarding issues with this process.

To help solve this, and other difficulties of starting development on a web based application, Microsoft has started a new GitHub repo that provides a unified (and dare I say revolutionary?) developer experience - the AspNET JavaScriptServices templates. These are using the latest technologies, and have a lot of really cool features. They utilize Webpack to manage the front end development process and provide a basic .NET Core Web API back end, both of which can be launched from a single execution of the CLI "dotnet run" command. In fact, most things we're used to doing through "npm" on the JavaScript side can be done through the "dotnet" command on .NET Core side. You can easily use the CLI to install and restore libraries, build and run the project, and publish for deployment. Add in integrated full-stack debugging and the ability to run everything from single projects/IDE, and what you get is a tremendous win for developer experience.

Until now, the new JavaScriptServices templates have only come in Knockout, Angular, and React. As I had been recently working with and evaluating a number of the latest JavaScript frameworks, it seemed that Aurelia definitely deserved it's own implementation of the template. Aurelia provides a standards based, convention over configuration approach that, like the JavaScriptServices templates, provides developers reduced friction in doing what they need to do - building software.

As I have written about on my blog, www.softwaredefineduniverse.com , I think Aurelia is a well designed framework. Hopefully, others who are interested in using or trying out Aurelia will find the new template useful as a starting point in projects. While there's still work to be done for adding Webpack HMR support in Aurelia, the current template implementation provides all the other benefits of WebPack, and the back end integration of JavaScriptServices to boot. So, what are you waiting for? Go try it out !