Dust.js is a fast, robust and extensible template engine, with a simple syntax and an unobtrusive way of adding dynamic data to a body of HTML. This made it a natural contender to power DADI Web, which has been using it to render its pages and partials since day one.
But as we build DADI towards a universal set of web services it’s important that we make our products as flexible as possible, and that we remove any barriers to entry. Being asked to learn a new templating engine - or having to train a development team in one - is one of those barriers.
With the release of version 3.0 of DADI Web, published yesterday, we removed that barrier, making the tech capable of working with multiple template engines. We’ve decoupled any interaction with Dust from the core application and built an API for engines, resulting in modular engine implementations like the Dust.js adapter.
We’re working on new adapters to provide support for more engines, like Pug and Liquid. But even more exciting than that, we make it possible for developers to create their own adapters, which effectively means that Web can work with virtually any template engine. There’s a handy sample engine repository to help you build your own adapter. If you choose to do so, make sure to let us know, as we love to see all the cool things the community builds with the platform!
When migrating from version 2, there are some breaking changes to look out for. We’ve put together a migration guide to get you up and running in 5 simple steps.