One Developers Journey To ADF - oAppsNet

36 downloads 95 Views 1MB Size Report
Where Do You Start. • Read White Paper – General Understanding. • Watch Oracle Tutorial Video. Description. Location. Redeveloping Oracle Forms in ADF  ...
A Developers Journey From Oracle EBS Forms to Oracle EBS ADF Pages Session ID# 11993 Thomas Korbecki

oAppsNET Partners

Objectives • What Are The Challenges • Where To Start • What To Learn • Do I Need To Take Any Formal Classes • ADF Concepts New To You • ADF vs. Oracle Forms • Deployment • Web Logic Server (WLS) • Lessons Learned

ADF & Forms Experience • What Is Your Experience Level In Forms? • None • Beginner - Can Build Forms But Requires Assistance • Moderate - Can Build Fairly Complex Forms • Advanced - Can Build Complex Forms • Who Has Reviewed ADF Material • Who Has Attended Formal ADF Training • Who Has Tried To Build An ADF Application • Who Has Built An ADF Application

Challenges • Many • New Multipurpose Developer Tool • New Programming Language • New Scripting Language • New Development Architecture • New User Interface Components • New Debugging Techniques • New Run-Time Server (WLS) • New Deployment Methods & Tools • Time

Where Do You Start

Where To Start • Oracle JDeveloper Home Page http://www.oracle.com/technetwork/developer-tools/adf/overview/index.html

Where Do You Start • Read White Paper – General Understanding • Watch Oracle Tutorial Video

Description

Location

Redeveloping Oracle Forms in ADF

http://www.youtube.com/watch?v=TiqbW1CAMMc

Where Do You Start • Create – Simple Application • Follow Oracle’s Tutorial

Description

Location

Oracle Tutorial

http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_55/jdtut_11r2_55_1.html

What To Learn

What To Learn? • Java Basics • Primitive data types • Data types / variables • Strings • Maps • Arrays / Lists • Variable scope

• Operator • Ternary operator • Relational and conditional operations • If statement • Loops • Try Catch Finally

Description

Location

Oracle Java Tutorial

http://docs.oracle.com/javase/tutorial/

IBM Java Tutorial

http://www.ibm.com/developerworks/java/tutorials/j-introtojava1/j-introtojava1-pdf.pdf

What To Learn • Groovy - Expression Language (EL ) Access Data/Methods Within The Application #{. }

Description

Location

Introduction to Groovy Support in JDeveloper and Oracle ADF 11g

http://www.oracle.com/technetwork/developer-tools/jdev/introduction-togroovy-128837.pdf

What To Learn • JDeveloper Tool Tool Bar Projects Panel Object Navigation

UI Page

Component Pallet

Comparable to Forms Canvas

Canvas Tool Pallet

Data Control Panel

Property Inspector

Structure Window

Property Pallet

Log Window

Do I Need To Take Any Formal Classes

Do I Need To Take Any Formal Classes • Java You can learn from on-line documentation • Groovy You can learn from on-line documentation • JDeveloper I would only recommend taking a formal class after reviewing all of the materials mentioned in this presentation and white paper. Oracle’s Developers Guide for Application Development Framework is really the only reference you need.

ADF Concepts New To You

ADF Concepts New To You • ADF Concepts What Is ADF? Oracle Application Development Framework (ADF) is a Java-based development tool (much like Oracle Forms is a PL/SQL-based tool) designed to take full advantage of Java Enterprise Edition or Java EE.

ADF Concepts New To You • Module View Controller Desktop ADF Swing

Browser-Based Office

JSP

JSF

ADF Faces

MetaData Services (MDS)

View

Browser-Based Struts

JSF/ADF Task Flow

Controller

ADF Bindings

Java

EJB

Model

BAM

Top Link

Relational Data

XML Data

BPEL

Web Services

ADF BC

Legacy Data

BI

Essbase

Portals

Package Applications

Business Services

Data Services

