Saturday, April 25, 2009

Spring MVC

For my first independent study, I've decided to explore Groovy + Grails. When looking into Grails, I found that much of the web-related functionality is built on Spring MVC. While my primary web framework has been WebWork/Struts 2 over the past couple of years, I thought it might benefit me to look more into Spring MVC as Grails is built on top of it. Also, Spring MVC has been around for a while and seems to have a healthy community behind it.

While reading through their documentation, I found the following interesting statement from Spring's online documentation:

Compared to WebWork, Spring has more differentiated object roles. It supports the notion of a Controller, an optional command or form object, and a model that gets passed to the view. The model will normally include the command or form object but also arbitrary reference data; instead, a WebWork Action combines all those roles into one single object. WebWork does allow you to use existing business objects as part of your form, but only by making them bean properties of the respective Action class. Finally, the same Action instance that handles the request is used for evaluation and form population in the view. Thus, reference data needs to be modeled as bean properties of the Action too. These are (arguably) too many roles for one object.
It always interesting to hear the different philosophies and ideas that went into the development of a web framework and hear how their developers feel about other similar frameworks.

Related Links

0 comments: