Monday, February 13, 2017

Aurelia - Best Practices

Aurelia is new framework so the best practices are yet to be established. In this chapter we give you some useful guidelines you can follow.

Starting New Project

Aurelia offers aurelia-skeletons. There are 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 our folder structure as image below shows. The image represents files and folder in src directory.
Aurelia Best Practices

Web Standards

Aurelia is 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 usability of the framework in the future. It also helps us to always be up to date with the browsers and the web.

EcmaScript 6

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

No comments:

Post a Comment