1 of 116

SAGE Computing Services

Customised Oracle Training Workshops and Consulting

Trials & Tribulations of an

Oracle Forms -> Apex Conversion

A Hypothetical Case Study

Scott Wesley

Systems Consultant

2 of 116

Today’s Guide

Strategies

Differences

Considerations

Process

Converter Review

What next?

3 of 116

Strategies

4 of 116

http://strategy2c.wordpress.com/2009/01/10/strategy-for-goldfish-funny-illustration-by-frits/

5 of 116

Oracle Product Strategy

Traditional Development Tools

Java Development Tools

6 of 116

Oracle Forms – Statement of Direction

  • Oracle Forms and Reports
    • “Oracle has no plan to de-support these products, furthermore new versions are components of Oracle Fusion Middleware 11g”
  • Oracle Designer
    • Focus on stability and bug fixes, released via Oracle Development Suite 10g

7 of 116

Lifetime Support Document

8 of 116

Oracle’s Recommendations for Customers

  • Based on E-Business Suite
    • Move from client-server to web
    • Upgrade to latest versions
    • Interoperate with Java/J2EE
    • Develop new modules with JDeveloper

9 of 116

To Quote Oracle…

  • Oracle JDeveloper 11g with ADF is the tool of choice for Forms, Reports and Designer customers because it carries over a similar development model. However, given the architecture difference between Java EE and Forms or Reports, Oracle has no plans to offer a complete migration solution that would attempt to migrate applications built with these tools to Java EE.
  • Instead, Oracle’s strategy is to provide a Java EE development environment exposing similar concepts as Forms and Reports, giving to Forms and Reports developers the opportunity to become productive in a new, but familiar environment.

10 of 116

Application Express – Statement of Direction (Feb09)

  • Native Web application development framework
  • Conceived February 2004 with Oracle Database 10g
  • “APEX 4.0 will focus on declarative support for Web 2.0 features as well as extensibility of APEX framework”
    • APEX Websheets – end user define data rules
    • APEX Listener – J2EE alternative to mod plsql
    • Improved tab forms – validation, collection integration
    • AnyChart 4 – flash based maps, Gantt charts
    • Dynamic Actions – page rendering on client events
    • Declarative support for cascading select lists
    • Extensible item framework – custom item types
    • Updateable Interactive Reports – inline editing
    • New Authentication schemes

11 of 116

Differences

12 of 116

Differences

13 of 116

Basic Differences

Feature

Forms

Application Express

4GL Declarative

Renders applications with metadata in .fmx

Renders applications using metadata stored in database

4GL Languages

Client Side PL/SQL

Server Side PL/SQL

User Interface

Java

HTML

Web Services

Yes

Yes

14 of 116

Key Differences

Feature

Forms

Application Express

Page Layout

Windows / Canvases

Pages / Regions

Client-side Field Control

Forms Triggers

Javascript / AJAX

Locking

Pessimistic / Optimistic / Custom

Optimistic

Database Connection

Synchronous

Asynchronous

Concurrent User Support

Connectivity by user session

Connection only maintained for processing requests

Architecture

3 Tier

2/3 Tier

Reporting

Oracle Reports / BI Beans

Flash Charts / BI Publisher

15 of 116

16 of 116

Project Considerations

Project Considerations

17 of 116

Project Expectations

    • Suitable application development environment �(why, what, who, where)

Right Reason

    • Change of behaviour
    • Best out of Apex?
    • Retraining required?

Conversion

    • Stateful -> Stateless
    • UI – layout / flow

Architecture

    • Saving v Conversion Cost

Cost

    • Case studies
    • Feedback

Customer

18 of 116

Technical Expectations

  • Forms triggers
  • PLLs
  • Forms built-ins
  • Code split into UI / data layers?
  • Blocks based on stored procedures
  • Control blocks
  • Ongoing changes
  • Turnkey vs Phase

Developer

Architecture

  • Menus (security)
  • Object libraries
  • Validation
  • Hotkeys
  • Reports (printing = $$)
  • Turnkey vs Phase
  • Storyboards

19 of 116

A Hypothetical Case Study

20 of 116

A Hypothetical Case Study

  • PLL
  • Menu
  • Reports
  • Forms
    • LOVs
    • Program Units
    • Validation triggers
    • Event triggers
    • Alerts
    • Images
    • Parameters
    • Visual Attributes
    • Hierarchical Tree
    • Procedure based block

