move-12: openedge®, adobe flex, and openedge...

31
MOVE-12: OpenEdge®, ADOBE FLEX, and OpenEdge Reference Architecture A Look at a Transformation MOVE-12: OpenEdge®, ADOBE FLEX, and OpenEdge Reference Architecture A Look at a Transformation Alvacir Reinaldo Schulze Flávio Eduardo de Córdova

Upload: ngonga

Post on 01-Feb-2018

228 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: MOVE-12: OpenEdge®, ADOBE FLEX, and OpenEdge …download.psdn.com/media/exch_audio/2006/MOVE/MOVE-12_Flavio.pdf · MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

1MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

MOVE-12: OpenEdge®, ADOBE FLEX, and OpenEdge Reference

Architecture

A Look at a Transformation

MOVE-12: OpenEdge®, ADOBE FLEX, and OpenEdge Reference

Architecture

A Look at a Transformation Alvacir Reinaldo Schulze Flávio Eduardo de Córdova

Page 2: MOVE-12: OpenEdge®, ADOBE FLEX, and OpenEdge …download.psdn.com/media/exch_audio/2006/MOVE/MOVE-12_Flavio.pdf · MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

2MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

Agenda

What is Datasul ?A Brief Overview Of Datasul WebdeskMain Features of New ReleaseMain ChallengesMain Goals of New ArchitectureElements of New ArchitectureSample CodeAdobe FlexIntegrating Flex and OpenEdgeWebdesk BPALessons LearnedQuestions & Answers

Page 3: MOVE-12: OpenEdge®, ADOBE FLEX, and OpenEdge …download.psdn.com/media/exch_audio/2006/MOVE/MOVE-12_Flavio.pdf · MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

3MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

What is Datasul ?

Largest Progress ISV in Latin America+60 Thousand Modules Installed80.000 usersMore than 120 Million Source Code LinesMore than 680 developersUS$ 10 Millions invested in Product Development in 2005

Page 4: MOVE-12: OpenEdge®, ADOBE FLEX, and OpenEdge …download.psdn.com/media/exch_audio/2006/MOVE/MOVE-12_Flavio.pdf · MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

4MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

A Brief Overview Of Datasul Webdesk

Enterprise Content ManagerWorkflow EnginePortal ManagerProgress® WebSpeed®Java™ and Microsoft Technologies Integration

Page 5: MOVE-12: OpenEdge®, ADOBE FLEX, and OpenEdge …download.psdn.com/media/exch_audio/2006/MOVE/MOVE-12_Flavio.pdf · MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

5MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

Main Features Of New Release

WebDAV interface (Java)Business Process Analysis (Flex)

WebdeskRepository

Page 6: MOVE-12: OpenEdge®, ADOBE FLEX, and OpenEdge …download.psdn.com/media/exch_audio/2006/MOVE/MOVE-12_Flavio.pdf · MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

6MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

Main Challenges

Reduce Duplicated CodeReduce New Features CostsIntegration to JavaRich User Interface

Page 7: MOVE-12: OpenEdge®, ADOBE FLEX, and OpenEdge …download.psdn.com/media/exch_audio/2006/MOVE/MOVE-12_Flavio.pdf · MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

7MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

Main Goals Of New Architecture

Separate Business Logic and InterfaceLose Coupling Between LayersEnable Heterogeneous TeamsAdoption of Object-Oriented conceptsEnable Better Testing PracticesEnable Continuous Integration

Page 8: MOVE-12: OpenEdge®, ADOBE FLEX, and OpenEdge …download.psdn.com/media/exch_audio/2006/MOVE/MOVE-12_Flavio.pdf · MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

8MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

Elements Of New Architecture

Used Architecture Open Edge Reference Architecture

PresentationPresentation

Business ServicesBusiness Services

Data AccessData Access

Data SourcesData Sources

Com

mon Infrastructure

Com

mon Infrastructure

Enterprise

Services

Enterprise

