Current development of Durandal NextGen is progressing well. It's a major set of breaking changes from the current 2.x series implementation, but it's going to result in greater power, better performance, enhanced tooling and many other benefits.
Is NextGen For Me?
If you are currently using Durandal 2.x, you may be wondering if you should plan to migrate when the NextGen implementation becomes available. Here are a couple of facts about the NextGen which you should consider:
- Supports Only Evergreen Browsers
- New Binding/Templating System (no more Knockout)
- Significant Breaking Changes
The new version will be the same Durandal in spirit, but there will be many implementation changes and a good deal of work to migrate code for existing apps. If your current app needs to support non-Evergreen browsers, then you won't be able to migrate to NextGen until you can lift that restriction.
Don't fear. If you can't or don't want to migrate to NextGen, be advised that the current 2.x version will be maintained for a long time.
If you plan to migrate to NextGen, there are a few things you can do today to make that transition easier on yourself.
The Observable Plugin
Knockout.Punches is a nice plugin to Knockout which extends Knockout's binding system with some convenient new syntax. There are three features in particular that are important:
- Embedded Text Bindings (aka text interpolation)
- Embedded Attribute Bindings (aka attribute interpolation)
- Text Filters
These changes will make your HTML binding expressions much more like Durandal NextGen. They'll also simplify your bindings and make things more readable overall.
Languages like TypeScript or the use of the Traceur Compiler, which both align heavily with ES6, will put you in a solid position for moving your codebase forward.
Plan for Durandal NextGen if you support only Evergreen browsers and can handle switching templating engines and other breaking changes. To minimize the porting effort, you can make some strategic moves now by enabling the observable plugin, using Knockout.Punches and adopting a class-ish approach to creating modules. If you can't or don't want to migrate to NextGen, don't sweat it! There will be ongoing support for 2.x.
Rob is an internationally recognized UI development expert. He is the creator of the Caliburn.Micro and Durandal projects and an Angular 2.0 and Angular Material Design team member.