21 of 116

1) Splash Screen

22 of 116

2) Basic Form, Various item types, �LOV, Post-Query

23 of 116

3) Master Detail

24 of 116

4) Tabular Form, Basic validation,�Pre-Insert, Overflow

25 of 116

5) Hierarchy, Single Record Entry

26 of 116

6) View only, Procedural Entry Example

27 of 116

Conversion Process

28 of 116

Conversion Process Theory

  • Chapter 4 – Converting an Oracle Forms Application
  • How to convert your application
    • Step 1: Convert Oracle Forms to XML
    • Step 2: Create a Workspace and add APEX Users
    • Step 3: Upload database objects into the schema associated with your workspace
    • Step 4: Create a conversion project
    • Step 5: Review and edit forms metadata
    • Step 6: Generate the Oracle APEX Application
  • Deleting a migration project

29 of 116

30 of 116

Apex Migration Guide

31 of 116

Apex Migration Guide

32 of 116

Microsoft Access not forgotten

33 of 116

Step 1 - Convert Modules to XML

34 of 116

Step 1: Convert .fmb, .olb, .mmb files to XML

S:\SW-SHARE>frmf2xml overwrite=yes bookings.fmb

Oracle Forms 10.1.2 Forms to XML Tool

Copyright(c) 2001, 2005, Oracle. All rights reserved.

Processing module bookings.fmb

WARNING: Item STATUS - all ListItemElements must have an Index, Name and Value.

XML Module saved as bookings_fmb.xml

35 of 116

Convert .pll to .pld

36 of 116

Convert .rdf, .jsp to XML

37 of 116

Resulting XML

38 of 116

Step 3 - Create Migration Project

39 of 116

Application Migration?

40 of 116

Application Conversion

41 of 116

Define Project

42 of 116

First error…

43 of 116

Second error…

44 of 116

Upload more files

45 of 116

46 of 116

Third error…

47 of 116

Migration Summary (Summit)

48 of 116

Migration Summary (Sage)

49 of 116

Annotations

50 of 116

Step 4 – Analyse the Application

51 of 116

Forms Objects

52 of 116

53 of 116

Metadata differences

54 of 116

Forgotten Metadata

55 of 116

Custom Query

56 of 116

Getting your query right

57 of 116

Exclude Items

58 of 116

alter table organisations add

(close_btn raw(1), save_btn raw(1));

59 of 116

(Explore meta-data)

60 of 116

SAGE@sw10g> break on presentation skip 10

61 of 116

Register for the Next

Application Express V3.2 course:

23rd ,25th and 26th November

Advanced course:

8th – 9th December

Talk to Sage about moving your Forms applications to Apex

Call in at the Sage Computing Services exhibition booth, or contact Penny

penny@sagecomputing.com.au

0419904458

SAGE Computing Services

(Unrepentant Marketing)

62 of 116

Step 5 – Generate the Apex Application

63 of 116

Generate Application - Theory

64 of 116

Blocks

Regions

65 of 116

Triggers

Computation / Validation / Process

66 of 116

Program Units

Computation | Validation | Process

Server side packages

67 of 116

Object Library

d

68 of 116

LOV

(Record Group)

LOV

(Select List | Popup)

?

69 of 116

Alerts

Shared Components

– Text Message

?

70 of 116

Interactive Reports

Interactive Reports

Interactive Reports

Apex Page

Oracle Reports

71 of 116

Apex (potential) Printing Infrastructure

72 of 116

Generate Application - Process

73 of 116

“Compilation errors”

74 of 116

“Compilation errors”

75 of 116

“Compilation errors”

76 of 116

Application Design Model

77 of 116

78 of 116

79 of 116

Add Extra Pages

80 of 116

Define Theme

81 of 116

Confirm Creation

82 of 116

Success!

83 of 116

So what does my new Application look like?

84 of 116

85 of 116

86 of 116

87 of 116

Iterative Process?

88 of 116

UI Defaults

89 of 116

Step 6 – Customise your Apex Application

90 of 116

Annotations

91 of 116

Review

    • Page structures
    • UI - themes / images
    • Navigation components
    • Report implementation

92 of 116

Program Units / Triggers

    • Manually transfer code as validation/computation/process
    • Annotate

93 of 116

