April 05
Prof. Ismael H. F. Santos -  ismael@tecgraf.puc-rio.br                                                          2
Service Layer
• Where do we position loosely-coupled business logic? What is service logic?
• How should container level services be implemented?
• How do we support transactions in a POJO based application?
• How do we communicate from our presentation layer to our persistence layer?
• How do we get to services that contain business logic?
• How should our business objects communicate with our persistence layer?
• How do we get objects retrieved from our persistence layer to our UI layer?
There are typically four layers within a web container:
A presentation layer that concentrates on request/response actions which handles UI.  Typically uses an MVC framework.
A business service layer to  manage transactions and business logic.  This is usually not addressed in many applications today or tightly coupled in an inappropriate layer.
A persistence layer to communicate with a back-end relational database.
A domain object model that can be used across all layers.