Dust is Java-based web framework built around components, templates and JAX-RS.
Reusable modules Components, pages and assets all live in reusable namespaces.
Your markup, your style Templates are fully customizable, with full control over your markup.
Custom structure You control the URLs of your pages and what HTTP requests they handle.
Extensible Extend your app with things such as components, asset processors and more.
Built for speed Templates are blazing fast and the rendered markup is automatically minified.
Developer friendly The dev mode enables a compile-refresh workflow with early error detection.
Quick start or read Getting started
Dust lets you combine a page
@Path("/hello")
@Template
public class HelloPage {
private String name;
@GET
public HelloPage get(@QueryParam("name") @DefaultValue("Unknown") String name) {
this.name = name;
return this;
}
public String getName() { return name; }
}
with a template
<!DOCTYPE html>
<html>
<head>
<title>Hello ${name}!</title>
</head>
<body>
Hello ${name}! Your name is ${name.length()} characters.
</body>
</html>
which would then be accessible at /hello.
Templates can reference components
<body xmlns:d="dust:common">
<d:if test="${name == 'Cookie monster'}">
Your name is awesome!
</d:if>
</body>
can easily be localized
<body xmlns:m="dust:messages">
${m:hello} ${name}!
</body>
// TemplateClass.messages - defaults
hello=Hello
// TemplateClass.sv.messages - Swedish
hello=Hej
and come with a great expression language
<link href="${app:asset('style.css')}" rel="stylesheet" type="text/css" />
<a href="/${d:urlencode(name.trim())}">${name}</a>
<span d:if="${name.length() lt 5 and name.length() gt 2}">${m:name} ${name}</span>