Fork me on GitHub

Apache Request microframework project

Tiles has served the purpose of rendering views for the Model-View-Controller pattern in JavaEE for years.

Tiles-3 introduces a complete standalone and super simple abstraction around request/response objects.

We've all seen that the various technologies like Servlet, Portlet, JSP, Velocity, FreeMarker seem to have a different abstraction of a common pattern. They all have a concept of:

  • request: the client request, or some sort of it;
  • response: the response to send to the client, or to the caller, with a writer/output stream to write into;
  • attributes: usually maps (or map-like structures) with string keys and object values;
  • scope: places where different attribute maps are stored (request, session, etc.)

Now all of these scopes are concentrated into "Request" interfaces, that acts as a single point of reference for the developer. In theory, everything you need for rendering a view can be obtained by an object that implements Request, and Request implementations can be built that do not rely on an application server environment.

Currently there are bindings for Servlet, Portlet, JSP, Mustache, Velocity and FreeMarker.