Pure EJB within an Agile Context
       Atlanta BEA dev2dev User Group
          Monday. October 10, 2005




            ...
07/07/09




                Questions:
                    What do we mean by Pure EJBs?
                    Can you make...
07/07/09
                                                                                Overview

                Overvie...
07/07/09
                                                                               Agenda

                Agenda:
  ...
Architecture
07/07/09
                                          Architecture – Assumptions, Drivers, Constraints and Challenges

      ...
07/07/09
                                                Architecture - Components

                Architecture – Compone...
07/07/09
                                                                                       Architecture – Design Patt...
07/07/09
                                                      Architecture – Proxy Pattern and Session Facade

          ...
07/07/09
                                                        Architecture – Data Access Object with Hibernate

       ...
07/07/09
                         Architecture – Sequence Diagram




Atlanta BEA User Group                              ...
07/07/09
                                                                   Architecture – Key Success Factors

          ...
Development
  Tool Set
07/07/09
                                                Development Tool Set – Assumptions, Drivers, Constraints

       ...
07/07/09
                                                                     Development Tool Set – Challenges

         ...
07/07/09
      Development Tools
         Eclipse
                Multiple Projects
                Using Mevenide Plug-in...
07/07/09
                                                                                  Development Tool Set - Lifecycl...
07/07/09
                                                                         Development Tool Set - Maven

          ...
07/07/09
                                                                                Development Tool Set – Maven and ...
07/07/09
                                                Development Tool Set – Maven Website Screen Shot

               ...
Continuous
Build Process
07/07/09
                               Continuous Build Process – Assumptions, Drivers, Constraints and Challenges

     ...
07/07/09
                                                                             Continuous Build Process

          ...
Summary
07/07/09




                Partner with BEA Professional Services
                Leverage BEA Support
                S...
Take Away
Tips/Hints
07/07/09
      Maven Details

                Maven in 3 concepts:
                    POM (Project Object Model)
        ...
07/07/09
                         Maven POM Example




Atlanta BEA User Group                  28
07/07/09
                                                                            Cruise Control Details

             ...
07/07/09
                                                                                                 Cruise Control S...
Upcoming SlideShare
Loading in …5
×

Pure Ejb Within An Agile Context

744 views

Published on

