img
Table 12-1. Spring JDBC Packages
Service Interface
Purpose
Related Domain Objects
Provide services for blog entry posting:
EntryService
Entry
Various searching function
·
Attachment
Retrieve a particular entry
·
Update operations
·
Attachment-related operations
·
Provide services for comment posting:
CommentService
Comment
Attachment
Retrieve all attachments for a particular entry
·
Update operations
·
Attachment-related operations
·
Provide services for security:
UserService
AppUser
Role
User maintenance
·
Role assignment
·
Provide housekeeping services:
Histories of Entry and
HousekeepingService
Comment objects
Purging of old entry and comment history records
·
Bear in mind that in application design, there is no definitely right or wrong approach. However,
there are better and worse designs. A good design should be easy to document and understandable by
both the technical team as well as the business analyst. Moreover, always think about flexibility,
maintainability, and trackability. Finally, make sure your service layer doesn't couple to any special type
of consumer.
Service Layer Summary
In this section, we discussed the issues you should consider when designing and building a service layer
for your Spring application. Then, by looking at the SpringBlog's service layer, we demonstrated how to
design the interfaces within the service layer by grouping operations for closely related domain objects
into the same service interface.
Summary
In this chapter, we looked at a lot of problems associated with traditional applications, and you saw how
Spring can help you solve these problems. We discussed a variety of problems that occur during
application development, and we looked at sensible ways in which these problems can be solved
effectively. Throughout the chapter, we examined how the practices we discussed were used when we
design the SpringBlog application.
Search WWH :
Custom Search
Previous Page
Spring Framework 3 Topic Index
Next Page
Spring Framework 3 Bookmarks
Home