The Application of Architectural and Design Patterns in Enterprise Systems

The Application of Architectural and Design Patterns in Enterprise Systems

The Application of Architectural and Design Patterns in Enterprise Systems By Seamus Kelly Dissertation submitted to Sligo Institute of Technology in partial fulfilment of the requirements for the M.Sc. in Computing September 2005 Dr. Kate O’Dubhchair Project Supervisor ACKNOWLEDGEMENTS.................................................................................................................IV ABSTRACT............................................................................................................................................ V CHAPTER 1: INTRODUCTION...................................................................................................1 1.1 Background...........................................................................................................................................1 1.1.1 Enterprise Applications................................................................................................................ 1 1.1.2 Design Patterns............................................................................................................................. 1 1.1.3 Java 2 Enterprise Edition (J2EE)..............................................................................................2 1.1.4 J2EE Technologies.......................................................................................................................2 1.2 Aim s ..........................................................................................................................................................6 1.3 What this project is n o t ............................ 7 1.4 Development and Production Environm ent...........................................................................8 1.5 Su m m a r y ............................................................................................................................................... 9 CHAPTER 2: LITERATURE REVIEW.................................................................................... II 2.1 Patterns................................................................................................................................................11 2.2 P attern Catalogues........................................................................................................................11 2.2.1 Gang o f Four Patterns......................................................... ...................................... 12 2.2.2 Sun's Core J2EE Patterns......................................................................................................... 14 2.2.3 Other Enterprise Pattern Catalogues.................................. 17 2.3 Architectures for Web Appi jcations......................................................................................18 2.3.1 JSP Model 1 Architecture....................................................................................... 19 2.3.2 Model- View-Controller Architecture......................................................................................19 2.4 Patterns and Fram ew orks........................................................................................................... 22 2.4.1 The Struts Framework.................................................................................................................22 2.4.2 JDeveloper ....................... 23 2.4.3 Oracle Application Development Framework .............. 24 2.5 M odel Driven Architecture (M DA) .................................... 27 2.5.1 What is M DA?.............................................................................................................................. 27 2.5.2 Agile MDA.....................................................................................................................................29 2.6 OptimalJ and M D A ...........................................................................................................................29 2.6.1 OptimalJ Models.......................................................................................................................... 30 2.6.2 OptimaU Patterns...................................................... 31 2.6.3 OptimalJ Application................................................ 34 2.1 JDeveloper and MDA ...................................................................................................................... 34 2.8 Archetype P atterns.........................................................................................................................35 2.8.1 Archetype Pattern Catalogue...................................................................................................35 2.8.2 Money Archetype Pattern................................... 36 2.8.3 Archetype Patterns and MDA...................................................................................................37 2.9 S u m m ary ...............................................................................................................................................38 CHAPTER 3: DEFINING THE DEMONSTRATION APPLICATION.................................39 3.1 The Problem Sta tem en t.................................................................................................................39 3.2 U se Cases.............................................................................................................................................. 40 3.3 The Entity M o del..............................................................................................................................42 3.4 Su m m a r y .................................................................... 42 CHAPTER 4: TEACHING EJBS AND PATTERNS................................................................43 4.1 EJB COMPONENTS................................................................................................................................. 43 4.1.1 Naming convention............................................................................................................ 44 4.2 Session Beans...................................................................................................................................... 44 4.2.1 Stateless Session Beans.............................................................................................................. 44 4.2.2 Remote and Local Clients............................................................................... 49 4.2.3 The EJBObject.............................................................................................................................. 50 4.2.4 The Deployment descriptor....................................................................................................... 50 4.2.5 Stateful Session Beans............................... .51 4.3 Entity Beans .......................................................... 54 4.3.1 Bean Managed Persistence (BMP) .... 54 4.3.2 Refactor with Patterns.............................. .59 4.3.3 Primary Key Block Generator Pattern.... 60 4.3.4 Data Access Object Pattern...................... .61 4.3.5 Container Managed Persistence (CMP) . .62 4.3.6 EJB Query Language (EJB QL).............. 66 4.3.7 Remote Method Calls................................ 66 4.3.8 Transfer Object Pattern............................ 68 4.3.9 Session Facade Pattern............................. .68 4.3.10 Service Locator Pattern............................ 69 4.4 Message-Driven Beans (MDBS) ....... 69 4.4.1 Service A cti vat or Pattern.......................... 70 4.5 S u m m a ry ................................................................. 70 CHAPTER 5: THE APPLICATIONS. 71 5.1 The M essage Pro d u cer...................... -.. 71 5.2 The M ain Applica tio n ........................................... 71 5.3 The M o d e l.................... ............................................ 72 5.3.1 The Message Consumer................... 72 5.3.2 Container Managed Relationships (CMRs)., 73 5.3.3 The Portfolio as a Stateful Session Bean..... 77 5.4 The Controller....................................................... 78 5.5 The Vie w ...................................................................... 80 5.5.1 Composite View pattern................................. 80 5.5.2 Value List Handler pattern............................ 81 5.6 The Wireless Clien t............................................... 81 5.7 Su m m a r y ........................................................................ 83 CHAPTER: 6 CONCLUSIONS........................... 84 6.1 A i m s .................................................................... .84 6.2 D e p l o y m e n t .................................................... .85 6.3 A r e a s o f Fu rth er R e s e a r c h .. .86 6.3.1 The Application as a Learning Tool.. .86 6.3.2 OptimaU and Archetype Patterns...... .86 6.3.3 Wireless Clients................................... .87 6.4 Su m m a r y .......................................................... .87 REFERENCES. ,88 APPENDIX A CHAPTER 4 CODE. ..91 APPENDIX B CHAPTER 5 CODE. 118 APPENDIX C CONFIGURATION FILES.... 143 APPENDIX D WIRELESS CLIENT............. 152 APPENDIX E OPTIMALJ APPLICATION.. 154 J2EE Components.................................................................. ..2 GoF Pattern Catalogue........................................................... 12 Core J2EE Pattern Catalogue ................................... 17 Simple JSP Application......................................................... 18 JSP Model 1 Architecture.....................................................

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    155 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us