In-context Preview Refactor

Current Preview Configuration

Seam Crafter Modes
In-Context Preview

Related

Understanding the Servlet Pipeline

Refactor

This document serves as the design and documentation for a refactored in-context preview set-up. The Seam based Crafter package has supported a full in-context preview including virtualized content, static-assets and facelets for several years. Crafter is continuing to pick up additional presentation layers including JSP and Grails. We intend to refactor the in-context preview to accomplish the following objectives:

  • Simplified approach and configuration
  • Sharable across all presentation subsystems
  • Fully support authoring integration
  • Ensure Crafter delivery, preview and authoring are agnostic concerning application context
  • Detailed documentation on design, mechanics, installation and configuration.

High-level approach

  • Note that the purple boxes annotate for required configuration
  • The green boxes are replacements for components previously handled by plug-ins to the servlet pipeline

Docroot Servlet

The purpose / reason for including a docroot servlet is to virtualize the ability to serve static assets. This allows us to manage and deploy images, flash, JS, CSS and so for with-in and from Alfresco or other repositories. Additionally we are able to serve static assets from Disk from outside a war file in development mode without requiring a user to install and configure a web server and connector or having to copy assets in to the war.

Preview filter and use of thread local

The thread local is used to communicate information and objects like the request to objects deep within the stack like the repository adapter implementation which otherwise has no means of acquiring this information. The thread local should be set up early in the request processing and cleaned up before returning the thread to the thread-pool from within a finally block.

Virtualizing template systems

Sometimes tricky but very important. We have proven with Facelets, Fremarker, Quercus PHP and several other presentation layers that it is possible to virtualize the serving of templates and thus allow for the management and deployment of templates from the repository. This is a win-win for developers and web producers alike.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.