Aurelia - Best Practices



Aurelia is a new framework hence, the best practices are yet to be established. In this chapter, you will find some useful guidelines to follow.

Starting a New Project

Aurelia offers aurelia-skeletons. There are a couple of skeletons to choose from. The team behind Aurelia is actively supporting the skeletons, and they are always up-to-date with the newest version of the framework.

Aurelia Skeletons

  • skeleton-es2016-webpack allows you to write ES2016 code and use npm for package management and webpack for bundling.

  • skeleton-es2016 allows you to write ES2016 code and use jspm for package management and SystemJS for loading and bundling.

  • skeleton-typescript-webpack allows you to write TypeScript code and use npm for package management and webpack for bundling.

  • skeleton-typescript allows you to write TypeScript code and use jspm for package management and SystemJS for loading and bundling.

  • skeleton-typescript-asp.net5 allows you to write TypeScript code and use jspm for package management and SystemJS for loading and bundling. The ASP.NET backend is also integrated.

  • skeleton-es2016-asp.net5 allows you to write ES2016 code and use jspm for package management and SystemJS for loading and bundling. The ASP.NET backend is integrated.

You can clone all skeletons from GitHub. The installation instructions can be found inside README.md files for each skeleton.

C:\Users\username\Desktop>git clone https://github.com/aurelia/skeleton-navigation.git

Folder Structure

You are free to use any folder structure you want. If you are not sure where to start, you can use the following folder structure. The image represents files and folder in the src directory.

Aurelia Best Practices

Web Standards

Aurelia is a framework oriented to web standards. This was one of the main goals of the team behind it. They will make sure that the framework always follows modern web. This is extremely good for the developers, since we can rely on the usability of the framework in the future. It also helps us be up-to-date with the browsers and the web.

EcmaScript 6

This is a good practice not just for Aurelia but for any other JavaScript framework. ES6 offers new functionalities that can help in the development process. You can also use TypeScript, if you like strongly typed languages.

Advertisements