Services

Data SourcesData Sources

DirectoryDirectory

Domain Manager Business Object

Business ServicesBusiness Services

PresentationPresentation Enterprise

Services

Enterprise

Services

Page 9: MOVE-12: OpenEdge®, ADOBE FLEX, and OpenEdge …download.psdn.com/media/exch_audio/2006/MOVE/MOVE-12_Flavio.pdf · MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

9MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

Elements Of New ArchitectureDirectory

Represents the application’s repository where all objects are storedManages all CRUD operationsHides Business Objects’ implementation from the client (using logical names to find them)Optimizes queries in database

Page 10: MOVE-12: OpenEdge®, ADOBE FLEX, and OpenEdge …download.psdn.com/media/exch_audio/2006/MOVE/MOVE-12_Flavio.pdf · MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

10MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

Elements Of New ArchitectureDirectory

Application’s Repository

Application’s Repository

BOBO

lookup

insert update

remove

BOBO BOBO

BOBO

Page 11: MOVE-12: OpenEdge®, ADOBE FLEX, and OpenEdge …download.psdn.com/media/exch_audio/2006/MOVE/MOVE-12_Flavio.pdf · MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

11MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

Elements Of New ArchitectureDomain Manager

Publishes what type of business object are available to the directoryGives directory meta-information of how to look for objects (table name, field mapping, query constraints) when they are persisted in the databaseInitializes business objects before they are made available to clients

Page 12: MOVE-12: OpenEdge®, ADOBE FLEX, and OpenEdge …download.psdn.com/media/exch_audio/2006/MOVE/MOVE-12_Flavio.pdf · MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

12MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

Elements Of New ArchitectureDomain Manager

You may have inherited classes. All implementations will

probably be considered in the

same domain.

You may have inherited classes. All implementations will

probably be considered in the

same domain.

Page 13: MOVE-12: OpenEdge®, ADOBE FLEX, and OpenEdge …download.psdn.com/media/exch_audio/2006/MOVE/MOVE-12_Flavio.pdf · MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

13MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

Elements Of New ArchitectureDomain Manager

Compositions are usually encapsulated in the same Business

Object.

Compositions are usually encapsulated in the same Business

Object.

Page 14: MOVE-12: OpenEdge®, ADOBE FLEX, and OpenEdge …download.psdn.com/media/exch_audio/2006/MOVE/MOVE-12_Flavio.pdf · MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

14MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

Elements Of New ArchitectureBusiness Object

Encapsulates business logic of a specific entityUsually access database to persist data (insert, update and remove), even though may use DAOs if needed.May encapsulate more than one entity (main entity plus compositions)Provides accessor methods to entity’s attributesProvides a well-defined interface to be implemented by the developer.

Page 15: MOVE-12: OpenEdge®, ADOBE FLEX, and OpenEdge …download.psdn.com/media/exch_audio/2006/MOVE/MOVE-12_Flavio.pdf · MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

15MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

Elements Of New ArchitectureThe Service Façade

Exposes Business Object’s logic as services to user interface or to external applicationsDo not encapsulate any business logic or database access. Only make use of Business Objects to complete a specific task.May be accessed through different technologies (Java Proxies, .Net™ Proxies, WebServices, Local 4GL, AppServer™ 4GL, etc.).Usually stateless

Page 16: MOVE-12: OpenEdge®, ADOBE FLEX, and OpenEdge …download.psdn.com/media/exch_audio/2006/MOVE/MOVE-12_Flavio.pdf · MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

16MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

Sample CodeLooking for objects

DEFINE TEMP-TABLE ttReferencesFIELD namingRef AS CHARACTER.

hDirectory = instantiateDirectory().

