1 / 25

A developer’s peek inside JDeveloper ADF Business Components & ADF Faces

Learn about ADF, its business components and view objects, manipulating view object attributes, event-driven UI model, and more. Explore the advantages of ADF over the traditional Forms approach.

angelinaa
Download Presentation

A developer’s peek inside JDeveloper ADF Business Components & ADF Faces

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. A developer’s peek inside JDeveloperADF Business Components &ADF Faces SAGE Computing ServicesCustomised Oracle Training Workshops and Consulting www.sagecomputing.com.au Penny Cookson – Managing DirectorChris Muir – Senior Consultant

  2. What’s wrong with the Forms approach? What is ADF? ADF Business Components Entity Objects & View Objects Manipulating View Objects Attributes ADF Faces Page flow diagrammer Event driven UI model Learning resources Agenda

  3. Java Cake What’s wrong with the Forms approach? JavaServer Faces Encryption Web Anything Web Services Canvas Mobile Computing Any J2EE Server SOA Block Ajax Standards Any JDBC Database Javascript Failover Database Swing BPEL Platform Independence Vendor Independence Rich Clients Email Services Scalability JavaServer Pages Oracle Just about anything exciting happening in computing FORMS Remand Centre

  4. A (Notorious) JDeveloper Quote

  5. What is ADF? ADF What? • Application Development Framework … A comprehensive & complete MVC framework for developers to assist building J2EE applications … Forms provides you with a “black box” framework … ADF is a “white box” and provides ultimate flexibility and power … • ADF Business Components … ADF BC is one “persistent layer API” choice within ADF … used for connecting to the database, model data and store data in the Java mid-tier, and implement sophisticated business logic and security • ADF Faces … A feature rich set of web components based on an events model similar to Forms, designed to abstract away from the HTTP request-response fiasco and HTML over-detailed tag programming

  6. ADF Business ComponentsEntity Objects & View Objects View Objects Entity Objects R/W User Interface R/W Database R/O DML Insert/Update/Delete Validation SQL Queries Security Code re-use

  7. Manipulating View Objects Design Time View Only Objects and underlying SQL query can be switched into Expert Mode

  8. Manipulating View Objects Runtime Manipulation Bind Variables Oracle Named Oracle Positional JDBC Positional Set Binds via Custom Code & exposing Model Services

  9. EO/VO Transient Attributes aka Calculated Items Based on: Simple expressions Sub-Queries Function Calls

  10. Attribute Default Values 2 Approaches Declarative: EO/VO Attributes Code: Create method The EntityImpl

  11. Attribute Formatting 2 Approaches Declarative: EO/VO Attributes Control Hints Code: Create a RegExp validation Domain The DomainImpl

  12. Data Validation - declarative 2 Approaches Declarative: EO Validators Can be both at entity level or Attribute level

  13. Data Validation - code 2 Approaches Code: EO Validators Can be both at entity level or Attribute level The EntityImpl

  14. DML Methods Yes! There are equivalents of Core Forms Transactional Triggers. The EntityImpl protected void doDML(int operation, TransactionEvent e) { if (operation == DML_INSERT) {   /* write PRE-INSERT trigger-like code here */   super.doDML(operation, e); /* Don't call the super and do something else to write ON-INSERT trigger-like code */   /* write POST-INSERT trigger-like code here */  }  else if (operation == DML_UPDATE) {   /* write PRE-UPDATE trigger-like code here */   super.doDML(operation, e); /* Don't call the super and do something                                else to write ON-UPDATE trigger-like code here */   /* write POST-UPDATE trigger-like code here */  }  else if (operation == DML_DELETE) {   /* write PRE-DELETE trigger-like code here */   super.doDML(operation, e); /* Don't call the super and do something                                 else to write ON-DELETE trigger-like code here */    /* write POST-DELETE trigger-like code here */  }    }

  15. Exposing Model Services Custom Code Exposing Custom Code – Model Services Eg. Set View Bind Variable based on User Input The AppModuleImpl

  16. Is Database PL/SQL dead? PLSQL No it’s not, it’s just hiding! Invoking DB Stored Procedures and Functions One of many ways • Callable statement • new Dev Guide • JDev Help • JPublisher • JDev Help • Expose as web service

  17. ADF FacesPage Navigation Page Navigation 1 - Create the Navigation Rule Piece of Cake Easy to Build Easy to Apply Easy to Change 2 - Use the Rule

  18. Event Driven UI Model ADF BC Binding Object DeclarativeBinding Methods Declarative Handling Bound by EL Submittable Component << Event ------- Listener ------- Handler >> Backing Bean Method Handling [injected]ADF BC Binding Object Bound by EL Submittable Component DeclarativeBinding Methods

  19. Event Driven UI Model… What’s the equivalent of the when-button-pressed trigger? It’s just a few clicks away – xxxButton_action 3 – ActionListener refers BackingBean method 2 – Create BackingBean and method 4 – BackingBean method ready for code 1 - Select Button and ActionListener

  20. Event Driven UI Model… A Few more UI Listeners and Handlers new Dev Guide

  21. UI Tidbits EL (JSF Expression Language) • JSTL & JSP EL vs JSF EL • Tricks Eg, re-usable label text codelike expressions enable/disable… PPR (Partial Page Rendering) • AJAX style The BACK Button • See Token Validation

  22. Complex UI Components LOVs Shuttles Trees Screenshots courtesy of Oracle’s SRDemo

  23. The Full Picture Forms <=> ADF BC/ADF Faces • Forms UI focused triggers PL/SQL modules Libraries Transactional triggers … • ADF BC / ADF Faces UI events + listeners Backing beans Application module services BC framework methods…

  24. Our 1 week JDeveloper course for Forms Programmers! ;) ADF Developer’s Guide for 4GL/Forms Programmers ADF Developer’s Guide for Java Programmers SRDemo - like Toystore demo OTN JDeveloper website – no really! Has many very important and good learning resources. Metalink - don’t dismiss Metalink as just Support. You may find condensed solutions when compared to full blown Doco. OTN JDeveloper Forums – JDev team answer questions on hour by hour basis Blogs - don’t overlook blogs and read every day Visit the JDev blog aggregator: http://thepeninsulasedge.com/adfblog Don’t just stick to Oracle. JSF is a Sun & Java technology. There are plenty of other good sites out there beyond Oracle’s. Learning Resources

  25. Thank YouFor Your Attention enquiries@sagecomputing.com.au SAGE Computing ServicesCustomised Oracle Training Workshops and Consulting www.sagecomputing.com.au

More Related