Topic Presented to BEA User's Group, October 2005

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
744
On SlideShare
0
From Embeds
0
Number of Embeds
15
Actions
Shares
0
Downloads
12
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Pure Ejb Within An Agile Context

  1. 1. Pure EJB within an Agile Context Atlanta BEA dev2dev User Group Monday. October 10, 2005 Presented by: Noam Bunder Sekhar Atteri Larry Williams Version 3.0
  2. 2. 07/07/09 Questions: What do we mean by Pure EJBs? Can you make EJBs work in an Agile Methodology? Where do new frameworks fit in (Spring, etc.)? Can you use Eclipse and Workshop in harmony? What benefits do you get from Continuous Builds? How does Hibernate fit in? What does Maven bring to the table? Atlanta BEA User Group 2
  3. 3. 07/07/09 Overview Overview: Combining a plain-vanilla Enterprise Java implementation, with the processes and tools common to Agile methods. Based upon WebLogic Portal, this session shows how to leverage Eclipse, Maven, CruiseControl and Hibernate for efficient development. We will review the architecture and development process, as well address challenges with the approach. Atlanta BEA User Group 3
  4. 4. 07/07/09 Agenda Agenda: 7:00pm – 7:30pm: Review the Architecture 7:30pm – 7:45pm: Present Development Tool Set 7:45pm – 8:00pm: Describe Continuous Build Process 8:00pm – 8:30pm: Q & A / Open Discussion Atlanta BEA User Group 4
  5. 5. Architecture
  6. 6. 07/07/09 Architecture – Assumptions, Drivers, Constraints and Challenges Architecture Assumptions Will be hosted as an ASP model, thus it must server multiple customers, with different load and customization demands Must be understood, will be adopted company wide for new product suite Drivers Keep it Simple and Flexible Leverage Existing, Proven Technology and Design Provide a Foundation that is Extensible Constraints Interoperability with Legacy System Time – Product to be delivered to customer for UAT within 5 months Management Directive: Scrum Process Challenges Ramp Up and Integration of Tool Set and Deployment Model Managing Risks with Key Partners/Software Vendors Atlanta BEA User Group 6
  7. 7. 07/07/09 Architecture - Components Architecture – Component View Atlanta BEA User Group 7
  8. 8. 07/07/09 Architecture – Design Patterns Key Design Patterns Proxy Pattern Client Agent hides EJB Invocation Session Facade Aggregates Business Services DAO Pattern Abstracts Persistence Strategy Client Data Agent Access Object Portal Application Factory Server Factory Session Portal Java Client Business Data Facade Servlet PageFlows Agent Services Access Object (EJB) Presentation Tier Hibernate Middle Tier Value Data JSPs Transfer Objects Objects Oracle Data Tier Atlanta BEA User Group 8
  9. 9. 07/07/09 Architecture – Proxy Pattern and Session Facade Facades add a layer of abstraction to the architecture allowing application and business semantics to be reflected in the Façade’s public methods A Façade is an “agent” of the client running co-resident with services Provide an application-friendly broker that will aggregate service invocations Although they execute on the server within the EJB Container, Facades are designed to serve as brokers for the web-tier clients (i.e., client agents) Facades can be an effective tool to minimize web-tier calls into the EJB-tier Facades should only contain lightweight logic delegating heavy-weight logic to collaborating business service component Facades should have some structural form to provide standard processing for each method Pre-Call Validation Call Sequencing Post-Call Validation DTO Building Atlanta BEA User Group 9
  10. 10. 07/07/09 Architecture – Data Access Object with Hibernate Resource access objects must accommodate both transactional and non-transaction semantics Resource access objects should serve the purpose of insulating the architecture from the technical nuances of the external resources Resource Access Objects vend business objects to the services layer and interact with RDBMS systems or web service providers using the native protocols of the external resource Resource access objects come is different types Database Access Objects Web Service Access Objects JMS Access Objects Access objects should be hidden behind a service object, Façade components and presentation-tier components should never create direct references to access objects DAOs are implemented using Hibernate Hibernate manages the mapping between the business domain model and the underlying relational database structure Hibernate exposes a suite of CRUD APIs to the service layer allowing service methods to create, retrieve, update, or delete business objects as needed Atlanta BEA User Group 10
  11. 11. 07/07/09 Architecture – Sequence Diagram Atlanta BEA User Group 11
  12. 12. 07/07/09 Architecture – Key Success Factors Begin Early with Domain Model Fit Database Schema to Object Model in a reasonable fashion Both a blessing (huge time saving) and a curse (making changes to the db model to make it work for java applications) Partner with BEA Professional Services Early for prototype, Midway for review and End for deployment Leverage BEA Support Get the best developers you can find Three or Four Senior Leads Have finely controlled Architectural Constraints. Clear cut responsibilities for each package means faster time from use case to implementation Invest Time enforcing Code Reviews Atlanta BEA User Group 12
  13. 13. Development Tool Set
  14. 14. 07/07/09 Development Tool Set – Assumptions, Drivers, Constraints Assumptions Provide Developers with a Productive Development Environment without compromising the End Product Architecture Leverage Tools associated with Agile Methodologies (i.e. Scrum) Development Tools will provide “easy-entry” for new Developers Drivers Support largest range of possible Java related technologies, while staying as close as possible to mainstream Enterprise Java Leverage WebLogic Portal for Branding and Personalization Leverage Eclipse for Development Ease and Speed Leverage Hibernate for Time to Market and Reduced Database Dependency Leverage Cactus for In-Container Testing Script and Automate as much as possible to reduce human error Provide visibility to Development to close loop - MTTBF (Mean Time to Bug Fix) Constraints Minimize reliance on WebLogic Workshop to be replaced by Eclipse by Q4 2005 Scrum process does not allow for abundance of documentation Atlanta BEA User Group 14
  15. 15. 07/07/09 Development Tool Set – Challenges Challenges Development Environment requires precise configuration Big lettered Slides have been successful in assuring compliance ½ Day walkthrough required to get new developers up and running A “Development Core Image” does not provide everything The installation of Maven (1st running) must occur within the User Profile, where it builds its local repository Working with a WebLogic Portal Project required some components to not be checked in to StarTeam, complicating a fresh-pull of code Developers can “debug through” Back End code when exercised by Unit Tests, however Front End developers cannot debug Back End code, for it is compiled and copied into APP-INF/lib Unit Tests are insufficient and can be sloppy. Although Code compiles, Unit Tests hog memory and can interrupt continuous build cycle Atlanta BEA User Group 15
  16. 16. 07/07/09 Development Tools Eclipse Multiple Projects Using Mevenide Plug-in Maven Manages Dependencies Produces Web Sites Runs Build, Tests and Metrics WebLogic Workshop Using JARs copied by Maven PageFlows expose Business Logic Hibernate HBM files with associated code Cactus Exercised by Maven Plug-In Atlanta BEA User Group 16
  17. 17. 07/07/09 Development Tool Set - Lifecycle Lifecycle: Code > Build > Test > Deploy • Cactus Unit Testing Eclipse • • Integration Testing Profiling Code, Build and Test Maven Build, Test and Deploy Eclipse Responsibility Space Code Build Test Deploy Maven Responsibility Space • Source Generation • Doc. Generation • Compilation • Artifact Trending • Dependant Projects • Project Website • Resource Dependencies • Notification • Artifact Generation Atlanta BEA User Group 17
  18. 18. 07/07/09 Development Tool Set - Maven Maven Build Acts like a “Container” providing Services Task Services for Build = Goals and Plug-Ins Calls Maven does not equal ANT ANT is not multi-project and dependency aware Developed ANT Tasks Goes Beyond ANT to Provide a Multi-Project Build Script Manages Dependencies via Local and Remote Repositories Integrates into Eclipse (Development IDE) Provides Automated Quality and Unit Tests Build Provides a Multitude of Plug-Ins Generates Reports (Web Site) Maven Maven Built-In Goals and Plug-Ins Atlanta BEA User Group 18
  19. 19. 07/07/09 Development Tool Set – Maven and ANT ANT and Maven within the Build Process ANT ANT Back End Front End Label Deploy/ Un-deploy Code Code StarTeam Configure coreejb pageflows MAVEN / Cactus Copy to web project StarTeam infr portal Development QA Smoke BUILD EAR EAR FILE core ANT coresupport QA Smoke QA Server ANT Atlanta BEA User Group 19
  20. 20. 07/07/09 Development Tool Set – Maven Website Screen Shot Cactus Unit Test Cases Report Atlanta BEA User Group 20
  21. 21. Continuous Build Process
  22. 22. 07/07/09 Continuous Build Process – Assumptions, Drivers, Constraints and Challenges Assumptions Agile Methodology (Scrum) to be followed, requiring daily status Development will include Iterative Integration and Testing Drivers Provide visibility and proper focus to development Reduce down time between compile-breakages Focus improvement upon realistic and objective metrics Constraints Tools do not extend fully into Workshop files (JPF, etc.) Unit Testing not emphasized (green = good compile only) Challenges Lack of discipline around Cactus Tests made for long-build times (~15 minutes) Stability issues Atlanta BEA User Group 22
  23. 23. 07/07/09 Continuous Build Process Separate Developer Workstation Running Simple HTTP Server WebLogic Portal CruiseControl scheduled to kick-off build every 20 minutes Green Light / Red Light via X10 devices Timed to run every 20 minutes, 6:00am – 10:00pm Scheduled Build at 2:00 AM Prepares build for QA (optional) Atlanta BEA User Group 23
  24. 24. Summary
  25. 25. 07/07/09 Partner with BEA Professional Services Leverage BEA Support Send folks to BEA Educational Services classes Visit dev2dev often for articles and code library Get the best developers you can – at least 3 seasoned leads Focus on what works, take risks where they are manageable Integrate BEA with other departments early (IT, Support, etc.) Design, Code and Lead by Example Atlanta BEA User Group 25
  26. 26. Take Away Tips/Hints
  27. 27. 07/07/09 Maven Details Maven in 3 concepts: POM (Project Object Model) Plugins Made of Goals = Actions Repositories Maven files (in 3): project.xml POM maven.xml Custom goals in Jelly Goal, preGoal, postGoal Configuration project.properties build.properties Atlanta BEA User Group 27
  28. 28. 07/07/09 Maven POM Example Atlanta BEA User Group 28
  29. 29. 07/07/09 Cruise Control Details CruiseControl Configuration config.xml – CruiseControl Configuration (see next slide) Build Files build.xml – Full Clean and Full Check Out (Get Latest) ant – (default target) Calls the Clean and StCheckout Targets build-cc.xml – Full Build and (Separately) Deploy ant –f build-cc.xml scheduled –Dlabel=build.xx • Full Build • Update the Footer with the Label • Label StarTeam Separate Deployment Targets for each Environment Atlanta BEA User Group 29
  30. 30. 07/07/09 Cruise Control Sample Configuration File <project name=“project"> <bootstrappers> <antbootstrapper /> </bootstrappers> <modificationset><alwaysbuild/></modificationset> <schedule interval="600"> <maven goal="multiproject:install cleanDB multiproject:site" projectfile="C:/_project/source/server/project.xml“ mavenscript="C:Maven_1.0.2/bin/maven.bat"/> <pause starttime="2200" endtime="0530"/> <pause day="sunday" starttime="0001" endtime="2400"/> <pause day="saturday" starttime="0001" endtime="2400"/> </schedule> <publishers> <email buildresultsurl="http://buildmachine:8080/cruisecontrol/index.jsp" defaultsuffix="@mailserver.com" mailhost=“IPADDRESS" reportsuccess="fixes" returnaddress="buildmachine" subjectprefix="Integration build - "> <always address=“developer"/> </email> <x10publisher port="COM1" passDeviceCode="A3" failDeviceCode="A2"/> <x10publisher port="COM1" passDeviceCode="B3" failDeviceCode="B2"/> <artifactspublisher dir="C:/_project/source/server/target/docs“ dest="artifacts/project"/> </publishers> </project> Atlanta BEA User Group 30

×