RUN lookup IN hDirectory(INPUT “webdesk://localhost/users/*?Active=true”,INPUT-OUTPUT TABLE ttReferences).

FIND FIRST ttReferences.

RUN getBO IN hDirectory(INPUT BUFFER ttReferences:HANDLE,OUTPUT hBO).

RUN getName IN hBO (OUTPUT cName).

releaseDirectory().

Get reference to the Directory

Search in the directory for objects in the

“users” domain

Get the BO instance

Call BO’s method

Page 17: MOVE-12: OpenEdge®, ADOBE FLEX, and OpenEdge …download.psdn.com/media/exch_audio/2006/MOVE/MOVE-12_Flavio.pdf · MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

17MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

Sample CodeInserting Objects

hBO = getBOById(“Order”).

RUN setCustomer IN hBO (10);RUN addItem (“Item 1”, 123.20).RUN addItem (“Item 2”, 33.00).

hDirectory = instantiateDirectory().

RUN insert IN hDirectory (INPUT hBO).

releaseDirectory().

Instantiate a “blank” Order

Set new Order’s attributes.

Insert new object in the repository.

Page 18: MOVE-12: OpenEdge®, ADOBE FLEX, and OpenEdge …download.psdn.com/media/exch_audio/2006/MOVE/MOVE-12_Flavio.pdf · MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

18MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

Sample CodeUpdating Objects

DEFINE TEMP-TABLE ttReferencesFIELD namingRef AS CHARACTER.

hDirectory = instantiateDirectory().RUN lookup IN hDirectory

(INPUT “webdesk://localhost/orders/*?Number=12345”,INPUT-OUTPUT TABLE ttReferences).

FIND FIRST ttReferences.RUN getBO IN hDirectory

(INPUT BUFFER ttReferences:HANDLE,OUTPUT hBO).

RUN addItem IN hBO (“Item 3”, 1.99).RUN addItem IN hBO (“Item 4”, 199.00).

RUN update IN hDirectory (INPUT hBO).

releaseDirectory().

Change Order’s attributes (in this case, adding new Items to an

existing Order).

Update object in the repository.

Page 19: MOVE-12: OpenEdge®, ADOBE FLEX, and OpenEdge …download.psdn.com/media/exch_audio/2006/MOVE/MOVE-12_Flavio.pdf · MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

19MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

Sample CodeRemoving Objects

DEFINE TEMP-TABLE ttReferencesFIELD namingRef AS CHARACTER.

hDirectory = instantiateDirectory().RUN lookup IN hDirectory

(INPUT “webdesk://localhost/orders/*?Number=12345”,

INPUT-OUTPUT TABLE ttReferences).FIND FIRST ttReferences.RUN getBO IN hDirectory(INPUT BUFFER ttReferences:HANDLE, OUTPUT hBO).

RUN remove IN hDirectory (INPUT hBO).

releaseDirectory().Remove object from

the repository.

Page 20: MOVE-12: OpenEdge®, ADOBE FLEX, and OpenEdge …download.psdn.com/media/exch_audio/2006/MOVE/MOVE-12_Flavio.pdf · MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

20MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

Adobe Flex

Adobe’s platform for Rich Interface Applications developmentFlash components running on the clientJava classes running on a Web ContainerWeb-service enabledEasy integration between Java classes and ActionScriptMultiplatform

http://www.macromedia.com/software/flex

Page 21: MOVE-12: OpenEdge®, ADOBE FLEX, and OpenEdge …download.psdn.com/media/exch_audio/2006/MOVE/MOVE-12_Flavio.pdf · MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

21MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

Integrating Flex and OpenEdge

Use of Web Services

AppServerTomcat

FlexServer

4GLServices

BusinessObjects

AppServer Protocol

☺Ready-to-useRequires AppServer configured and runningXML packing/unpacking overhead

WSAdapter

SOAP

Page 22: MOVE-12: OpenEdge®, ADOBE FLEX, and OpenEdge …download.psdn.com/media/exch_audio/2006/MOVE/MOVE-12_Flavio.pdf · MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

22MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

Integrating Flex and OpenEdge

Use of XML-RPC

WebSpeedTomcat

FlexServer

4GLServices

BusinessObjects

XML-RPC

Require Implementing XML-RPC server (already implemented)Requires WebSpeedXML packing/unpacking overhead (less than SOAP)

XML-RPCLayer

Page 23: MOVE-12: OpenEdge®, ADOBE FLEX, and OpenEdge …download.psdn.com/media/exch_audio/2006/MOVE/MOVE-12_Flavio.pdf · MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

23MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

Integrating Flex and OpenEdge

Use of Java Classes and AppServer

AppServerTomcat

FlexServer

4GLServices

BusinessObjects

AppServer Protocol

Requires Java classes to get data from AppServer and serve FlexRequires AppServer configured and running

☺Good performance

Java

Page 24: MOVE-12: OpenEdge®, ADOBE FLEX, and OpenEdge …download.psdn.com/media/exch_audio/2006/MOVE/MOVE-12_Flavio.pdf · MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

24MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

Integrating Flex and OpenEdge

Use of Java Classes and JDBC

Tomcat

FlexServer

JDBC

Requires Java classes to get data from AppServer and serve Flex“Duplicated” code in Java and 4GL

☺Best performance

Java Database

Page 25: MOVE-12: OpenEdge®, ADOBE FLEX, and OpenEdge …download.psdn.com/media/exch_audio/2006/MOVE/MOVE-12_Flavio.pdf · MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

25MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

Webdesk BPA

On Webdesk BPA, Flex layer has to access two different types of data: Meta information about available indicators (about 100 records) and Data Mart database (potentially millions of records).WebSpeed is already configured and running (actually, most of the application runs under WebSpeed)AppServer is not required today (unless some other features are enabled)

Page 26: MOVE-12: OpenEdge®, ADOBE FLEX, and OpenEdge …download.psdn.com/media/exch_audio/2006/MOVE/MOVE-12_Flavio.pdf · MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

26MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

Webdesk BPA

WebSpeedTomcat

FlexServer

JavaObjects

XMLServices

BusinessObjects

OLTP*Database

DataMartDatabase

XML-RPC

JDBCNative Progress orDataserver

Great Performance and no Business Rules. Same SQL

statement for Progress, Oracle and SQL.

Satisfactory performance and no extra configuration.

Page 27: MOVE-12: OpenEdge®, ADOBE FLEX, and OpenEdge …download.psdn.com/media/exch_audio/2006/MOVE/MOVE-12_Flavio.pdf · MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

27MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

Lessons LearnedMoving to OpenEdge

Automate Tests on Business LayerContinuously IntegratePay attention on DesignConcentrate on the InterfacesAlways consider Refactoring

Page 28: MOVE-12: OpenEdge®, ADOBE FLEX, and OpenEdge …download.psdn.com/media/exch_audio/2006/MOVE/MOVE-12_Flavio.pdf · MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

28MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

Lessons LearnedUsing Adobe Flex

Asynchronous Programming Model tricks developers[Try to] Avoid “small code replications”temptationDon’t forget it should be Rich from user’s perspectiveBe careful of how much information you showCombine Flex Technology to Ergonomics Best PracticesConsider Waiting for Flex 2.0

Page 29: MOVE-12: OpenEdge®, ADOBE FLEX, and OpenEdge …download.psdn.com/media/exch_audio/2006/MOVE/MOVE-12_Flavio.pdf · MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

29MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

Live Demo

Page 30: MOVE-12: OpenEdge®, ADOBE FLEX, and OpenEdge …download.psdn.com/media/exch_audio/2006/MOVE/MOVE-12_Flavio.pdf · MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

30MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

Q & A

Page 31: MOVE-12: OpenEdge®, ADOBE FLEX, and OpenEdge …download.psdn.com/media/exch_audio/2006/MOVE/MOVE-12_Flavio.pdf · MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

31MOVE-12: OpenEdge, ADOBE FLEX, + OpenEdge RA: A Look at a Transformation

Thank You