What is this book about?
Today, an abundance of MVC frameworks - each with its own pros and cons - plague a web-developers decision to choose one. Out of them, frameworks like Struts, Webwork and Maverick are deemed as request-driven frameworks, where as JSF and Tapestry are deemed as component-driven frameworks. Request-Driven broadly means, that the framework does not hide the HTTP-ness of the web world, but provides absractions that can simplify your job to handle them. Component-Driven means, that the web-framework seeks to hide the HTTP-ness, and provides the developer with an abstraction equivalent to Swing programming. Both types of frameworks have their own advantages and disadvantages. Spring MVC falls into the request-driven web frameworks category.
In my career, i have worked with many web frameworks. Out of all of them, i prefer Spring MVC for the following reasons
1. It has access to the full power of the Spring IoC and AOP container.
2. It is very well architected and brings true seperation of model, view and controller better than any other framework out there.
3. It is highly customizable.
4. It is interface driven, and doesnt force you to extend any framework classes.
5. It is easily testable - both unit and integration tests.
6. It helps apply good OO principles to the web-tier.
7. It provides easy-to-use template implementations of basic workflows.
8. It provides support for various view types(JSP, Velocity, Freemarker, etc) and completely decouples this support from other parts of the MVC.
9. It provides an exhaustive set of interface based hooks that one can customize or freshly implement for their own purposes.
10.And many more...
The above list is by no means exhaustive. So, i sincerely suggest to consider this framework if you are researching on an MVC implementation for your next project.
This book is all about Spring MVC and a sub-project called Spring Web Flow (SWF). Now, that you know what Spring MVC is, and where it fits into the plethora of available web-frameworks, you might be wondering what SWF is. Is it yet another web-framework that Spring supports? Is it a seperate implementation of Spring MVC? Is it something else? These kind of questions might come up, and i had all these questions in mind when spring announced SWF.
Anyways, SWF attacks a different problem. It is a seperate and self-contained framework, where you can define flows. Each flow is potentially a conversation between the user and the server over multiple pages and requests. The flows can be defined declaratively, and integrated with the MVC framework of your choice for execution. Spring MVC, Struts, JSF, Portlet MVC are supported out-of-the-box, but it is easy to implement an integration for your favorite framework.
How this book does it?
There are quite a few spring framework books around, that covers the entire framework. Sadly, none of those books gives Spring MVC enough importance and coverage is decent at best. Those books are geared towards covering the IoC and AOP features in-depth and finally when the book reaches the MVC section, they just breeze past it, not giving us enough practical ways to use it.
That is where this book comes in. This book takes from where other spring books leave and covers the entire Spring MVC framework in-depth. The author's writing skill is fabulous. You will be turning pages, before you even know. Typically, when you learn a new topic, you dont want to get into the details out-right. You want a complete mental picture first, then dive into details. That is exactly what the author does. He takes a topic and explains the overall picture in a couple of paragraphs. This first gives you the idea and scope of that topic. Then the author revisits the topic to explain it in depth with examples. I liked this approach very much. Trust me, I have read many spring books before, this one covering Spring MVC the best.
That said, this book is not for developers who are not familiar with spring. You should know Spring's IoC container, AOP, and other basic features before you can make sense out of this book. The author devotes one full chapter to provide a brief introduction to spring. That may be enough, but to be really confident, it is better if you first learn spring. I would suggest Pro Spring for that. Read my "Pro Spring" review for more information.