Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier...

53
Lucas Jellema OUGF Harmony 2014 – 4-5 June 2014 – Finland ADF in action – getting (re)acquainted with Oracle’s premier application development framework

description

ADF is the strategic application development framework for Oracle, a core element in Fusion Middleware. ADF can be used to create large scale, enterprise applications. It can be used to create entirely license free applications. It can be used to create cloud applications and also applications that can be used from all kinds of mobile devices. This presentation shows through a large number of screenshots how a simple demo application can be created - which has a panelSplitter, panelTabbed, a table, a horizontal barchart, a pie chart and a popup with a synchronized details table.

Transcript of Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier...

Page 1: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

Lucas Jellema

OUGF Harmony 2014 – 4-5 June 2014 – Finland

ADF in action – getting (re)acquainted with Oracle’s premier application development framework

Page 2: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

2

ADF BC

• Expose tables, views and custom SQL queries as Java Services• Declarative• Productive• Very similar to Forms blocks• Features

– Optimistic & pessimistic locking– Transaction Management– Pooling of database session connections– Caching of queried and manipulated data– Validation of data manipulations– Enrichment of data fetched from the database– Web session (state) management– Oracle SQL comes naturally (sequence, return after DML, joins, BLOBs, PL/SQL,..)– Master/detail coordination

ADF BC

Page 3: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

3

Demo

• HRService from tables in HR schema– Add custom SQL with salary aggregation per department– Add business rules

• Run the ADF BC Service Tester• Expose HRService as a SOAP/XML Web Service• Invoke HRWebService from Soap UI

Page 4: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

4

Create new ADF Fusion Web Application

Page 5: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

5

Define Application Name – then Finish

Page 6: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

6

Create Business Components from Tables & Views in DB

Page 7: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

7

Select Tables (& Views) in DB – set name for Entity Objects

Page 8: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

8

Derive ViewObjects from EntityObjects

Page 9: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

9

Define the Business Service Name and Finish

Page 10: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

10

Define Business Rule for Employee EntityObject

Page 11: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

11

Business Rule: Salary should not be under 1200

Page 12: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

12

Create Custom SQL based ViewObject – to fuel Charts

Page 13: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

13

Aggregating SQL query to base the ViewObject on

Page 14: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

14

Define Key attribute and Associated with HrService

Page 15: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

15

Data Model in HrService

Page 16: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

16

Run the HrService – to test the data model, queries and rule

Page 17: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

17

Department => Employees ViewLink (master-detail synch)

Page 18: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

18

Testing the Business Rule for Salary values

Page 19: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

19

Testing the custom SQL based ViewObject

Page 20: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

20

Define a Web Service on top of the business service HrService

Page 21: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

21

Define the operations to expose in the Web Service

Page 22: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

22

ADF BC Application Moduleexposed as Web Service

Page 23: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

23

Business Service: HRService

ADF BC

Departments

Employees

SalaryPerDepart

mentVW

DepartmentsVw EmployeesVw

EmployeeDepartmentEntity Objects

View Objects

Page 24: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

24

Business Service: HRServiceExposes an ADF Model Data Control

ADF BC

DepartmentsEmployees

SalaryPerDepart

mentVW

DepartmentsVw EmployeesVw

EmployeeDepartment

Page 25: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

25

Data Controls – abstract business service

Page 26: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

26

Demo objective

• Screenshot of page to create• Based on Departments & Employees tables

– And custom SQL query for aggregation

• Show table with all departments• Show bar chart with top X departments in terms of salary sum (or avg

salary)• Popup per department with table with employees

– Move and resize columns– Sort and filter records

Page 27: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

27

Demo objective

Page 28: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

28

Create new Web Page(ADF Faces)

Page 29: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

29

Select new page style

Page 30: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

30

Add PanelHeader to page

Page 31: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

31

Add PanelSplitter to page

Page 32: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

32

Create a data bound table of all departments

Page 33: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

33

Add PanelTabbed

Page 34: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

34

Add SalaryPerDepartmentVw as Data Bound Chart

Page 35: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

35

Select chart type – then configure selected chart

Page 36: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

36

Add Data Bound Pie Chart

Page 37: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

37

Page 38: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

38

Page 39: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

39

Page 40: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

40

Demo steps

• Add popup• Add button and listener to show popup• Drag panelwindow• Drag Employees table - sort, filter, resize and move columns

• Show results

Page 41: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

41

Add a popup component to the page

Page 42: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

42

Add a PanelWindow inside the popup component

Page 43: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

43

Add a data bound table to the popup (with employee details)

Page 44: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

44

Add the ShowPopupBehavior: show popup on hover over department id

Page 45: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

45

Running the application with Employee details popup

Page 46: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

46

ADF BC Validation is handled in User Interface

Page 47: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

47

Some table features:Filter records on column expressions

Page 48: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

48

Some table features:Move and Resize columns

Page 49: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

49

Some table features:Hide/Show columns

Page 50: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

50

Some table features:Detach table (to full page)

Page 51: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

51

Detached table – full page view

Page 52: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony

52

Prepared advanced demo

• Login & Log out• Personalization: move, resize and hide columns• Skin Switcher• Language switcher• Commit – Validation/Error handling

Page 53: Demonstrating ADF in Action through screenhots - getting (re)acquainted with Oracle’s premier application development framework - OUGF 2014 Harmony