java enterprise edition jee core design patterns jee core
play

Java Enterprise Edition (JEE) Core Design Patterns JEE Core Design - PowerPoint PPT Presentation

Java Enterprise Edition (JEE) Core Design Patterns JEE Core Design Patterns Presentation Business Integration Tier Tier Tier Intercepting Filter Business Delegate Data Access Object Front Controller Service Locator Service


  1. Java Enterprise Edition (JEE) “Core Design Patterns”

  2. JEE Core Design Patterns Presentation Business Integration Tier Tier Tier Intercepting Filter Business Delegate Data Access Object Front Controller Service Locator Service Activator Context Object Domain Store Session Facade App Controller Web Service Broker Application Service View Helper Business Object Composite Entity Composite View Service to Worker Transfer Object Dispatcher View TO Assembler Value List Handler

  3. Front Controller Intent ● provide a single point for processing user requests http://java.sun.com/blueprints/corej2eepatterns/Patterns/FrontController.html

  4. Front Controller Motivation ● single processing point for all client requests – across views & session – can be used to inject cross-cutting concerns ● logging ● security ● separation of business code from presentation code ● provides logical resource mapping – http://server/resource.jsp – http://server/servlet/resourceController – actually we can map multiple requests to the same controller

  5. Front Controller Motivation ● reusability & organic growth – controllers can be specialized (sub-classing) – dynamically or declaratively mapped – what is declarative mapping – why do we care?

  6. Intercepting Filter Intent ● preprocessing & post processing of user requests http://java.sun.com/blueprints/corej2eepatterns/Patterns/InterceptingFilter.html

  7. Intercepting Filter Filter chain request request request controller filter1 filter2 response response response How is this different from pipes & filters?

  8. Intercepting Filter Motivation ● functionality injection ● improved reusability – filter chains can be defined in a number of ways ● declarative configuration Difficulties ● information sharing ● fault-tolerance

  9. Data Access Object (DAO) Intent ● abstract access to data repository http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html

  10. DAO - Example

  11. Concerns Mapping ● object to persistence mapping – identifier, foreignkey – object to single table – how do we map associations ● object to object ● object to list of objects ● object to map of objects – how do we map inheritance

  12. Concerns Mapping ● deletions – single object deletions are easy – deleting associated objects could cause violations ● mappers – allow to vary schema differently from object model

  13. DAO Mappers ● allow to vary schema differently from object model belongs id id User Group fname name lname

  14. DAO ER translates into ● tables, columns ● each table row represents an entity

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend