
Note: These slides are an expanded version of the slides presented at the conference. Survey • Job responsibilities? Oracle ADF On-Ramp: – DBA, developer Developing Applications • Languages? With the Core ADF Stack – PL/SQL, Java – Other • Tools? Peter Koletzke – APEX Technical Director & Principal Instructor – Developer Forms/Reports – JDeveloper – Eclipse, NetBeans The white paper – Other follows these slides in this same file. 2 Agenda On the Positive Side… • What is ADF? If we do not find anything pleasant, at least • ADF Business Services we shall find something new. Si nous ne trouvons pas des choses • ADF Model, View, and Controller agréables, nous trouverons du moins des choses nouvelles. Slides and white paper are Screenshots are be available on the OOW 11g unless —Voltaire (1694-1778), Candide and Quovera websites. marked as 12c 3 4 Oracle Application Development ADF Architecture Framework (ADF) Application Client View Web Client •A framework is a prebuilt service for solving a particular problem – like access to the ADFdi (Excel) ADF Mobile JSF database ADF JClient JSP ADF Faces RC – Code libraries and standards support the framework – Implements code reuse and best practices – An architecture with code libraries Controller ADF Struts JSF •ADF is a meta-framework Controller – A wrapper for other frameworks, JDev 10g and later – Provides a consistent developer experience Model • Based on Model-View-Controller ADF Bindings design pattern (SmallTalk, Java EE) ADF Data Controls Business Services EJB Session Web ADF Business Java Essbase Beans Services Components Classes 5 Which ADF Technologies to Use? ADF Essentials • An example: Fusion Applications (Oracle • No-license-fee version of ADF applications suite) – Runs on the public domain app server, • Core technology stack used for Fusion Apps is: Glassfish, not WebLogic Server – ADF Business Components – ADF Faces Rich Client • Works in JDeveloper – ADF Model • Works in Eclipse – ADF Controller • Other high-level technologies – Through Oracle Enterprise Pack for or strategies also used Eclipse – SOA, ESB, Business Rules, • More information on OTN WebCenter, BPM, BPA, BAM – www.oracle.com/technetwork/developer- – Need to consider those, too, Out of tools/adf/overview/adfessentialsfaq-1837249.pdf at the architectural level scope 7 8 Mobile Application Framework Where Do The Core Technologies End Up? • Similar ADF principles and development methods – Business services Database access – Pages (features) with components & SOA endpoints ADF – Task flows Faces ADF BC • Supports iOS and Android UI rendering Departments • Use local services like camera & contacts ADF Model ADF Employees • OTN demo video and ADF Academy video Controller www.oracle.com/technetwork/developer-tools/maf Binding data Page flow and task flow to items 9 Demo 10 Which Languages Do You Use? How Much of Each Do You Use? 1. Java Language (Use) Level Primary Use Needed – All important programmatic code Java Basic Business components code for validation and – Think “trigger code” as in Oracle Forms (frameworks such as special handling of model objects, as well as coding 2. XML ADF Faces) conditional page flow. HTML Java Expert Supplementing or replacing functionality supplied by – The components rely on XML (extending framework the framework. This requires research into the • Property editors create it for you features) framework’s capabilities and architecture. XML Basic The JSF tags and the HTML renderer take care of 3. JavaScript and Cascading Style Sheets the HTML for you. XML is used for JSF JSP files – Add functionality to HTML pages JavaScript Basic/None Providing customized user interaction functionality, – Usually the components do this work for you for example, special handling of a checkbox 4. Expression Language selection. Cascading Style Basic/None Developing skins for a consistent look and feel. If – Used in JSF binding properties Sheets you use prebuilt look-and-feel templates, no CSS 5. Groovy coding is needed. and Expression Language Basic/ Supplying data to components from properties or – ADF BC scripting SQL! Intermediate methods in the application. Groovy Basic Expressions for ADF Business Components 11 Agenda The World View • What is ADF? In this best of all possible worlds ... • ADF Business Services everything is for the best. Dans ce meilleur • ADF Model, View, and Controller des mondes possibles ... tout est au mieux. —Voltaire (1694-1778), Candide 13 14 ADF Business Components More About ADF BC • ADF BC: an option in the Business • Various component types, e.g., Services layer of ADF – View objects: define queries • Persistence: storing data in a database – Entity objects: define insert-update- • O/R mapping: Translates relational database thingies to object-oriented (Java) delete (“DML”) whatsits – View links: view object relationships • Handles JDBC mechanics – Associations: entity object links – Creates SQL and handles results – Application modules: Define the data • Primarily declarative models and the database transaction – XML source code to define the • It does not create user interfaces use of framework classes 15 16 Sample ADF BC Development View Object Code View Object = SELECT statement View Attribute = Column in query <ViewObject <Attribute xmlns="http://xmlns.oracle.com/bc4j" Name="EmployeeId" Name="AllEmployees" IsNotNull="true" Version="11.1.1.53.41" Precision="6" SelectList="Employees.EMPLOYEE_ID, Scale="0" Employees.FIRST_NAME, ColumnName="EMPLOYEE_ID" Employees.LAST_NAME, SQLType="NUMERIC" Employees.JOB_ID, Type="oracle.jbo.domain.Number" Employees.EMAIL, ColumnType="NUMBER" Employees.HIRE_DATE, TableName="EMPLOYEES" Departments.DEPARTMENT_NAME, PrimaryKey="true"> Departments.DEPARTMENT_ID, <DesignTime> Departments.LOCATION_ID" <Attr Name="_DisplaySize" FromList="DEPARTMENTS Departments, Value="22"/> EMPLOYEES Employees" </DesignTime> Where="Departments.MANAGER_ID = </Attribute> Employees.EMPLOYEE_ID" <Attribute BindingStyle="OracleName" Name="FirstName" CustomQuery="false" Precision="20" PageIterMode="Full" ColumnName="FIRST_NAME" UseGlueCode="false"> ... ... Entity object editors Demo 18 List-of-Values (LOV) VO Editor – LOV Subtab • Defined for an view object attribute • Associate a query (view object) with the attribute • Set up is declarative – Start in the view object editor • UI code will display this attribute specially – Pulldown list item loaded with values – Popup list-of-values dialog 19 20 Create List of Values View Criteria • Used for queries • View Object Editor – 11g Query page – 12c VC page • View Criteria dialog At runtime – Defines the WHERE clause declaratively – Bind variables are optional 21 22 View Criteria in the DCP Declarative Validation Rules • Data Controls panel lists • Simple rules written on the entity object the defined criteria • Method 1 • You can drag and drop – Attributes tab a view criteria onto – Validation a JSF page Rules subtab • Method 2 – Business Rules tab • Components are added for each – Attribute or attribute in the view criteria entity level 23 24 Declarative Validation Benefits UI Hints • Quick validation on the app server side • A.k.a., control hints • No Java coding! • UI definitions stored in the entity object or view object definitions • Add a friendlier message for ADF BC-level errors (e.g., length) – Universal to all UIs created from those EOs or VOs • Messages stored in a message bundle file – Provides consistency that you can internationalize – “Set it and forget it” • All UIs built from the entity object will contain the same validation • Can put the hints on either EO or VO – Like a trigger in the database – Rule of thumb: use the entity object UI hints whenever possible • You need to decide where to place – Override on view object level if business rules code needed 25 26 Setting UI Hints Agenda • In Entity Object editor, select attribute • What is ADF? and click the UI Hints tab in the Property Inspector • ADF Business Services • OR View Object editor Attributes • ADF ViewView,, Model, and Controller tab, UI Hints subtab 27 28 ADF Faces Rich Client Overview ADF Faces RC Features • Fits into the View layer of ADF • Changeable “skins” • History: – Common look-and-feel characteristics – ADF UIX ADF Faces Apache Trinidad – Skin editor in JDev 11.1.2 and beyond – ADF Faces ADF Faces RC • Layout management features • Built on top of JSF APIs • Extensive set of properties • Deployable on any 1.2 implementation of JSF – Declarative access to application metadata • Support for pop-ups and dialogs – Properties can reference dynamic values using • ADF model support out-of-the-box Really Expression Language • Data Visualization Tools (DVT) rich! • Template support components • Declarative AJAX – Charts, Gantt, Pivot, Maps, Hierarchy – Property-driven 29 30 Some Components Sample ADF Faces Development af:inputText af:button af:link (with icon) af:inputListOfValues af:commandMenuItem af:selectOneChoice af:inputDate af:selectBooleanCheckbox 31 Demo 32 ADF Faces JSF Snippet Agenda <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0" xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich"> ... <af:panelStretchLayout styleClass="AFVisualRoot" topHeight="105px" bottomHeight="20px"> • What is ADF? <f:facet name="top"> <af:panelBorderLayout> <f:facet name="start"> <af:image source="/images/tuhra.gif" shortDesc="TUHRA Logo"/> </f:facet> • ADF Business Services <f:facet name="end"> <af:panelGroupLayout layout="horizontal" halign="right" valign="bottom"> <af:commandImageLink
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages30 Page
-
File Size-