|
DesignOverview
Design Overview of the wro4j
Featured The building blocks of the wro4j are the following elements: Model, Locators, Processors and WroManager. This diagrams is an overview of these elements.
This is a detailed description of each element: ModelModel is a way to describe resources: how are they grouped and ordered. The model allows you easily manage your application resources in a centralized way. By default, wro4j provides several options of creating a model: xml (more specifically wro.xml), groovy or json. It is very easy to extend the way the model is built. For example, if you don't like working with xml, you can provide a custom implementation which uses a properties files or a different DSL building a model. Alternatively you can build the model programmatically. Resource LocatorsLocators are used to retrieve the resources from virtually any possible location. By default, wro4j provides three locators:
Resource ProcessorsProcessors are the main workers in wro4j. They do the actual resource processing. A processing can be any kind of transformation. wro4j provides a lot of built-in processors like: css minimizers, js minimizers, css url rewriter, less Css parser, sass Css parser, jsHint javascript code analyzers. There are two types of processors:
The processors also can be categorized by supported type:
WroManagerWroManager is the heart of the framework. It performs all the flow:
This flow can be visualized in this drawing:
Extension PointsThe wro4j framework is very flexible. You can extend any of its core elements. For instance:
| |
This drawing was created with