We are happy to announce that we have released ASP.NET Zero v3.1. This release mostly includes enhancements and bug fixes, but also includes some important changes on Angular 2.x UI.
Angular 2.x UI
In general, Angular 2.x is still not so mature. While it’s officially released;
- It’s CLI tool is still in beta and has problems and missing features. We have used angular-cli in our Angular 2 UI, but in every new beta release, we may have some breaking changes. We are constantly fixing them. When we first start to develop, it was using systemjs, then it switched to webpack and in latest versions AOT compiling become standard on build. We are following changes and implementing for our solution.
- There are some important missing libraries, especially for User Interface. Angular 2 material is recently become beta, but release date is not known yet.
- While Angular 2’s documentation is very rich, it’s not complete yet. Especially, angular-cli has not an official documentation. We are learning from Github issues, community articles and even from it’s source code.
We will have some pain, but tooling and libraries will become mature by time.
With the ASP.NET Zero 3.1 release, we aligned to latest changes and we are providing an up-to-date solution for modern web development.
Ahead Of Time (AOT) Compiling
This is a technique to compile your project on build (on deployment) to minimize runtime overhead of Angular. It makes your application faster loading and running. But it has some restrictions. For instance, it allows that only one root (bootstrap/entry) module in the project.
ASP.NET Zero had 2 root modules (app and account) which prevents us to use AOT compile. We introduced a new single RootModule which imports those 2 modules. So, that changed bootstrap code and module dependencies a lot. Our existing customers can see changes and latest version on our Github repository and apply changes them to their projects, either by recreating their projects or merging code bases.
We also configured our solution to have 3 lazy loaded modules as shown below:
Modules with dotted lines are being lazy loaded.
- RootModule is responsible to bootstrap the application.
- AccountModule provides login, two factor authentication, register, password forget/reset, email activation… functionalities.
- AppModule is just to group application modules and provide a base layout. It contains 2 sub modules:
- AdminModule contains pages like user management, role management, tenant management, language management, settings and so on.
- MainModule is the main module to develop your own application. It only contains a demo dashboard page which you can modify or delete. It’s suggested to divide your application into smaller modules like we did in the startup project, instead of adding all functionality into the main module.
There are also smaller shared modules in the solution.
We also configured solution to be able to use Hot Module Replacement (HMR) feature and upgraded to latest Angular 2 and Angular CLI.
We also upgraded major package dependencies, especially we upgraded to ABP v1.4.2.
In ABP v1.4, we introduced embedded view system which allows us to embed MVC controllers, MVC views, js files, css files, images and other resources into seperated modules, even into plugins. We are constantly improving the ABP framework and adding new features. Keep your solution up-to-date easily via updating nuget packages and see release notes to learn new features in every release.