oracle adf architecture tv - design - task flow overview

29
1 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

Upload: chris-muir

Post on 11-Nov-2014

186 views

Category:

Technology


1 download

DESCRIPTION

Slides from Oracle's ADF Architecture TV series covering the Design phase of ADF projects, providing an overview on task flows. Like to know more? Check out: - Subscribe to the YouTube channel - http://bit.ly/adftvsub - Design Playlist - http://www.youtube.com/playlist?list=PLJz3HAsCPVaSemIjFk4lfokNynzp5Euet - Read the episode index on the ADF Architecture Square - http://bit.ly/adfarchsquare

TRANSCRIPT

Page 1: Oracle ADF Architecture TV - Design - Task Flow Overview

1 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

Page 2: Oracle ADF Architecture TV - Design - Task Flow Overview

2 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

Real World ADF Design & Architecture Principles ADF Task Flow Overview

ORACLE PRODUCT

LOGO

15th Feb 2013 v1.0

Page 3: Oracle ADF Architecture TV - Design - Task Flow Overview

3 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

Learning Objectives

•  At the end of this module you should be able to:

– Understand the difference between page oriented and task flow oriented development

– Explain the benefits ADF task flows provide – Understand bounded task flow metadata files and properties

Image: imagerymajestic/ FreeDigitalPhotos.net

Page 4: Oracle ADF Architecture TV - Design - Task Flow Overview

4 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

Program Agenda

•  Characteristics and Benefits of Task Flows •  Service Oriented Development •  Task Flow Design Fundamentals

Page 5: Oracle ADF Architecture TV - Design - Task Flow Overview

5 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

ADF Task Flow - Key Benefits

•  Partitions and modularizes large business applications •  Visual task flow diagrams

–  Provide a shared language between developers and domain experts

•  Reusable application flows published via ADF Libraries •  Can have isolated transactions •  Can be used as "remote services with a UI" •  Supports traditional web navigation model and rich internet

navigation models •  Support for nested control flows

Page 6: Oracle ADF Architecture TV - Design - Task Flow Overview

6 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

ADF Task Flow - Key Benefits

•  On-board security –  ADF Security –  Bounded task flow browser access protection

•  Additional memory scopes –  Avoid memory attribute name conflicts –  Avoid memory bloating

•  Improved and declarative exception handling •  Load on demand •  Static and dynamic configuration

Page 7: Oracle ADF Architecture TV - Design - Task Flow Overview

7 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

Secret of Oracle ADF Rockstar Programmers

"Develop User Interface Services – Not Pages"

Steven Davelaar, "Building Highly Reusable Task Flows" http://www.slideshare.net/stevendavelaar/reusable-taskflows

Page 8: Oracle ADF Architecture TV - Design - Task Flow Overview

8 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

Program Agenda

•  Characteristics and Benefits of Task Flows •  Service Oriented Development •  Task Flow Design Fundamentals

Page 9: Oracle ADF Architecture TV - Design - Task Flow Overview

9 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

Analogy Service Orientation

“When building distributed solution logic, design approaches revolve around a software engineering theory known as the separation of concerns. In a nutshell, this theory states that a larger problem is more effectively solved when decomposed into a set of smaller problems or concerns."

Thomas Erl, "SOA: Principles of Service Design"

Page 10: Oracle ADF Architecture TV - Design - Task Flow Overview

10 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

Service Oriented Development

•  SOA uses the concept of services –  Predominately about services and information flow –  Fine grained services are consumed by larger composite

•  Service Oriented Development –  Web based analogy to SOA –  Suits ADF development –  About web tasks/processes and how they’re chained –  Fine grained task flows are consumed by larger apps –  Aligns with the UX concepts of task driven design

Page 11: Oracle ADF Architecture TV - Design - Task Flow Overview

11 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 11 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

Hands up, are task flows services?

Exercise

Image: imagerymajestic/ FreeDigitalPhotos.net

Page 12: Oracle ADF Architecture TV - Design - Task Flow Overview

12 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

Task Flow Oriented Architecture (TOA)

•  Think task flow from design time on – Create a task flow portfolio plan

•  Inventory of existing task flows • Requirement for new task flows

•  Ensure objectives and requirements reflect task flow benefits – Reuse, loose-coupling

•  Use parent task flows to orchestrate child flows •  Identify patterns and standardize on them

Page 13: Oracle ADF Architecture TV - Design - Task Flow Overview

13 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 13 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Image: imagerymajestic/ FreeDigitalPhotos.net

•  Knowing about SOA and service principles is a valuable starting point for developing Task Flow best practices

•  Task Flows prepare applications for change •  Task Flows implement business use cases or parts of •  Task Flows separate process flows from business logic

•  There is no fixed sizing recommendation: Sky is the limit and common sense a good judge

Page 14: Oracle ADF Architecture TV - Design - Task Flow Overview

14 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

Program Agenda