Enhance Apex Application

    • Apply conditional processing for regions / items
    • Apply security via authorisation schemes / conditions
    • Apply LOVs, alerts, specific item type attributes (checkboxes, dates)
    • Review all generated buttons
    • Add session state protection
    • Annotate

94 of 116

Add Apex Components

    • Pages, regions, buttons, items as required
    • Implement client-side JS & AJAX
    • Annotate

95 of 116

Develop Database Components

    • Ensure code reused in packages and not embedded in the Apex Application where possible
    • Annotate

96 of 116

Project Management

    • System test
    • Train users
    • Implement application

97 of 116

Where did my time go?

98 of 116

1%

2%

2%

30%

40%

99 of 116

Transform to XML

Create Application Express Workspace / Migration Project

Upload XML files to workspace

Analyse the application metadata

Generate the Application Express Application

Customise the Application Express Application

User Acceptance & Testing

100 of 116

Consumption of Time

Conversion Tool = ~5%

101 of 116

Review

102 of 116

Bottlenecks / Danger Zones

“Oracle has no plans to offer a complete migration solution”

Speedy annotation locate & update

Custom Query modification

Multi-row blocks

Non-database items

Beyond simple block source

Control blocks

PL/SQL Conversion

UI Defaults

103 of 116

What’s missing?

  • Export / Backup
  • Ability to pre-build Apex validations during conversion
    • PL/SQL Placeholders
  • Define item type/order
  • Conversion of LOVs, Alerts
  • Apex Views
    • Annotations
    • Aggregation (combined listings)
  • SQL Developer Integration
  • Search facility (not IR)
  • Bulk change on all object types (not application applicability)
  • XML Metadata
    • Report triggers
    • Certain form properties (eg. WHERE clause)
    • Menu roles
    • Non-Database item recognition
    • ?

104 of 116

Pros

Cons

Annotations

Potential

Added Value

Missing Components

Annotations

Browse Logic

105 of 116

So what’s next?

106 of 116

107 of 116

Conversion Alternatives

  • Integration
    • Wilfred van der Deijl
    • Visual Integration of Forms & Apex
    • Two way communication
    • Phased approach

108 of 116

Conversion Alternatives

  • Manual labour – do it right
    • Storyboards – Balsamiq / MockupScreens / Sketchflow

109 of 116

Conversion Alternatives

  • Mixture
    • Using the annotation functionality
    • Re-use logic where possible

110 of 116

Underlying Data

-- Create view of annotations

create or replace view annotations as

(output of)

select 'select '''||table_name||''' table_name, '

||nvl((select distinct first_value (column_name) over (order by column_id) from all_tab_columns s where m.table_name = s.table_name and s.column_name like '%NAME%') ,

(select distinct first_value (column_name) over (order by column_id) from all_tab_columns s where m.table_name = s.table_name and (s.column_name like '%ROLE%' or s.column_name like '%EXPRESSION%')))

||‘ name, select_for_app, applicable, complete, priority, assignee, notes, tags from '||owner||'.'||table_name||' union all ' a

from all_tab_columns m

where column_name like 'APPLICABLE'

and owner = 'APEX_030200'

and table_name not in ('WWV_MIG_PROJECT_COMPONENTS','WWV_MIG_FRM_COORDINATES','WWV_MIG_RPT_GRP_FILTER'

,'WWV_MIG_RPT_DATASRC_SELECT','WWV_MIG_RPT_DATA'

,'WWV_MIG_FRM_MENUS_MODULES','WWV_MIG_FRM_MODULES','WWV_MIG_OLB_MODULES');

111 of 116

Annotation Summary

112 of 116

Annotation Priority

113 of 116

Today’s Summary

Strategies Forms v Apex v ADF

Differences Stateful v Stateless

Considerations Right Decision

Process Simple

Converter Review Poor

What next?

114 of 116

References

115 of 116

SAGE Computing Services

Customised Oracle Training Workshops and Consulting

Questions and Answers?

Presentations are available from our website:

http://www.sagecomputing.com.au

enquiries@sagecomputing.com.au

scott.wesley@sagecomputing.com.au

http://triangle-circle-square.blogspot.com

116 of 116

Register for the Next

Application Express V3.2 course:

23rd ,25th and 26th November

Advanced course:

8th – 9th December

Talk to Sage about moving your Forms applications to Apex

Call in at the Sage Computing Services exhibition booth, or contact Penny

penny@sagecomputing.com.au

0419904458

SAGE Computing Services

(Unrepentant Marketing)