img
reflects the classes and their relationship from a design point of view, without indicating the interaction
between the classes. Examples of static diagrams include use case diagrams and class diagrams.
Dynamic diagrams indicate how the classes collaborate and interact with each other to complete a
business flow. Examples include sequence diagrams, activity diagrams, collaboration diagrams, state
diagrams, and so on.
In this section, we will focus on using sequence diagrams to reflect the flow and the interaction
between the classes in the various application layers. In the following sections, we will discuss the
sequence diagrams of three main use cases within the SpringBlog application, including creating a blog
post entry, using RESTful-WS, and creating batch jobs.
Create Blog Post Entry
Let's take a look on the sequence diagram for creating a blog post entry, which is shown in Figure 21-9.
Figure 21-9. A SpringBlog sequence diagram: create blog post entry
In Figure 21-9, the sequence diagram shows the flow of the process of creating a blog post entry, as
well as the interactions between the main classes within each layer, from the presentation layer down to
the persistence layer. In this case, the JPA 2 implementation is used, and the flow is as follows:
The user logs into the SpringBlog application, creates a new entry, enters the
1.
information, and clicks the Save button. The browser will then submit a POST
request to the server.
Spring MVC's DispatcherServlet receives the request, analyzes the details of
2.
the HTTP request, and identifies the controller method to invoke. In this case,
the EntryController (under the package com.apress.prospring3.springblog
Search WWH :
Custom Search
Previous Page
Spring Framework 3 Topic Index
Next Page
Spring Framework 3 Bookmarks
Home