oracle adf architecture tv - design - adf service architectures

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

Upload: chris-muir

Post on 11-Nov-2014

196 views

Category:

Technology


3 download

DESCRIPTION

Slides from Oracle's ADF Architecture TV series covering the Design phase of ADF projects, investigating different mechanisms to publish your ADF components as web services. 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 - ADF Service Architectures

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

Page 2: Oracle ADF Architecture TV - Design - ADF Service Architectures

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

Real World ADF Design & Architecture Principles ADF Business Components as a Service

ORACLE PRODUCT

LOGO

15th Feb 2013 v1.0

Page 3: Oracle ADF Architecture TV - Design - ADF Service Architectures

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 that you can leverage existing ADF skills to create SOAP ad REST Service

– Understand how to design ADF BC business logic so it can be reused for Web, Mobile and SOA access

– Separate ADF BC services from web modules to avoid unnecessary code deployments

Image: imagerymajestic/ FreeDigitalPhotos.net

Page 4: Oracle ADF Architecture TV - Design - ADF Service Architectures

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

Exposing ADF BC models as SOAP and REST services allows you to reuse your business

logic for SOA and mobile access.

This truly enforces consistency and accelerates developer productivity. Just perfect!

Image: Ambro/ FreeDigitalPhotos.net

Page 5: Oracle ADF Architecture TV - Design - ADF Service Architectures

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

Program Agenda

•  ADF BC SDO Services •  ADF BC Restful Services •  Best Practices

Page 6: Oracle ADF Architecture TV - Design - ADF Service Architectures

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

ADF BC SDO Services

•  Service enabled Application Modules accessed from –  Web Service clients –  Service Component Architecture (SCA) composite –  Other ADF BC applications

•  Service interface exposes –  View Object rows as SDO objects –  Operations, Custom methods –  View Criteria queries

•  EJB 3.0 annotated Web Service (Remote Interface)

In a Nutshell

Page 7: Oracle ADF Architecture TV - Design - ADF Service Architectures

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

ADF BC SDO Services Architecture

Fram

ewor

k E

xten

sion

s

Ser

vice

Inte

rface

EJB

3 S

essi

on B

ean

WS

DL

AM

ADF BC Entities

SOA

JAX-WS Client

VO

E

O

Page 8: Oracle ADF Architecture TV - Design - ADF Service Architectures

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

Program Agenda

•  ADF BC SDO Services •  ADF BC Restful Services •  Best Practices

Page 9: Oracle ADF Architecture TV - Design - ADF Service Architectures

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

ADF BC RESTful Services

•  REST enabled Application Modules accessed from –  HTML clients –  Mobile clients –  Enterprise applications

•  REST Interface exposes –  VOs as resources –  Payloads in JSON format –  CRUD operations via standard HTTP methods –  Resource metadata available via “describe” functionality

In a Nutshell (planned feature)

Page 10: Oracle ADF Architecture TV - Design - ADF Service Architectures

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

ADF BC RESTful Services Architecture

Fram

ewor

k E

xten

sion

s

Web

Ser

vice

s

Ser

vlet

Des

crib

e Fu

nctio

nalit

y

AM

Mobile Clients

Web Browser

JAX-RS Client

VO

E

O

Page 11: Oracle ADF Architecture TV - Design - ADF Service Architectures

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

Program Agenda

•  ADF BC SDO Services •  ADF BC Restful Services •  Best Practices

Page 12: Oracle ADF Architecture TV - Design - ADF Service Architectures

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

ADF BC Services

•  Think "Service" ! –  Create services that are not too fine grain –  Use "Java Extended For Oracle" data maps

•  Think deployment! –  Deploy only the sources used by a service

•  Think network! –  Expose only data used by clients –  Consider deferred parent-child data fetching

Best Practices

Page 13: Oracle ADF Architecture TV - Design - ADF Service Architectures

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

Workspace & Project Organization Options Dedicated Service Projects and ADF Library

SDO Model Project

REST Model Project

Web Model Project

ADF Library

EO EO VO AM

EO VO AM

EO VO AM

EO

EO

EAR

EAR

EAR

Page 14: Oracle ADF Architecture TV - Design - ADF Service Architectures

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

Workspace & Project Organization

•  Organize Project structure by deployable unit –  Use JDeveloper workspace to hold ADF BC service projects for a

specific module of your application (e.g. Warehouse, Storefront, Human Resources, etc.)

–  Use one Project for each ADF BC service you build –  If reuse is possible, build ADF Libraries for shared model artifacts (entity

objects, view objects, base classes)

Dedicated Service Projects and ADF Library

Page 15: Oracle ADF Architecture TV - Design - ADF Service Architectures

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

I understand that ADF Business Components is only one option to provide a service interface to application logic and data. What other options are available? And if there are other options, when do I use them?

Image: imagerymagestic/ FreeDigitalPhotos.net

Page 16: Oracle ADF Architecture TV - Design - ADF Service Architectures

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

If enterprise data is accessed from multiple devices, and if this access is not necessarily related to the ADF application I build, what would be the impact to my ADF architecture decision?

Image: imagerymagestic/ FreeDigitalPhotos.net

Page 17: Oracle ADF Architecture TV - Design - ADF Service Architectures

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

Conclusion •  Consider reuse of your business logic in SOA environments and with mobile •  Save entities (and optional view objects as well) in ADF libraries for reuse in Web,

SOAP and REST projects –  For your reusable bits, don't rely on

•  User session •  ADF BC session

–  getUserData()

•  Tailor services to the service need –  Ensure best performance by reducing the content to be passed back and forth

•  Access channel and remote data access requirements determine the service that exposes data –  Access to application data that uses the same business logic –  Generic access to enterprise data that does not necessarily belong to the ADF application you build

Page 18: Oracle ADF Architecture TV - Design - ADF Service Architectures

18 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

•  "Integrating Service-Enabled Application Modules"

•  Oracle Magazine on ADF BC SDO Services –  http://www.oracle.com/technetwork/issue-archive/2012/12-sep/

o52adf-1735897.html

Page 19: Oracle ADF Architecture TV - Design - ADF Service Architectures

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