• The view layer contains the UI pages used to view or modify that data • The controller layer processes user input and determines page navigation • The model layer represents the data values related to the current page • The business service layer handles data access and encapsulates business logic

ADF Concepts New To You • ADF vs. Oracle Forms ADF

Oracle Forms View (UI) Java UI Renderer

Web and Wireless Clients

Rich Clients

UI Logic

Block UI Definition

Contoller Controller

Navigation Logic

Model

Model

Data Logic

Data Block Definition

Record Manager Business Services SQL Interface

ADF Concepts New To You • Model Entity Object is a database table on which DML operations are performed. In Oracle forms, this is the Record Manager. View Object can represent a single database table or a group of database tables linked together via relationships. View Link– is a relationship between two view objects that are joined by one or many database columns. Association “Link” is a relationship between two entity objects, which can be represented by a primary – foreign key relationship in a database.

ADF Concepts New To You • View View layer is the user interface that displays data from the Model layer.

ADF Faces provides over 100 rich components, including hierarchical data tables, tree menus, in-page dialogs, accordions, dividers, and sortable tables.

Description

Location

ADF Faces Rich Client Demos

http://jdevadf.oracle.com/adf-richclient-demo/faces/index.jspx

ADF Concepts New To You • Controller The Controller layer processes user input and determines page navigation. JDeveloper provides a declarative way, or Task Flow, to pass application control between different types of activities such as pages, methods within managed beans, transaction support, save points, or calls to other task flows. Unbounded Task Flow is essentially the entry point into your application or home page. There can only be one unbounded task flow per application. Bounded Task Flow is a modular and reusable application flow with a defined entry point (i.e. default activity), but can have zero to many exit points. Additional information about Task Flows are as follows:

Description

Location

Task Flow Design Fundamentals

http://www.oracle.com/technetwork/developer-tools/jdev/adf-task-flowdesign-132904.pdf

ADF Concepts New To You • Object Life Scope

Description

Location

Developer's Guide for Oracle Application Development Framework

Understanding the Fusion Page Lifecycle

ADF Concepts New To You? • Application Module This is a collection of business rules and transactions (view objects and view links defined in the Model layer) that are related to a certain function or use case. As for Oracle Forms, the Form itself is an application module because it is a collection of business rules and transactions that are combined together to archive a business requirement.

ADF Concepts New To You • Data Binding Data binding is a connection between UI components to data controls exposed via the Application Module. Once the UI consumes a View Object or method exposed in the data control, a binding is created between the Model layer and View layer. The following diagram illustrates the data binding concept.

ADF Concepts New To You • Managed Bean A managed bean is a reusable software component for Java that represents a manageable resource including components, applications or devices. They are used to encapsulate many objects into a single object (the bean), so that they can be passed around as a single bean object instead of as multiple individual objects. As comparison to Oracle Forms, a managed bean would contain all the PL/SQL related UI behavior.

ADF Concepts New To You • Where Do You Write Your Custom Java Code There are various Java classes and “levels” to write your custom code and based on the requirement it should be written at a certain “level”. Location Guide Application Module Application module class is the place where you can write your service-level application logic. Execute database command or block of PL/SQL Access Existing View Objects Access DBTransaction Object EntityImpl Class The EntityImpl class is the base class for entity objects which encapsulate the data, validation rules, and business behavior for your business domain objects. •doDML Operations (Like Triggers)

ADF Concepts New To You Location

Guide

ViewObjectImpl Class

A view object is a base class for view objects • Set Where By Clause • Set Order By Clause A view object is a base class for view row objects • Transient Values This is where you store all your UI based code that controls the page as well as call methods in the application module.

ViewRowImpl Class Managed Bean

• • • •

Initialize code for your session Call methods defined in the application module Conditionally Rendering Set variables

For Form Developers, this is where all your UI events triggers

ADF Concepts New To You • Debugging • System.out.println, or SOP is equivalent to dbms_output in PL/SQL. • ADF Logger is a logging mechanism, which is built into the ADF framework. • The JDeveloper tool provides declarative breakpoints that you can set at the ADF object level.

