News: New TSS Article: Introduction to the Maverick Web Framework

  1. In this introductory article, Kris Thompson looks at Maverick, a lightweight, simple to use web presentation framework based on the MVC design principle. Kris goes through the features of Maverick, examines the maverick.xml file, and walks you through the 4 types of Controllers using code samples. He also looks at optional features in Maverick such as support for Velocity and Domify.

    Read Introduction to Maverick

    Threaded Messages (20)

  2. Maverick project[ Go to top ]

    Maverick home page

  3. Good experiences[ Go to top ]

    I've had some excellent experiences with Maverick, especially with my smaller projects, where I no longer use my old default of Webwork.

    Its important to remember that Maverick doesn't have too many frills, so if you are looking for those, you might want to look elsewhere.

  4. Article is currently dead[ Go to top ]

    because of a database faiure. Which is a shame as I'd like to read it :-)

  5. maverick is easy![ Go to top ]

    after many hours of research and playing with Struts, WebWork, and Maverick, we decided to go with Maverick because it did not get in my way. It is simple and lets me work quickly. In addition, using it with Velocity has been fun too. Maverick and Velocity make a great combination.
  6. maverick is easy![ Go to top ]

    after many hours of research and playing with Struts, WebWork, and Maverick, we >decided to go with Maverick because it did not get in my way. It is simple and >lets me work quickly. In addition, using it with Velocity has been fun too. >Maverick and Velocity make a great combination.

    You should also give Spring a try: http://www.springframework.org
  7. springframework[ Go to top ]

    You should also give Spring a try: http://www.springframework.org

    Why? Please explain why I should look at Spring. Since this article is about Maveric, can you give us a comparison of Spring to Maveric?
  8. springframework[ Go to top ]

    Well for starters of a comparasion you could check this out on TSS, http://www.theserverside.com/home/thread.jsp?thread_id=20229. I haven't messed around with Spring myself...yet (its on my radar for sure).
  9. springframework[ Go to top ]

    Agreed this is off topic but you can't really talk about one web mvc framework in isolation these days and it helps to compare with ones that you know since they all aim to do basically the same thing.

    Expert J2EE by Rod Johnson has a good summary of the various web mvc frameworks out there, struts, webwork, maverick and his Spring framework. I would look there for details and comparisions. The end run of his comparision is to provide the motivation for developing his own web mvc implementation that addresses shortcomings in all of the "competitors"

    With that said the Spring framework is really a J2EE framework that provides a web mvc implementation that is layered on top of some core spring components, bean factory for example. The spring web mvc implementation is pretty nice in that user implemented classes are shielded as much as possible from the servlet api, making unit testing very easy with mock implementations of HttpServletRequest/Response. It is pretty much view agnostic as well a view can be a simple java bean that you pass the HttpServletReq/Res and ModelAndView objects to. This was nice for me as I have wireless clients that don't use a web view. Doing simple stuff like that in Struts is counterintuitive.
  10. springframework[ Go to top ]

    For a basic discussion of Spring's web MVC, especially in comparison to the respective programming models of Struts and WebWork, see this article on the Spring website.

    As Sean said, Spring is much more than a web framework. Its foundation is the IoC-style lightweight bean container, providing the means to wire up application objects and resources via XML bean definitions. On top of of this, Spring offers AOP support, transaction management, a JDBC abstraction framework, support for Hibernate and JDO DAOs, etc.

    Note that most parts of Spring can be used individually without hassle, as they are as loosely coupled as possible. You can easily use of a Spring middle tier with a different web framework, for example. Actually, numerous people are doing this with Struts and WebWork, mainly for existing applications.

    Regarding differences to Maverick: Spring offers a pretty rich web environment with a lot of conveniences, while Maverick tries to stay no-frills. The configuration of Spring's web framework happens via the same bean definition mechanisms as in the rest of the framework (controllers, view resolvers, etc are just special beans), while Maverick uses a special XML file.

    Maverick and Spring are very similar in terms of flexibility: Spring offers pluggable workflows and pluggable views too, and both reusable and throwaway controllers (although the former are the usual way). In contrast to Maverick, Spring treats command binding errors as non-fatal, making them available for evaluation in views (e.g. when binding a non-number to an int field).

    An important element of Maverick is the XSLT support via Domify. Spring offers similar support too, via its AbstractXsltView view type. You can subclass this by implementing a "createDomNode" method, creating a DOM Node from the given model via Domify, Castor, etc, or even manually.

    Spring Framework developer
  11. Maverick seems like a great framework; I find domify especially attractive, having been burnt with Cocoon once.

    Gripe: I have been looking for a client side (applet) framework and am yet to find one. Netbeans and Jesktop seem to heavy. Are there any resources on java client side frameworks ?

    Is everyone offloading every type of task to the server ? In my opinion tasks like report formatting or generating graph images or even PDF generation via FOP/iText etc. can be done better on the client side ( most clients do run Pentium 2 or bettter) leaving server to worry about db i/o etc. Am I being too stingly with server CPU ?
  12. It's off topic, and this is "the serverside" but I agree there is very little published about java client mvc frameworks. I think X Work part of Webwork 2 has a simple mvc command pattern type of implementation that could be used on clients. Have a look at it. http://wiki.opensymphony.com/space/XWork

  13. Client Side Frameworks[ Go to top ]

    Maverick seems like a great framework; I find domify especially attractive, having been burnt with Cocoon once.

    > Gripe: I have been looking for a client side (applet) framework and am yet to find one. Netbeans and Jesktop seem to heavy. Are there any resources on java client side frameworks ?

    check JRoots Application Framework
  14. Domify[ Go to top ]

    I have always liked the way Maverick is view-agnostic. (In fact, Maverick was one of the inputs into the initial design of the Spring MVC framework.)

    Domify--once part of Maverick, now a separate Sourceforge project--is a promising idea. I really like the concept of on-the-fly XML generation from JavaBean models. However, it seems that the Domify project is more or less stalled: no releases for almost 18 months. So I presume the problems with cycles haven't been addressed. Lots of verbose debug log statements without conditional checks in the Domify source are also a significant performance overhead.

    I think Domify is a valuable project in itself, not just to support Maverick. Any plans to revive it? I would like to reintroduce an XSLT view using Domify into Spring, but until the issues with Domify are addressed I don't want to have to support it.

    Author, Expert One-on-One J2EE Design and Development
  15. Domify[ Go to top ]

    I´ve seen on Gosling's blog over Java.net his comments on an API just for doing javabeans to XML conversion, java.beans.XMLEncoder. Could it be used in place of Domify? If so, maybe that's the reason Domify project has stalled.
  16. JavaBean XML Serializers[ Go to top ]

    There are actually a few JavaBean XML serializers. My project, stxx (http://stxx.sf.net), has its own serializer which only takes up a relatively few lines. Some of the others off the top of my head:
      Betwixt - http://jakarta.apache.org/commons/betwixt/
      JSX - http://jsx.org
      Castor - http://castor.exolab.org/xml-framework.html
  17. I really value simplicity and I find Maverick to be much simpler than other frameworks such as Struts, WebWork and Cocoon.

    I happen to be one of those rare people that prefer generating HTML with XSLT instead of JSP. Maverick provides excellent support for doing this!

    One of the knocks against the XSLT approach has always been that you have to write code to turn your data into XML in order to apply an XSLT stylesheet. Maverick eliminates that argument by providing domify, a utility that turns trees of Java objects into XML. Support for another library that does the same thing, JXV, has recently been added to Maverick.
  18. maverick w/velocity[ Go to top ]

    good introductory article! i've been curious about Maverick, but haven't had time to look into it.

    one thing though, when using Velocity with Maverick, the article says to use the velocity-tools-view-0.6.jar. Velocity Tools has since moved on to a 1.0 release (and quickly beyond). this includes improvements to the VelocityViewServlet. i'd recommend that those using Velocity with Maverick take the time to download the latest release of Velocity Tools project. the project also includes numerous other tools to make development (especially for the web) with Velocity even easier than it already is.

    Download release binary:
    (you'll want to use the velocity-tools-view-1.0.jar)

    Velocity Tools web site:

    (disclaimer: i'm the lead developer on the Velocity Tools project :)
  19. Framework Use Cases[ Go to top ]

    I think it would be useful if the MVC framework developers also included a set of use cases that their framework supports. For Struts we have:

    The users can then quickly make a decision as to which framework to adopt.

  20. Framework Use Cases[ Go to top ]

    I agree....sort of. I would rather like to see a independant group validate what usecases framework X does then to just accept what is stated on framework X's website. Maybe this could be something for the Wafer Project to take on. I have been looking for ways to improve that project and this is a good item. Thanks.

  21. I have not (yet) learned and used Maverick, but think it seems very interesting because there are ports to PHP and .NET too and it would really be nice if you only have to learn one framework instead of learning one framework for java, one for PHP and one for .NET

    Anyone here with experience of Java Maverick AND some of the other two Maverick's ?

    Is it essentially just the name of the framework and some basic concepts that has been reused or do these three frameworks really have the same classes and methods ?

    Does anyone know of any other web framework except from Maverick that is available for many programming languages ? (for example, is there any implementation of Struts for .NET or PHP ?)