640 likes | 843 Views
Oracle ADF: Drag and Drop Data Binding for J2EE Business Services. Steve Muench Technical Evangelist, Product Manager, Developer, Author Oracle Corporation. Business Data. Model / View / Controller Architecture. Business Services Layer. Business Objects. Business Service. Controller Layer.
E N D
Oracle ADF: Drag and Drop Data Binding for J2EE Business Services Steve Muench Technical Evangelist, Product Manager, Developer, AuthorOracle Corporation
BusinessData Model / View / Controller Architecture Business Services Layer BusinessObjects Business Service Controller Layer BusinessServiceInterface Code User Input / Page FlowHandling Logic Query Results Collections of ValueObjects ModelLayer View Layer
BusinessData Data Binding Ties M, V, and C Together Business Services Layer BusinessObjects Business Service Controller Layer BusinessServiceInterface Code User Input / Page FlowHandling Logic Query Results Collections of ValueObjects ModelLayer View Layer
JSR 227: Bindings & Data Controls DataControl UI Control BusinessService yourDC €5008,00 ControlBinding salary employeesIter IteratorBinding Model Layer
Control Binding Types Control Binding Value Binding Action Binding Tree Binding Range Binding Attributes Binding List Binding
JSR 227: Bindings & Data Controls • What is the Model Layer? • View, Controller, Business Services "Glue" • Why a Declarative, Standard Approach? • Saves Repetive Coding • Enables Visual Design Tools BusinessComponents JSR 277Data Binding Layer Web Services JSP Toplink Swing EJB UIX/JSF JavaClasses
D E M O N S T R A T I O N Quick Example of Declarative Data Binding For JSP and Swing
D E M O N S T R A T I O N Quick Example of Data Binding Using POJO's Mapped with Toplink
How Does Data Binding Fit Into Your End-to-End Application Architecture? • J2EE is Warehouse of Technology Ingredients • JMS, JDBC, JAXP, SAX, JSP, EJB, Servlets,JAAS, JavaMail, JNDI, JTA, JCA • J2EE Does Not Prescribe anyEnd-to-End Application Architecture • What is the Recipe that's Right for Your App? • When Should You Use Which Technologies? • Hint: Your Choices Affect Application Performance! • Each DevelopmentTeam Must: • Combine Ingredients into a Custom Architecture • Enforce Use of the Architecture Across Team
J2EE Design Patterns to the Rescue • Best Practice Techniques • Improve Performance • Increase Maintainability • Avoid Typical Problems • Application Architecture Ideas • What To Do In Which Tier • Which J2EE Technology When? • Paragraphs Of Text, Diagrams • Not Ready-to-use Code
J2EE Design Patterns • Required for Any Real-World Application • Implementing Them Is: • Time Consuming • Tedious, Error Prone • Ongoing Testing, Debuging,Maintenance • Don't You Have An Application to Finish?
J2EE Expert’s Advice “ Many common problems (beyond those addressed by J2EE application servers) have been solved well by open source or commercial packages and frameworks. By adopting an existing solution, we are free to devote all our effort to meeting business requirements. ” Page 166
Write Your Own, or Off-the-Shelf ? • Most teams end up developing and supporting their own app-specific frameworks • Others make the investment to learn and use one or moreoff-the-shelf frameworks
BusinessData Popular Framework-Based Techniques Struts Business Services Layer BusinessObjects Business Service Controller Layer BusinessServiceInterface Code User Input / Page FlowHandling Logic Query Results Collections of ValueObjects ModelLayer View Layer JSP + Taglibs
BusinessData Model, Services, Data Access, Business Objects Often Hand-Coded Struts Business Services Layer BusinessObjects Business Service Controller Layer BusinessServiceInterface Code User Input / Page FlowHandling Logic Query Results Collections of ValueObjects ModelLayer ??? View Layer JSP + Taglibs
Frameworks Can Simplify… • Business Objects • Persistence • Queries • Transaction Management • Data Access Objects Rich Clients Web and Wireless Clients Controller Model Business Services • Transactional Service Façades • Business Rules Enforcement • Client "Data Shaping" • Coordinating DAO's with BO's • State Management • Layered Customization
Frameworks Can Simplify… • Interacting with Business Service Methods • Exposing Business Data to View/Controller Layers • Handling Updates Made to Business Data Rich Clients Web and Wireless Clients Controller Model Business Services
Frameworks Can Simplify… • Business Service Location/Lookup and Pooling • Handling User Events and Request "Lifecycle" • Presenting/Internationalizing Messages & Errors • Page Navigation/Flow Rich Clients Web and Wireless Clients Controller Model Business Services
Frameworks Can Simplify… • Swing Data Binding • Efficient 3-Tier Client/Server Communication Rich Clients Web and Wireless Clients Controller Model Business Services
Over 2000 In-House Application Developers Gives Us Significant In-House Expertise • Oracle E-Business Suite Developers are Building… • Complex, Scalable J2EE Business Applications • With Web, Swing, and Web Services Interfaces • Targeting Intranet and Internet Deployment on J2EE • Using J2EE Design Patterns Frameworks • To Accelerate Implementation and Save on Testing
J2EE Expert’s Advice for Strong Foundation Giving Most Flexibility, Best Performance • Lightweight "Inversion of Control" Container • JavaBean Based Components • Extending from Framework • Configured From XML Metadata • Constructed Using Factories • Solves Common Problems Once • Easier to Test Outside the J2EE Container Environment • Can Be Repurposed in BothJ2EE Web Tier and EJB Solutions
Rich Clients Web and Wireless Clients Controller Model Business Services Oracle Application Development Framework (ADF) • Implements Standard J2EE Best Practices • Modular, Lightweight "Inversion of Control" Container • Model-View-Controller (MVC) Design Pattern • Focus on The Application, Not The “Plumbing” • Consolidation and Evolution of Proven Frameworks
Oracle ADF Design Extensions • Visual • WYSIWYG Editors • UML Modelers • Structure Pane • Declarative • Property Inspector • XML Metadata • Synchronized • Code View & Design View Always Synchronized • No Separate Generation Step • Underlying Code Always Accessible
ADF Architecture Overview Rich Clients Web and Wireless Clients Controller Model Business Services
ADFApplication Module ADFView Object ADF Entity Object ADF Model Layer Enables Flexibility Rich Client Web / Wireless View Swing / JClient JSP ADF UIX JSF Controller Struts ADF Controller Model ADF Bindings ADF Data Control BusinessServices JavaClasses EJBSessionBeans WebServices ADF Metadata Services JDBC TopLinkQueries EJBFinders DataAccess PersistentBusinessObjects Java Classes EJB Entity Beans TopLink Mapping
New Approach to Development • Select Your Development Approach • UML Modeling, Coding, Declarative Development • Select Your Deployment Platform • Any J2EE Application Server • Any SQL92 Database • Select Your Technology Combination • "My JDeveloper" • Technology Scopes
Adding, Yet Simplifying Choices CHOICES Technology Scopes • UML • Swing, HTML • JSP • JSF • Apache Struts • ADF BusinessComponents • EJBs • Toplink • Ant, JUnit • CVS • Clearcase • Oracle SCM • Oracle 9iAS • JBoss, WLS • Profiling • Audit/Metrics • UML • HTML • JSF • Apache Struts • EJBs • Toplink • Ant, JUnit • CVS • Oracle 9iAS • Profiling • Audit/Metrics UI Project • JSP • Struts Extension Manager Model Project • Toplink Visual & Declarative “My JDeveloper”
D E M O N S T R A T I O N Quick Example of Extension Manager, Technology Scopes, and Application Templates
ADF Architecture Overview Rich Clients Web and Wireless Clients Controller Model Business Services
Business Services Layer • Manages Persistence • O/R Mapping • Provides Filtered Views of Data • Custom Queries • Encapsulates Business Rules • Data Validation • Business Logic • Choices of Implementation • EJB, ADF Business Components, Web Services, Java Classes, TopLink
Plain Java Classes Mapped with Oracle TopLink • TopLink Provides Architecture for Object/Relational Persistence • Sophisticated Out-of-Box Options to Map Java Classes to Any Kinds of Tables or XML • Integrated Mapping Editor
Enterprise JavaBeans (EJB) • Services are EJB Session Beans • Business Objects are Entity Beans • Leverage Toplink Mapping for CMP • Integrated Environment toModel, Code, Test, Debug EJBs • Productively Develop EJBs • EJB Module Editor • Basic Design Patterns Support • Data Transfer Object • Session Façade • EJB Verifier
J2EE Web Services • Web Services UML Modeling • TCP Packet Monitor • PL/SQL Web Service wizard • WS-I Compliance tester • ADF Data Control Binding • Interoperability with .NET
ADF Business Components • Prescriptive Building Blocks for Service-Oriented Apps • Transactional Service Façades (ApplicationModule) • Task-Specific "Data Shaping" Components (ViewObject) • Business Objects with Rules Enforcement (EntityObject) • Used by Over 2000 Developers in Oracle Applications • For Corporate Developers, VAR's, and ISV's Lookingto Avoid Writing Their Own J2EE Application Framework for the Business Services Layer ApplicationModule ViewObject EntityObject
ADF Business Components • Best-Practice App-Building Infrastructure For: • Coordinating Data Access Objects with BO's • Component Metadata (Prompts, Fmt Masks, Properties) • State Management • Efficient Remote Client Communication • Layered Customization • Use/Test Services as Lightweight Java Classes • Scalable & Performant with Optimized DB Interaction • Option to Deploy as EJB Session Beans, Web Services
ApplicationModule ViewObject EntityObject Building Business Services with ADF BC Rich Client Web / Wireless View Swing / JClient JSP ADF UIX JSF Controller Struts ADF Controller Model ADF Bindings ADF Data Control BusinessServices PaymentPlan MgmtService SlowPayingCustomers LatePayments DataAccess PersistentBusinessObjects Payment Bill Customer
Business Services Design Time • UML Modelers, Wizards, Editors • Database Schema • ADF Business Components • Enterprise JavaBeans • Web Services • Java Classes
Drag and Drop Data Binding • Data Binding Palette • Expose any Business Service • Available to any View • Create UI components • Master/Detail • Table • Field, checkbox,…
ADF Architecture Overview Rich Clients Web and Wireless Clients Controller Model Business Services
UI Development • Visual editors • JSP and HTML • JavaServer Faces • ADF UIX • Swing (ADF JClient) • Component palette • Common binding • Property inspector • Structure pane
Design and Code Sync • Design View / Code View • Available For All Components • Two-Way Synchronization
ADF JClient • Rich Client user interface (JFC/Swing) • WYSIWYG Editor • Simplified Swing UI Layout • Best Practices Approach • UI Debugging
JSP Visual Design • Synchronized JSP Visual Design with • Code Editor • Structure Pane • Property Inspector • Data Control/Component Palette • Integrated with JSTL/EL & Struts • Taglibs on Component Palette • Intuitive tag and EL rendering • Synchronized with Struts Page Flow • Universal ADF Databinding • Java Classes + Toplink • EJB + TopLink • Business Components • Web Services • Drag and Drop UI Components
ADF Faces for JSF • JavaServer Faces (JSR-127) Components • Support Variety of Clients • Web Browsers, Mobile Devices • Rich Components, Layouts,and Render Kits • Powerful Runtime Features • Partial Page Rendering • Automatic Sorting • Look and Feel "Skinning"