Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Spring (http://www.springsource.org/) is a non-intrusive framework that has gained prominence in recent years with its POJO (plain old Java object) approach to developing enterprise applications, which has resulted in increased productivity and ease of testing. In this chapter, we’ll discuss the basics of Spring’s Portlet MVC framework, which is Spring’s MVC framework for developing portlets. The Portlet MVC framework is designed around the same concepts as, and mirrors the classes and interfaces of, Spring’s Web MVC framework, which is used to develop servlet-based web applications. Developers who have prior experience in developing web applications using the Web MVC framework will find it easy to use.
The Spring Portlet MVC framework differs from other frameworks because it’s exclusively designed for developing portlets; it avoids the limitations that come with developing portlets in an existing web framework. Web frameworks are based on servlet technology, which doesn’t have the concept of lifecycle phases, so they end up hiding the different lifecycle phases of a portlet. With the Spring Portlet MVC framework you get not only a full-featured portlet framework that preserves the lifecycle phases of portlets, but also features like dependency injection, POJO-based development, and ease of testing, which are the cornerstones of the Spring Framework.