Spring MVC
Currently there are many web frameworks on the market, and each has its pros and cons. Standardizing
on a single framework and hoping it can address all the requirements of web applications with different
natures and business purposes is almost impossible.
In SpringBlog, we will implement the web layer using a more common and simple approach. The
MVC pattern will be adopted, and Spring MVC will be used as the framework. On the view side, we will
use standard JSP pages. For Ajax features, we will use jQuery JavaScript library and Spring MVC's
comprehensive RESTful-WS support for implementation. Details will be covered in Chapter 17.
Using Tiles
With most web applications, only a portion of the screen changes each time a new request is processed,
and common elements such as the header and navigation bar remain the same. Using Tiles, you can
assemble your pages from individual parts called tiles, enabling common elements to be defined once
and reused across the application. Chapter 17 looks at using Tiles with a Spring application and shows
how we used Tiles to build the sample application.
RESTful-WS and OXM
Another feature that Spring provides is an RSS feed in XML format. To accomplish this, we will use
Spring MVC's RESTful-WS and Object to XML Mapping (OXM) support. For XML marshaling and
unmarshaling, we will use Castor (www.castor.org). Other XML binding frameworks that Spring supports
include JAXB, XStream, and XMLBeans. This will also be covered in Chapter 16.
Implementing the Security Layer
Security is another major concern for any application, especially web applications. Without a proper
security control, your web application may suffer from web attacks and loss of important business data.
The Spring Security (formerly called Acegi Security Framework for Spring) is almost the default
security framework for Spring-powered applications. Its comprehensive support for both declarative
and programmatic security access control and tight integration with Spring greatly simplifies the code
developers need to implement. For the SpringBlog application, we will use Spring Security 3.1 to protect
the web application and ensure that users are only allowed to do what they are granted to do based on
the roles assigned. We will cover Spring Security in Chapter 16 and 17.
As the user information and their roles assigned are stored in SpringBlog database, we will
implement a user detail service class for Spring Security to retrieve the information and apply the
security measures accordingly.
Summary
In this chapter, you looked at the SpringBlog application that we discuss throughout the topic, and
you were introduced to various features of SpringBlog, how they are implemented, and where in
the topic they are discussed.
In the next chapter, we will discuss the core of the Spring Framework--its Inversion of Control (IoC)
container. Chapter 4 extends the examples we covered in Chapter 2 and discusses the different kinds of
IoC and how they are supported in Spring.
Search WWH :
Custom Search
Previous Page
Spring Framework 3 Topic Index
Next Page
Spring Framework 3 Bookmarks
Home