1 / 31

Building J2EE Applications Based on Design Patterns with Business Components for Java

Building J2EE Applications Based on Design Patterns with Business Components for Java Olivier LE DIOURIS Principal Product Manager Oracle Corporation. Agenda. J2EE Overview & Challenges Design Patterns & Frameworks BC4J Overview Demo Summary. What is J2EE?. Java 2 Enterprise Edition

Leo
Télécharger la présentation

Building J2EE Applications Based on Design Patterns with Business Components for Java

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Building J2EE Applications Based on Design Patterns with Business Components for Java Olivier LE DIOURIS Principal Product Manager Oracle Corporation

  2. Agenda • J2EE Overview & Challenges • Design Patterns & Frameworks • BC4J Overview • Demo • Summary

  3. What is J2EE? • Java 2 Enterprise Edition • “The J2EE application model defines an architecture for implementing services as multi-tier applications delivering scalability, portability, and manageability.”

  4. J2EE Architecture - 4 layers Client Tier Web Tier Business Tier Data Tier Clients Presentation Logic Business Logic Data Sources Middle Tier

  5. J2EE Components

  6. What do you need to know to develop J2EE applications? • All tiers:Java • Client tier:Swing • Web tier:JSP, Servlets • Business logic tier:EJB • Connectivity:IIOP • Database access:JDBC • Plus:XML, JNDI, JMS, JTA • The list continues to grow!!

  7. Where do I start ? Application design complexity How do I represent business entities in the middle-tier? How do I enforce business logic? How do I bind and interface client code? How do I keep efficiency More Challenges

  8. Agenda • J2EE Overview & Challenges • Design Patterns & Frameworks • BC4J Overview • Demo • Summary

  9. Design Patterns • A design pattern describes a proven solution to a recurring design problem • Reasons to use Design Patterns: • They are proven • They are reusable Source: http://java.sun.com/j2ee/blueprints/design_patterns/index.html

  10. Why Framework? “Large scale development of object-oriented software requires frameworks. It is important to have a framework, so that every time the design requires two objects to interact, a developer does not have to come up with a whole new notion of how the interaction works out.” Section 10.2.2.2, Page 253

  11. Benefits of Framework • Better code • Simpler code • Better performing • Less complex

  12. Business Component for Java (BC4J) • BC4J – A J2EE Framework that simplifies Development, Customization and Deployment of J2EE Applications • Implements SUN’s Design Patterns • Standard – Java and XML • Server Side Framework with Client Binding • Based on Oracle’s Developers experience

  13. Major Benefits of BC4J • Simplifying Server Coding • Simplifying Client Binding • Simplifies O/R Mapping • Improve Network using Caching • Hides Complex Infrastructure

  14. Simplifies and optimizes O/R mapping Simplifies and optimizes binding of GUI to logic Flexible Deployment J2EE Framework – BC4J

  15. Agenda • J2EE Overview & Challenges • Design Patterns & Frameworks • BC4J Overview • Demo • Summary

  16. Map Database Tables to Java Objects Customer CUSTOMER ORDER Order ITEM LineItem Entity Objects

  17. Add Business Rules Customer Status in ‘Platinum’, ‘Silver’, ‘Gold’ CUSTOMER ORDER Order ITEM Valid tracking no. LineItem Buy 10 get 1 free Entity Objects

  18. Customer Status in ‘Platinum’, ‘Silver’, ‘Gold’ OrdView SELECT id,contact, trackno FROM Order ItemView LineItem SELECT id, quantity,discount FROM Item Buy 10 get 1 free Bind Presentation Logic CustView SELECT id, name, statusFROM Customer Order Valid tracking no. View Objects Entity Objects

  19. Customer Status in ‘Platinum’, ‘Silver’, ‘Gold’ PriorityOrder SELECT Order.id, Ord.contact, Ord.trackno, Cust.id, Cust.Status, FROM Order Ord, Customer Cust Order Valid tracking no. Bind Presentation Logic (custom view) View Objects Entity Objects

  20. Middle Tier Caching • Pulls data from database into middle tier and preserves relationships between data • Cache synchronizes data from different view objects that reference that same entity object. • Reduces round trips to database • Control synchronization and locking modes

  21. CustView OrdView Group Components in a Logical Container CustView Customer OrdView Order OrdView ItemView ItemView LineItem Logical Data Model View Objects Entity Objects Application Module

  22. Customer SlowPayingCustomers Bill LatePayments Payment BC4J Clients BC4J RMI/IIOP HTTP Database XML

  23. Building UI for BC4J • HTML UI – JSP • JSP Tag library for BC4J • Java UI – JClient • Swing components with BC4J connectivity • XML UI – JSP • XML messaging from/to BC4J • XSQL Servlet interface to BC4J

  24. Flexible Deployment and Clients HTTP XML JDBC JSP page or servlet Servlet or JSP page on a Java-enabled Web server Browserclient EJB RMI/IIOP JDBC Java GUI client EJB on an application server

  25. Best Practice Steps Our Apps Teams Follow • Design Application Business Model • Using UML Class Diagrams • Implement Application Business Model • Using of BC4J Framework • Identify Application Task • Using UML Use Cases • Implement Application Data Model for the Task • Using BC4J Framework • Bind Interfaces to Application Data Model • Swing, JSP, or XML • Test Interface and Select Deployment Target • Decide to Target Web Tier or EJB Tier

  26. BC4J D E M O N S T R A T I O N

  27. Agenda • J2EE Overview & Challenges • Design Patterns & Frameworks • BC4J Overview • Demo • Summary

  28. BC4J = Easier J2EE • J2EE Can be complex • BC4J Makes J2EE Simple • BC4J Is standard based Java+XML • BC4J is part of JDeveloper

  29. Where to get more Information http://otn.oracle.comhttp://technet.oracle.com • Complete technical resource for developers • Software, samples,& code downloads • Discussion forums • Whitepapers, technical information, documentation http://www.oracle.com Product news, Press Release, customer stories

More Related