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
-
New TSS Article: Introduction to the Maverick Web Framework (20 messages)
- Posted by: Nitin Bharti
- Posted on: August 05 2003 10:16 EDT
Threaded Messages (20)
- Maverick project by Sean Sullivan on August 05 2003 12:25 EDT
- Good experiences by Sandeep Dath on August 05 2003 12:29 EDT
- Article is currently dead by roger day on October 20 2004 06:35 EDT
- maverick is easy! by Karmen Blake on August 05 2003 12:48 EDT
- maverick is easy! by Lars Fischer on August 06 2003 03:45 EDT
-
springframework by Ronald Fortin on August 06 2003 08:34 EDT
-
springframework by Kris Thompson on August 06 2003 09:14 EDT
-
springframework by S Kroah on August 06 2003 12:07 EDT
- springframework by Juergen Hoeller on August 06 2003 05:39 EDT
-
springframework by S Kroah on August 06 2003 12:07 EDT
-
springframework by Kris Thompson on August 06 2003 09:14 EDT
-
springframework by Ronald Fortin on August 06 2003 08:34 EDT
- maverick is easy! by Lars Fischer on August 06 2003 03:45 EDT
- gripe: where are the rich client /applet frameworks ? by Manish Sharan on August 05 2003 13:20 EDT
- gripe: where are the rich client /applet frameworks ? by S Kroah on August 05 2003 14:14 EDT
- Client Side Frameworks by Muhammad Sohaib Hamid on August 06 2003 08:16 EDT
- Domify by Rod Johnson on August 07 2003 05:19 EDT
- Domify by Henrique Steckelberg on August 08 2003 08:57 EDT
- JavaBean XML Serializers by Don Brown on August 08 2003 03:13 EDT
- very simple framework ... and it supports XSLT! by Mark Volkmann on August 05 2003 15:54 EDT
- maverick w/velocity by Nathan Bubna on August 05 2003 17:42 EDT
- Framework Use Cases by Nalla Senthilnathan on August 06 2003 13:28 EDT
- Framework Use Cases by Kris Thompson on August 06 2003 15:19 EDT
- Other Maverick's ( .NET Maverick and PHP Maverick) by Tomas J on December 04 2003 15:40 EST
-
Maverick project[ Go to top ]
- Posted by: Sean Sullivan
- Posted on: August 05 2003 12:25 EDT
- in response to Nitin Bharti
-
Good experiences[ Go to top ]
- Posted by: Sandeep Dath
- Posted on: August 05 2003 12:29 EDT
- in response to Sean Sullivan
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.
Sandeep. -
Article is currently dead[ Go to top ]
- Posted by: roger day
- Posted on: October 20 2004 06:35 EDT
- in response to Sean Sullivan
because of a database faiure. Which is a shame as I'd like to read it :-)
Roger -
maverick is easy![ Go to top ]
- Posted by: Karmen Blake
- Posted on: August 05 2003 12:48 EDT
- in response to Nitin Bharti
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. -
maverick is easy![ Go to top ]
- Posted by: Lars Fischer
- Posted on: August 06 2003 03:45 EDT
- in response to Karmen Blake
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 -
springframework[ Go to top ]
- Posted by: Ronald Fortin
- Posted on: August 06 2003 08:34 EDT
- in response to Lars Fischer
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? -
springframework[ Go to top ]
- Posted by: Kris Thompson
- Posted on: August 06 2003 09:14 EDT
- in response to Ronald Fortin
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). -
springframework[ Go to top ]
- Posted by: S Kroah
- Posted on: August 06 2003 12:07 EDT
- in response to Kris Thompson
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. -
springframework[ Go to top ]
- Posted by: Juergen Hoeller
- Posted on: August 06 2003 17:39 EDT
- in response to S Kroah
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.
Juergen
Spring Framework developer -
gripe: where are the rich client /applet frameworks ?[ Go to top ]
- Posted by: Manish Sharan
- Posted on: August 05 2003 13:20 EDT
- in response to Nitin Bharti
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 ? -
gripe: where are the rich client /applet frameworks ?[ Go to top ]
- Posted by: S Kroah
- Posted on: August 05 2003 14:14 EDT
- in response to Manish Sharan
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
SKroah -
Client Side Frameworks[ Go to top ]
- Posted by: Muhammad Sohaib Hamid
- Posted on: August 06 2003 08:16 EDT
- in response to Manish Sharan
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
http://www.jroots.com/ -
Domify[ Go to top ]
- Posted by: Rod Johnson
- Posted on: August 07 2003 05:19 EDT
- in response to Manish Sharan
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.
Regards,
Rod
Author, Expert One-on-One J2EE Design and Development -
Domify[ Go to top ]
- Posted by: Henrique Steckelberg
- Posted on: August 08 2003 08:57 EDT
- in response to Rod Johnson
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. -
JavaBean XML Serializers[ Go to top ]
- Posted by: Don Brown
- Posted on: August 08 2003 15:13 EDT
- in response to Rod Johnson
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 -
very simple framework ... and it supports XSLT![ Go to top ]
- Posted by: Mark Volkmann
- Posted on: August 05 2003 15:54 EDT
- in response to Nitin Bharti
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. -
maverick w/velocity[ Go to top ]
- Posted by: Nathan Bubna
- Posted on: August 05 2003 17:42 EDT
- in response to Nitin Bharti
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:
http://jakarta.apache.org/site/binindex.cgi
(you'll want to use the velocity-tools-view-1.0.jar)
Velocity Tools web site:
http://jakarta.apache.org/velocity/tools/index.html
(disclaimer: i'm the lead developer on the Velocity Tools project :) -
Framework Use Cases[ Go to top ]
- Posted by: Nalla Senthilnathan
- Posted on: August 06 2003 13:28 EDT
- in response to Nitin Bharti
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:
http://husted.com/struts/usecases.html
The users can then quickly make a decision as to which framework to adopt.
Nalla -
Framework Use Cases[ Go to top ]
- Posted by: Kris Thompson
- Posted on: August 06 2003 15:19 EDT
- in response to Nalla Senthilnathan
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.
Kris -
Other Maverick's ( .NET Maverick and PHP Maverick)[ Go to top ]
- Posted by: Tomas J
- Posted on: December 04 2003 15:40 EST
- in response to Nitin Bharti
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 ?)