SpringBlog's Layered Application Architecture
Before we dive into the implementation of each layer, let's take a higher-level look of the layers that we
are going to implement in SpringBlog. Figure 3-10 depicts the SpringBlog application's layered
architecture, and the following list describes the layers within SpringBlog application (from backend to
frontend):
Persistence layer: This layer interacts directly with the underlying persistence
data store (RDBMS in this case) and transforms the retrieved data into Java
domain objects for service layer use. For the backend database, an embedded
H2 database (www.h2database.com) will be used for easy deployment. However,
MySQL will be supported too, and instructions will be provided in the sample
application in case you want to use MySQL as the backend database.
Service layer: This layer is the core layer within the application. All business
logic will be implemented in this layer. Any application service request, no
matter from which channel it comes (for example, browser interface, RESTful-
WS request, batch job, and so on) should route through this layer to perform
the required business processing. For example, the validation of bean attributes
will happen here. Also, this layer relies on the persistence layer via DI for
database access.
Batch job and integration layer: This layer provides integration with external
parties. For example, it will poll for XML files (from a configurable folder
location) that contain blog entries from users and import them into SpringBlog
via batch processing. It interacts with the service layer for uploading blog
entries.
Presentation layer: This is the layer for the web application, which provides the
frontend for SpringBlog users. It also handles the RSS feed to generate XML
data to consumers. It interacts with the service layer for data processing and
business logic execution.
Security layer: The security layer protects those secure resources. For example,
anonymous users are allowed only to view blog entries. Login functions will be
provided, and role-based access will then be given to the users to ensure that
they can only access the functions assigned to the roles to which they belong.
Search WWH :
Custom Search
Previous Page
Spring Framework 3 Topic Index
Next Page
Spring Framework 3 Bookmarks
Home