Download presentation
Presentation is loading. Please wait.
Published byBrittany Hood Modified over 8 years ago
2
Building J2EE Applications Based on Design Patterns with Business Components for Java Olivier LE DIOURIS Principal Product Manager Oracle Corporation
3
Agenda J2EE Overview & Challenges Design Patterns & Frameworks BC4J Overview Demo Summary
4
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.”
5
J2EE Architecture - 4 layers Business Logic Data Sources Presentation Logic Clients
6
J2EE Components
7
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!!
8
More Challenges 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
9
Agenda J2EE Overview & Challenges Design Patterns & Frameworks BC4J Overview Demo Summary
10
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
11
Why Framework? Section 10.2.2.2, Page 253 “ 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.”
12
Benefits of Framework Better code Simpler code Better performing Less complex
13
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
14
Major Benefits of BC4J Simplifying Server Coding Simplifying Client Binding Simplifies O/R Mapping Improve Network using Caching Hides Complex Infrastructure
15
J2EE Framework – BC4J Simplifies and optimizes binding of GUI to logic Simplifies and optimizes O/R mapping Flexible Deployment
16
Agenda J2EE Overview & Challenges Design Patterns & Frameworks BC4J Overview Demo Summary
17
Map Database Tables to Java Objects Customer ORDER CUSTOMER Order ITEM LineItem Entity Objects
18
Add Business Rules ORDER CUSTOMER ITEM Customer Order Status in ‘Platinum’, ‘Silver’, ‘Gold’ Status in ‘Platinum’, ‘Silver’, ‘Gold’ Valid tracking no. LineItem Buy 10 get 1 free Entity Objects
19
Bind Presentation Logic Order Valid tracking no. LineItem Buy 10 get 1 free CustView SELECT id, name, status FROM Customer SELECT id, name, status FROM Customer OrdView SELECT id,contact, trackno FROM Order SELECT id,contact, trackno FROM Order Entity ObjectsView Objects ItemView SELECT id, quantity,discount FROM Item SELECT id, quantity,discount FROM Item Customer Status in ‘Platinum’, ‘Silver’, ‘Gold’ Status in ‘Platinum’, ‘Silver’, ‘Gold’
20
Bind Presentation Logic (custom view) Customer Status in ‘Platinum’, ‘Silver’, ‘Gold’ Status in ‘Platinum’, ‘Silver’, ‘Gold’ Order Valid tracking no. PriorityOrder SELECT Order.id, Ord.contact, Ord.trackno, Cust.id, Cust.Status, FROM Order Ord, Customer Cust SELECT Order.id, Ord.contact, Ord.trackno, Cust.id, Cust.Status, FROM Order Ord, Customer Cust Entity ObjectsView Objects
21
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
22
Group Components in a Logical Container Customer Order LineItem OrdView CustView OrdView CustView Application Module Entity Objects View Objects Logical Data Model ItemView
23
SlowPaying Customers Late Payments Customer Bill Payment BC4J Database BC4J Clients RMI/IIOP HTTP XML
24
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
25
JDBC JSP page or servlet HTTP XML Browser client Servlet or JSP page on a Java-enabled Web server Flexible Deployment and Clients JDBCRMI/IIOP Java GUI client EJB on an application server EJB
26
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
27
D E M O N S T R A T I O N BC4J
28
Agenda J2EE Overview & Challenges Design Patterns & Frameworks BC4J Overview Demo Summary
29
BC4J = Easier J2EE J2EE Can be complex BC4J Makes J2EE Simple BC4J Is standard based Java+XML BC4J is part of JDeveloper
30
Where to get more Information http://otn.oracle.comhttp://otn.oracle.com http://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
31
A Q & Q U E S T I O N S A N S W E R S
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.