•  Characteristics and Benefits of Task Flows •  Service Oriented Development •  Task Flow Design Fundamentals

Page 15: Oracle ADF Architecture TV - Design - Task Flow Overview

15 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

Java Server Faces and MVC Responsibility of the Controller

request

response View Model

Controller

Faces Servlet

faces-config.xml

component events

Component Model

Converter, Validator, Renderer

JSF document

Business Objects (Managed Beans)

Phase Events

Component event Listener and action handlers

Page 16: Oracle ADF Architecture TV - Design - Task Flow Overview

16 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

ADF with ADF Controller and MVC Responsibility of the Controller

request

response View Model

Controller

Faces Servlet

adfc-config.xml

component events

ADF Binding

Converter, Validator, Renderer

JSF document

Data Control (Business Service)

Phase Events

Component event Listener and action handlers

Page 17: Oracle ADF Architecture TV - Design - Task Flow Overview

17 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

Bounded Task Flow

•  XML defined in View Controller project

•  Located in WEB-INF directory or (better) sub-folder(s) therein

•  XML –  Defines task flow behavior like transaction

management and Data Control sharing –  Defines activities

•  Activities reference views, methods, operations, task flows, switcher statements

–  Defines managed beans used in task flow –  May reference task flow template

Page 18: Oracle ADF Architecture TV - Design - Task Flow Overview

18 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

Bounded Task Flow Diagram

Page 19: Oracle ADF Architecture TV - Design - Task Flow Overview

19 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

Bounded Task Flow Properties

Page 20: Oracle ADF Architecture TV - Design - Task Flow Overview

20 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

Properties

Property Description Default Activity Activity that is invoked first when a bounded task flow is called.

Exception Handler Activity that is called by the framework in case of an exception

Initializer Invokes managed bean method upon task flow initialization before any activity is executed.

Finalizer Invokes managed bean method upon task flow exit using return activity.

URL Invoke Bounded task flows using JSPX documents may be called directly from a browser URL. This property defines which task flow is browser accessible and which task flow can only be accessed from within an ADF application.

Managed Beans Managed bean definitions for use within the bounded task flow.

Input Parameter Definitions API contract between the bounded task flow and the calling task flow or view.

Commonly Used in Bounded Task Flows

Page 21: Oracle ADF Architecture TV - Design - Task Flow Overview

21 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

Properties

Property Description Return Value Definitions API contract between bounded task flow calling task flow. Requires task flows

called via task flow call activity

Train Defines whether or not the bounded task flow exposes a train model for navigation

Critical If save point feature is used, critical ensures a save point is taken when the task flow is left for the application to recover to this state

Transaction Defines the transaction setting for the bounded task flow and whether the data control is shared or not (isolated). Also defines if an implicit save point is taken when navigating into a bounded task flow that does not run in its own transaction

Commonly Used in Bounded Task Flows

Page 22: Oracle ADF Architecture TV - Design - Task Flow Overview

22 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

Task Flow Communication

•  Input Parameter

•  Return values

Page 23: Oracle ADF Architecture TV - Design - Task Flow Overview

23 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

Exception Handling

•  Exceptions can be mapped to an activity •  Called when exceptions are thrown

–  Not a “normal” part of a flow

<exception-handler>unexpectedErrorPage</exception-handler>

Page 24: Oracle ADF Architecture TV - Design - Task Flow Overview

24 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

About ADF Regions

•  Display task flows in independent areas of a page or a page fragment

•  Executes a task flow without requiring the parent view to refresh •  Key enabler of enterprise Web 2.0 development with the Oracle

Fusion development platform •  Allows building desktop like web user interfaces that unveil the real

power of Ajax •  Basis of UI Shell layout pattern

Page 25: Oracle ADF Architecture TV - Design - Task Flow Overview

25 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

Use it Inside Another View

Page 26: Oracle ADF Architecture TV - Design - Task Flow Overview

26 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

How-to create an ADF Region •  Drag bounded task flow to visual page editor

–  Task flow must use page fragments

Page 27: Oracle ADF Architecture TV - Design - Task Flow Overview

27 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

Conclusion

•  Think task flow oriented architecture when building ADF applications

•  Bounded task flow and region is the most common pattern used when designing ADF applications

•  Bounded task flows can be deployed and reused as ADF libraries

Page 28: Oracle ADF Architecture TV - Design - Task Flow Overview

28 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

Further Reading

•  http://www.oracle.com/technetwork/developer-tools/jdev/documentation/index.html –  Oracle JDeveloper and ADF Documentation Library –  Fusion Developer Guide

•  Part III Creating ADF Task Flows –  Getting Started with ADF Task Flows –  Working with Task Flow Activities –  Using Parameters in Task Flows

•  Task Flow Design Fundamentals –  http://www.oracle.com/technetwork/developer-tools/jdev/adf-task-flow-

design-132904.pdf

Page 29: Oracle ADF Architecture TV - Design - Task Flow Overview

29 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.