Just thought I'd take the opportunity to thank everyone contributing to this
excellent framework. We are basing all our web work on Maverick now and have set
up a collection of components that work very well together that possibly others
could benefit from using. If anyone is interested, please let us know and well
post the code somewhere. Here's what we're using;
In the middle we have a PicoContainer in which we register both servlets and
controllers that make up our web application. We have patched the Jetty
slightly so that it collects servlets from the container rather than
directly. Although this is not in accordance with the Servlet spec, it allows
to have dependencies towards other components in the container that will be
Then we made a simple ControllerFactory that also collects controllers from
the PicoContainer so that our controllers also may have dependecies towards
various other components in the application, that will be injected
The recent addition of the ControllerFactory helped very much here. It is very
to be able to just specify any dependencies on other components in the
constructor and have them injected automatically.
Finally, we made a generic ScriptedController that accepts a <script> element
in the maverick.xml configuration. The scripted controller reads the script
out by the <script> element and compiles it to bytecode using the Pnuts library.
(actually ScriptedController has a dependency towards a ScriptEngine which is
satisfied by the PicoContainer, although the implementation we have currently
Pnuts). This allows us to have scripted controllers that are dynamically
when the script file on disk is modified. In addition, HTTP parameters are made
instantly available to the script as local variables, together with session and
application context variables. The scripted controllers are extremely compact
compared to their Java counterparts (on the expense of lack of IDE support)
and they're jst as fast (well pretty much anyway).
This small collection of components work extremely well for us, together with
Velocity. It is quite rewarding to sit down with our customers and just open
Notepad and modify a controller or a view and then refresh the web page to see
the changes immediately, in run-time without restarting anything. We may combine
regular Java controllers with scripted controllers if we like.
So, if anyone is interested let us know. Perhaps a toolbox project for Maverick
should be created somewhere where helper components may be posted?
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.