ADF vs. Oracle Forms

ADF vs. Oracle Forms • Navigation – First Page JDeveloper

Oracle Forms Developer

ADF vs. Oracle Forms • Database Connection JDeveloper

Oracle Forms Developer

ADF vs. Oracle Forms • Parameters JDeveloper

Oracle Forms Developer

ADF vs. Oracle Forms • Create Tables / View Objects JDeveloper

Oracle Forms Developer

ADF vs. Oracle Forms • Create Association Link JDeveloper

Oracle Forms Developer

ADF vs. Oracle Forms • Create View Link JDeveloper

Oracle Forms Developer

ADF vs. Oracle Forms • Create LOV JDeveloper 1. Create a read-only view

Oracle Forms Developer 1. Create a record group which is equivalent to a read-only view object in ADF

2. Associate read-only view to the view object 3. Link read-only view to an attribute within a view object & map the result set to that attribute

2. Create a list of values (LOV) mapping between the definition of the result set and the Data Block field. 3. Link the list of values to a data block field

ADF vs. Oracle Forms • Control UI Behavior JDeveloper Listeners & Java public void OrderNumberChangeListener(ValueChangeEvent valueChangeEvent) { if (orderNumberBind != null){ //Read Only this.orderNumberBind.setReadOnly(Boolean.TRUE); } }

Oracle Forms Developer Triggers (POST-CHANGE) & PL/SQL IF :OE_ORDER.HADERS.ORDER_NUMBER IS NOT NULL THEN app_item_property.set_property('OE_ORDER_HEADERS.ORDER_NUMBER', ENTERABLE, PROPERTY_OFF); END IF;

ADF vs. Oracle Forms • Control UI Behavior – Properties JDeveloper

Oracle Forms Developer

Deployment

Deployment • Compile Project JDeveloper

Oracle Forms Developer

Deployment • Define Deployment Profile JDeveloper

• Depends On Type Of Project • Stand Alone Application • (WAR) UI Project Properties • (EAR) Application Properties • Consumed Application • (ADF Library JAR File) UI Project Properties

Oracle Forms Developer

• There is no profile

Deployment • Upload To Server JDeveloper

Oracle Forms Developer

• JDeveloper • FTP • Configure Application Deployment • $XXX_TOP/forms/US • Configure IDE Connections (Application Server) • chmod 755

• Register the application in Oracle EBS • WLS Deployment Tool • Upload File To Web Logic Server (WLS) • Run WLS Deployment Tool – WLS Console

Description

Location

Deploying Applications To WebLogic Server Using JDeveloper and WLS Console

http://www.quovera.com/whitepapers/downloads/rmoug_2012_ deployment_doc.pdf

Web Logic Server (WLS)

Web Logic Server (WLS) • Local  http://127.0.0.1:7101/console/

Web Logic Server (WLS) • Local  http://127.0.0.1:7101/console/

Web Logic Server (WLS) • Setup DB connections

•Setup New Domain

Lessons Learned

Lessons Learned • • • • • • • • • • • •

Secure an ADF Architect Define Standards & Methodology Define Your Data Model Before Starting Use Standard UI Functionality Identify Reusable UI & Create A Separate Task Flow Define One Set Of Utility Functions Review WLS Error Logs – During Testing Cycle Check Application In Supported Web Browsers Save Often System Resources Are Low – Exit & Check Project Do Not Hibernate Your Computer With JDeveloper Multi-Language Support & Resource Bundle Standards

Lessons Learned • • • •

Test your application for Activation / Passivation Web browser and versions could act differently Always check for a null / blank variable before getting If you need to loop through a table in your page then use another iterator or createRowSetIterator • While searching the internet for a solution make sure the solution is based on your version of Jeveloper and WLS.

Questions? Comments?

THANK YOU Thomas Korbecki [email protected] www.oAppsNet.com

Download This Paper From www.oAppsNet.com