130 likes | 256 Views
E137 Case Study: Developing Enterprise Applications using J2EE Design Patterns. Raghu Premkumar Senior Systems Analyst Option One Mortgage Corporation Rpremkumar@oomc.com Jim Kawanami Sybase, Inc. Jim.Kawanami@Sybase.com. Outline. What is a Pattern? Objective Design
E N D
E137Case Study: Developing Enterprise Applications using J2EE Design Patterns • Raghu Premkumar • Senior Systems Analyst • Option One Mortgage Corporation • Rpremkumar@oomc.com • Jim Kawanami • Sybase, Inc. • Jim.Kawanami@Sybase.com
Outline • What is a Pattern? • Objective • Design • Interactive Demo and Code • Issues • Related J2EE Patterns • Q&A
What is a Pattern? From “Core J2EE Patterns – Best Practices and Design Strategies” (Alur, Crupi, and Malks) Patterns are about communicating problems and solutions. …patterns enable us to document a known recurring problem and its solution in a particular context, and to communicate this knowledge to others. …the goal of the pattern is to foster conceptual reuse over time.
What is a Pattern? Architectural Patterns vs. Design Patterns Architectural Pattern example: • Model-View-Controller Design Pattern examples: • Service Locator, Front Controller, Observer
MVC Architectural Pattern (Applied) Another EJB Request Front Component Session Bean Jaguar NVO Java Bean HTML JSP View Components Tag Library EJB and Component Tier Web Tier
Objective Provide an efficient, generalized means to support EJB lookup and creation accessible by different client types. “Use a Service Locator object to abstract all JNDI usage and to hide the complexities of initial context creation, EJB home object lookup, and EJB object re-creation. Multiple clients can reuse the Service Locator object to reduce code complexity, provide a single point of control, and improve performance by providing a caching facility.” - Core J2EE Patterns
Design The Service Locator pattern may be readily extended Key features in our implementation include: • Reflection • Collection to store EJB references • ???
Issues Issues encountered in implementing our Service Locator Some points to consider in designing your Service Locator classes: • Missing EJB reference in collection • EJB handle in use • “Recycling” handles
Related J2EE Patterns Other relevant and related Design Patterns These patterns should also be considered in the application architecture to create the completed design: • Observer • Session Facade • Strategy
Headings are Ariel Black 28 pt. Subhead goes here, Ariel Bold, 26 pt. Body Copy is Times New Roman, 26 pt • First Level Bullets, Times New Roman, 26 pt. • Bullets are orange • Third Level Bullets
Color PaletteTitle can go to two lines Please choose from this color palette when highlighting text or graphics. Arrow Styles