66
© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Flex & LCDS Best Practices from the Trenches Technology & Experience Innovation François Le Droff | Senior Computer Scientist Yaniv De Ridder | Senior Computer Scientist

Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

Embed Size (px)

DESCRIPTION

Join us as we share several of the key best practices we have learned over time while building Hendrix, a large business-critical Adobe enterprise application built with Flex and Adobe LiveCycle Data Services. Hendrix was built to leverage many existing systems within Adobe IT (such as our SAP customer relationship management system and computer telephony integration system). Some of these best practices may be familiar to you, and some may not. All come from the collective experience of the people who design, develop, and operate the Hendrix application.

Citation preview

Page 1: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Flex & LCDS Best Practices from the Trenches

Technology & Experience Innovation

François Le Droff | Senior Computer Scientist Yaniv De Ridder | Senior Computer Scientist

Page 2: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

François Le Droff

o  “Just another Java guy” (doing Flex)

o  +11 years in web 1+n.0 o  Open Source So"ware Geek :

o  FlexPMD, Cairngorm

o  Ossgtp, ParisJUG, et TTFX

o  French JUGs, MAX, et Solution Linux

o  h#p://www.droff.com

o  h#p://blogs.adobe.com/francoisledroff/ o  h#p://twi#er.com/francoisledroff

o  ledroff<at>adobe.com

Page 3: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Yaniv De Ridder

o  Flash Platform Expert

o 9+ years in front-end development

o  h#p://blogs.adobe.com/yderidder/

o  h#p://twi#er.com/yderidder/

o  yderidde<at>adobe.com

Page 4: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 4

Hendrix : Helping more customers, "rst time, in less time. Every time.

Page 5: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Flex & LCDS Best Practices from the Trenches

5

o  Meet Hendrix

o  Architecture

o  Encapsulation, Separation of Concerns

o  API, API, API

o  Exception Handling

o  LCDS Messaging & CTI Best Practices

o  Distributed Agile Offshore Processes

o  So"ware Factory

Demo

Page 6: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 6

One hour is not enough.

•  Whitepapers •  Blogposts •  Solution accelerators •  Open Source Projects

•  Cairngorm3 •  FlexPMD •  etc …

Page 7: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Hendrix : Key Features

7

Telephony integration Customer Identi!cation & Matching

At A Glance Case History

Selling More Of "e Right Product

Customer Service Process Wizard More to come

Page 8: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

o  24/7 usage and a minimum speed requirements o  Uptime of 99.95%

o  400 concurrent users for the !rst phase o  Prepare for more, be scalable

Hendrix : SLA

8

Page 9: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Hendrix : SLA & Non Functional Requirements

o  Agent hardware & so#ware constraints

o  Reusing and leveraging of the legacy systems

o  SAP CRM

o  Phone, telecom switches and CTI solution

9

Page 10: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

User CTI Phone

Call

cent

er h

#p p

roxy

VOIP

Internet Browser

Flash Player

Hendrix Flash application

User Desktop

AMF

BI (cluster/group)

Server 3.1

Server 3.2

Server 3.3

Server 3.p

ECC (cluster/group)

Server 2.1

Server 2.2

Server 2.3

Server 1.m

CRM (cluster/group)

Server 1.1

Server 1.2

Server 1.3

Server 1.n

SAP

TServer Server 2.1

Server 1.m

AIL Server Server 1.1

Server 1.n

Genesys CTI

PBX PBX PBX PBX

Hendrix JBoss LCDS

Cluster

Server 1.2

Server 1.3

Server 1.n

Hendrix

Load

Bal

ance

r

AIL - RMI – TCP/IP

JCO - JNI – TCP/IP

Hendrix: Physical Architecture

Adobe Dylan ColdFusion Product Catalog

Adobe Content Publishing System RSS / HTTPS

Serial Number Server

Adobe LiveCycle Collaboration Service RTMPS/RTMFP

AMF

Hendrix AIR application

User Desktop

Hendrix AIR application

User Mobile Phone

AMF

Page 11: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 11

Architecture Best Practices

Encapsulation, Separation of Concern

Make things as inaccessible as possible

Page 12: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Hendrix Middleware Projects

12

JVM - JBoss/JEE application server [ Web container, Transaction Manager, JMX, AOP, Cache, JNDI, Logging support)

hendrix_webapp (war)

Flash Player

Spring [Micro Container, IOC, AOP, Security, LCDS integration support]

NIO Server Flex-Data Management Flex-Messaging Flex-Remoting

hendrix_java_cti (jar)

Genesys AIL SDK

hendrix_java_cat (jar)

AMF/HTTP

hendrix_java_service_api (jar)

Dev/CI/QA/Stage/Prod Parameters : JNDI

Dozer [CRM and CTI entity 2 DTOs mapper]

hendrix_java_core_service (jar)

hendrix_java_crm (jar)

JCO

Page 13: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 13

Hendrix Flex Projects

o  Hendrix High level Architecture with Cairngorm 3

Page 14: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

IOC, utilities

o IoC o Spring o Parsley

o Utilities o Leverage JEE o Java OSS (Apache, Codehaus, Spring, JBoss, etc..) o Spicelib, KapInspect, $underbold, Cairngorm3

14

Cairngorm 3 ≠ Cairngorm 2

Page 15: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 15

Multiscreen and Modular Flex Application making

o  Demo

Mobile Application Desktop Browser Application

Page 16: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Project setup and structure : Best Practice sample : Todo-Max

16

JVM - JBoss/JEE application server [ Web container, Transaction Manager, JMX, AOP, Cache, JNDI, Logging support)

todo_webapp (war) Spring [Micro Container, IOC, AOP, Security, LCDS integration support]

todo_java_$ex_service (jar)

NIO Server Flex-Data Management Flex-Messaging Flex-Remoting

todo_java_persistence (jar) JPA (Hibernate)

Dozer [CRM and CTI entity 2 DTOs mapper]

Flash Player

Dev/CI/QA/Stage/Prod Parameters : JNDI

Page 17: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Use this Sample app as a skeleton

17

JVM - JBoss/JEE application server

todo_webapp (war)

Spring

todo_java_service (jar)

NIO Server Flex-Data Management Flex-Messaging Flex-Remoting

todo_java_crm (jar)

JCO

Dozer [CRM and CTI entity 2 DTOs mapper]

Flash Player

Dev/CI/QA/Stage/Prod Parameters : JNDI

JVM - JBoss/JEE application server

Spring

todo_java_service (jar)

NIO Server Flex-Data Management Flex-Messaging Flex-Remoting

todo_java_persistence (jar)

JPA (Hibernate)

Dozer [CRM and CTI entity 2 DTOs mapper]

Flash Player

Dev/CI/QA/Stage/Prod Parameters : JNDI

todo_webapp (war)

Page 18: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 18

Multiscreen and Modular Flex Application making

o  Todo Application Architecture

Page 19: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Demo

19

Demo

Page 20: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

API, API, API

20 15 Sept 2009 Contrôle Qualité Open Source

✔  Programming is pusblishing (an API)

✔  A Quality API :

✔  Simple ✔  Addictive

Page 21: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

BI (cluster/group) Server 3.1

Server 3.2

Server 3.3

Server 3.p

ECC (cluster/group) Server 2.1

Server 2.2

Server 2.3

Server 1.m

CRM (cluster/group) Server 1.1

Server 1.2

Server 1.3

Server 1.n

SAP

Adobe Content Publishing System

Adobe Dylan ColdFusion Product Catalog

Hendrix JBoss LCDS

Cluster

Server 1.2

Server 1.3

Server 1.n

Hendrix

TServer Server 2.1

Server 1.m

AIL Server Server 1.1

Server 1.n

Genesys CTI

PBX Lo

ad B

alan

cer

PBX PBX PBX User CTI Phone VOIP

AIL - RMI – TCP/IP

Internet Browser

Flash Player

Hendrix Flash application

User Desktop

Call

cent

er h

#p p

roxy

RSS / HTTPS

AMF / HTTPS

AMF / HTTPS

JCO - JNI – TCP/IP

Hendrix: Physical Architecture

Serial Number Server

Adobe LiveCycle Collaboration Service RTMPS/RTMFP

Hendrix AIR application

User Desktop

Hendrix AIR application

User Mobile Phone

Page 22: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

o  Client-Side API

22

Hendrix Flex Projects

Page 23: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 23

JVM - JBoss/JEE application server [ Web container, Transaction Manager, JMX, AOP, Cache, JNDI, Logging support)

hendrix_webapp (war) Spring [Micro Container, IOC, AOP, Security, LCDS integration support]

hendrix_java_core_service (jar)

NIO Server Flex-Data Management Flex-Messaging Flex-Remoting

hendrix_java_crm (jar)

JCO

Dozer [CRM and CTI entity 2 DTOs mapper]

Flash Player

hendrix_java_cti (jar)

Genesys AIL SDK

hendrix_java_cat (jar)

AMF/HTTP

hendrix_java_service_api (jar)

Dev/CI/QA/Stage/Prod Parameters : JNDI

Page 24: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 24

o  Before

Page 25: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

o  A#er

25

Page 26: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 26

Page 27: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 27

Page 28: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 28

Page 29: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Exception handling

29

Page 30: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 30

JVM - JBoss/JEE application server [ Web container, Transaction Manager, JMX, AOP, Cache, JNDI, Logging support)

hendrix_webapp (war) Spring [Micro Container, IOC, AOP, Security, LCDS integration support]

hendrix_java_core_service (jar)

NIO Server Flex-Data Management Flex-Messaging Flex-Remoting

hendrix_java_crm (jar)

JCO

Dozer [CRM and CTI entity 2 DTOs mapper]

Flash Player

hendrix_java_cti (jar)

Genesys AIL SDK

hendrix_java_cat (jar)

AMF/HTTP

hendrix_java_service_api (jar)

Dev/CI/QA/Stage/Prod Parameters : JNDI

•  Business/System Messages •  Error/Warning/Info

•  Business/System Exception •  Checked/Unchecked

•  Messaging Exception •  General/Speci!c Code

•  ErrorEvent & ErrorManager •  Synchronous/Asynchronous •  Client/Server roots

Page 31: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

LCDS Messaging & CTI Best Practices

31

Page 32: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

CTI pitfalls

•  Phone Hardware differences and con%gurations issues •  Dev versus Prod •  Avaya phone versus Nortel phone

•  Load/stress/endurance test early

•  Sockets consumptions •  ulimit

•  $reads consumptions •  Use LCDS NIO (or RTMP) channels •  Use LCDS Message %ltering •  And eventually leverage server side messaging/queueing technology

•  JMS / AMQP (MRG)

Page 33: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

LCDS Real Time Messaging helps

•  Reliable Messaging

•  Message thro%ling

•  Channels and Endpoints –Choices, choices

•  Edge Server

•  Message "lters

•  Message priority

Page 34: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Distributed Agile Offshore process

34

Paris / Brussels Bucharest USA

Edinburgh

China

Page 35: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Hendrix : Distributed Agile offshore process

o  Don't Underestimate the Culture Gaps

o  Separate Scrum teams by functionality not activity

o  Collaboratively agree on the De"nition Of Done

o  Collaboratively evaluate and manage the technical debt

35

Page 36: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Hendrix : Distributed Agile offshore process

36

o  Get multiple communication modes working early o  Expect to need more documents

Use wikis to contain common information

Page 37: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Hendrix : Distributed Agile offshore process

o  Make Short Iterations

o  Produce Customer Test Data & Test Scripts Early

o  to Help Understand the Requirements

o  Use Continuous Integration to

o  Avoid Integration Headaches

o  Get Early Feedback on Functionality

o  Allow Early functional and performance tests

o  Monitor your technical debt

37

Page 38: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Industrialization/Automation

“Because Everybody Doing It Manually Hurts”

Page 39: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

So#ware factory Automation for the People (because Everybody Doing It Manually Hurts)

39

Dep

ende

ncie

s Ch

ecks

Com

pila

tion

Codi

ng R

ules

Che

cks

Dep

loym

ent

Pack

agin

g

Uni

t tes

t

Java

Doc

s, A

SDoc

s, Q

ualit

y Re

port

s

Auto

mat

ed T

ests

Continuous Integration

Server

Modi!cation Checks

Trigger

Qua

lity

Das

hboa

rd

Changelist/ Jobs

Tasks / Bug Tracking

Server

Repository Server

CI & QA Test Servers Quality & Doc Servers

Local Builds and Local App

Servers

Product Owner / User Champions / UX Designer

QA Engineers

SCM swc,swf, jar,war

push & pull deploy

Update & Commit Update

Fetch swc,swf,jar and war

Checks/Noti!cations

Flex & Java Developers

Smoke / Acceptance Test s

Func. and UX Feedbacks

Checks & Tests

Build

Page 40: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

So#ware factory Automation for the People (because Everybody Doing It Manually Hurts)

40

Dep

ende

ncie

s Ch

ecks

Com

pila

tion

Codi

ng R

ules

Che

cks

Dep

loym

ent

Pack

agin

g

Uni

t tes

t

Java

Doc

s, A

SDoc

s, Q

ualit

y Re

port

s

Auto

mat

ed T

ests

Continuous Integration

Server

Modi!cation Checks

Trigger

Qua

lity

Das

hboa

rd

Repository Server

CI & QA Test Servers Quality & Doc Servers

Local Builds and Local App

Servers

Product Owner / User Champions / UX Designer

QA Engineers

swc,swf, jar,war push & pull

deploy

Update & Commit Update

Fetch swc,swf,jar and war

Checks/Noti!cations

Flex & Java Developers

Smoke / Acceptance Test s

Func. and UX Feedbacks

Checks & Tests

Build SCM

Changelist/ Jobs

Tasks / Bug Tracking

Server

SCM

•  Jira / RallyDev / others

•  Perforce / SVN / Git / others

•  Bridge /Connect them •  Automate the creation of Perforce jobs (svn changelist) associated with Bug !xes •  Ease your integration, branch management,

•  Ease release managament, by keeping your scm tags and Jira versioning in synch •  Release notes automation

SCM

Changelist/ Jobs

Tasks / Bug Tracking

Server

SCM

Page 41: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

So#ware factory Automation for the People (because Everybody Doing It Manually Hurts)

41

Dep

ende

ncie

s Ch

ecks

Com

pila

tion

Codi

ng R

ules

Che

cks

Dep

loym

ent

Pack

agin

g

Uni

t tes

t

Java

Doc

s, A

SDoc

s, Q

ualit

y Re

port

s

Auto

mat

ed T

ests

Continuous Integration

Server

Modi!cation Checks

Trigger

Qua

lity

Das

hboa

rd

Repository Server

CI & QA Test Servers Quality & Doc Servers

Local Builds and Local App

Servers

Product Owner / User Champions / UX Designer

QA Engineers

swc,swf, jar,war push & pull

deploy

Update & Commit Update

Fetch swc,swf,jar and war

Checks/Noti!cations

Flex & Java Developers

Smoke / Acceptance Test s

Func. and UX Feedbacks

Checks & Tests

Build SCM

Changelist/ Jobs

Tasks / Bug Tracking

Server

SCM Continuous Integration

Server

Page 42: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

So#ware factory Automation for the People (because Everybody Doing It Manually Hurts)

42

Dep

ende

ncie

s Ch

ecks

Com

pila

tion

Codi

ng R

ules

Che

cks

Dep

loym

ent

Pack

agin

g

Uni

t tes

t

Java

Doc

s, A

SDoc

s, Q

ualit

y Re

port

s

Auto

mat

ed T

ests

Continuous Integration

Server

Modi!cation Checks

Trigger

Qua

lity

Das

hboa

rd

Repository Server

CI & QA Test Servers Quality & Doc Servers

Local Builds and Local App

Servers

Product Owner / User Champions / UX Designer

QA Engineers

swc,swf, jar,war push & pull

deploy

Update & Commit Update

Fetch swc,swf,jar and war

Checks/Noti!cations

Flex & Java Developers

Smoke / Acceptance Test s

Func. and UX Feedbacks

Checks & Tests

Build SCM

Changelist/ Jobs

Tasks / Bug Tracking

Server

SCM

Dep

ende

ncie

s Ch

ecks

•  Dependency Management •  Scope •  Transitivity •  Pro!le

•  One common artefacts (swc, swf, jar, war, ear) repository •  proxy, hosted, grouped repositories

Page 43: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

So#ware factory Automation for the People (because Everybody Doing It Manually Hurts)

43

Dep

ende

ncie

s Ch

ecks

Com

pila

tion

Codi

ng R

ules

Che

cks

Dep

loym

ent

Pack

agin

g

Uni

t tes

t

Java

Doc

s, A

SDoc

s, Q

ualit

y Re

port

s

Auto

mat

ed T

ests

Continuous Integration

Server

Modi!cation Checks

Trigger

Qua

lity

Das

hboa

rd

Repository Server

CI & QA Test Servers Quality & Doc Servers

Local Builds and Local App

Servers

Product Owner / User Champions / UX Designer

QA Engineers

swc,swf, jar,war push & pull

deploy

Update & Commit Update

Fetch swc,swf,jar and war

Checks/Noti!cations

Flex & Java Developers

Smoke / Acceptance Test s

Func. and UX Feedbacks

Checks & Tests

Build SCM

Changelist/ Jobs

Tasks / Bug Tracking

Server

SCM

Repository Server

Codi

ng R

ules

Che

cks

•  PMD for java •  h$p://pmd.sourceforge.net/

•  FlexPMD for AS3/Flex •  h$p://sourceforge.net/adobe/%expmd/home/ •  FlexPMD: Your Canary in a Coal Mine – MAX 2010

Page 44: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

So#ware factory Automation for the People (because Everybody Doing It Manually Hurts)

44

Dep

ende

ncie

s Ch

ecks

Com

pila

tion

Codi

ng R

ules

Che

cks

Dep

loym

ent

Pack

agin

g

Uni

t tes

t

Java

Doc

s, A

SDoc

s, Q

ualit

y Re

port

s

Auto

mat

ed T

ests

Continuous Integration

Server

Modi!cation Checks

Trigger

Qua

lity

Das

hboa

rd

Repository Server

CI & QA Test Servers Quality & Doc Servers

Local Builds and Local App

Servers

Product Owner / User Champions / UX Designer

QA Engineers

swc,swf, jar,war push & pull

deploy

Update & Commit Update

Fetch swc,swf,jar and war

Checks/Noti!cations

Flex & Java Developers

Smoke / Acceptance Test s

Func. and UX Feedbacks

Checks & Tests

Build SCM

Changelist/ Jobs

Tasks / Bug Tracking

Server

SCM

Com

pila

tion

Pack

agin

g

Uni

t tes

t

•  javac, mxmlc •  JUnit/TestNG, FlexUnit4 •  swc, swf ,jar ,war ,ear ,zip ,etc

Page 45: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

So#ware factory Automation for the People (because Everybody Doing It Manually Hurts)

45

Dep

ende

ncie

s Ch

ecks

Com

pila

tion

Codi

ng R

ules

Che

cks

Dep

loym

ent

Pack

agin

g

Uni

t tes

t

Java

Doc

s, A

SDoc

s, Q

ualit

y Re

port

s

Auto

mat

ed T

ests

Continuous Integration

Server

Modi!cation Checks

Trigger

Qua

lity

Das

hboa

rd

Repository Server

CI & QA Test Servers Quality & Doc Servers

Local Builds and Local App

Servers

Product Owner / User Champions / UX Designer

QA Engineers

swc,swf, jar,war push & pull

deploy

Update & Commit Update

Fetch swc,swf,jar and war

Checks/Noti!cations

Flex & Java Developers

Smoke / Acceptance Test s

Func. and UX Feedbacks

Checks & Tests

Build SCM

Changelist/ Jobs

Tasks / Bug Tracking

Server

SCM

•  Maven •  Ant + Ivy •  Graddle •  BuildR •  EasyAnt •  Ant •  Make

Repository Server

Dep

loym

ent

•  Automated deployment on •  Artefacts repository (for developers, for dependent projects) •  CI test server (for developers’s check, automated functional testing) •  QA test servers

•  On demand for Release Candidate smoke test •  UX review & Product review

•  Test, stage and production ready deployment •  Externalized con!guration (jndi) •  Pro!led build (when platform dependent)

Page 46: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

So#ware factory Automation for the People (because Everybody Doing It Manually Hurts)

46

Dep

ende

ncie

s Ch

ecks

Com

pila

tion

Codi

ng R

ules

Che

cks

Dep

loym

ent

Pack

agin

g

Uni

t tes

t

Java

Doc

s, A

SDoc

s, Q

ualit

y Re

port

s

Auto

mat

ed T

ests

Continuous Integration

Server

Modi!cation Checks

Trigger

Qua

lity

Das

hboa

rd

Repository Server

CI & QA Test Servers Quality & Doc Servers

Local Builds and Local App

Servers

Product Owner / User Champions / UX Designer

QA Engineers

swc,swf, jar,war push & pull

deploy

Update & Commit Update

Fetch swc,swf,jar and war

Checks/Noti!cations

Flex & Java Developers

Smoke / Acceptance Test s

Func. and UX Feedbacks

Checks & Tests

Build SCM

Changelist/ Jobs

Tasks / Bug Tracking

Server

SCM

Repository Server

•  javac, mxmlc •  JUnit/TestNG, FlexUnit4 •  swc, swf ,jar ,war ,ear ,zip ,etc

Auto

mat

ed T

ests

•  Automated Functional Test •  RIATest : h$p://www.riatest.com •  FlexMonkey •  QTP

•  Leveraging the Flex SDK automation framework

Page 47: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

So#ware factory Automation for the People (because Everybody Doing It Manually Hurts)

47

Dep

ende

ncie

s Ch

ecks

Com

pila

tion

Codi

ng R

ules

Che

cks

Dep

loym

ent

Pack

agin

g

Uni

t tes

t

Java

Doc

s, A

SDoc

s, Q

ualit

y Re

port

s

Auto

mat

ed T

ests

Continuous Integration

Server

Modi!cation Checks

Trigger

Qua

lity

Das

hboa

rd

Repository Server

CI & QA Test Servers Quality & Doc Servers

Local Builds and Local App

Servers

Product Owner / User Champions / UX Designer

QA Engineers

swc,swf, jar,war push & pull

deploy

Update & Commit Update

Fetch swc,swf,jar and war

Checks/Noti!cations

Flex & Java Developers

Smoke / Acceptance Test s

Func. and UX Feedbacks

Checks & Tests

Build SCM

Changelist/ Jobs

Tasks / Bug Tracking

Server

SCM

•  Maven •  Ant + Ivy •  Graddle •  BuildR •  EasyAnt •  Ant •  Make

Repository Server

•  javac, mxmlc •  JUnit/TestNG, FlexUnit4 •  swc, swf ,jar ,war ,ear ,zip ,etc

Java

Doc

s, A

SDoc

s, Q

ualit

y Re

port

s

•  Developer docs : •  Compilation reports •  Javadoc, ASdoc

•  Dev/QA docs •  Unit Test reports •  Test Coverage reports •  PMD reports •  Dependencies •  Dependency convergent reports •  etc …

Page 48: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

So#ware factory Automation for the People (because Everybody Doing It Manually Hurts)

48

Dep

ende

ncie

s Ch

ecks

Com

pila

tion

Codi

ng R

ules

Che

cks

Dep

loym

ent

Pack

agin

g

Uni

t tes

t

Java

Doc

s, A

SDoc

s, Q

ualit

y Re

port

s

Auto

mat

ed T

ests

Continuous Integration

Server

Modi!cation Checks

Trigger

Qua

lity

Das

hboa

rd

Repository Server

CI & QA Test Servers Quality & Doc Servers

Local Builds and Local App

Servers

Product Owner / User Champions / UX Designer

QA Engineers

swc,swf, jar,war push & pull

deploy

Update & Commit Update

Fetch swc,swf,jar and war

Checks/Noti!cations

Flex & Java Developers

Smoke / Acceptance Test s

Func. and UX Feedbacks

Checks & Tests

Build SCM

Changelist/ Jobs

Tasks / Bug Tracking

Server

SCM

Repository Server

•  javac, mxmlc •  JUnit/TestNG, FlexUnit4 •  swc, swf ,jar ,war ,ear ,zip ,etc

Qua

lity

Das

hboa

rd

•  Quality Dashboard •  Sonar : h$p://www.sonarsource.org/ •  Home made •  Others

Page 49: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Tasks / Bug Tracking

Server

CI & QA Test Servers Quality & Doc Servers

So#ware factory Automation for the People (because Everybody Doing It Manually Hurts)

49

Dep

ende

ncie

s Ch

ecks

Com

pila

tion

Codi

ng R

ules

Che

cks

Dep

loym

ent

Pack

agin

g

Uni

t tes

t

Java

Doc

s, A

SDoc

s, Q

ualit

y Re

port

s

Auto

mat

ed T

ests

Continuous Integration

Server

Modi!cation Checks

Trigger

Qua

lity

Das

hboa

rd

Changelist/ Jobs

Repository Server

Local Builds and Local App

Servers

Product Owner / User Champions / UX Designer

QA Engineers

SCM swc,swf, jar,war

push & pull deploy

Update & Commit Update

Fetch swc,swf,jar and war

Checks/Noti!cations

Flex & Java Developers

Smoke / Acceptance Test s

Func. and UX Feedbacks

Checks & Tests

Build

•  Aim for a full IDE integration : •  Plugins

• Mylin, hudson, SCM, FlexPMD, FlexForma$er, FlexUnit, CodeCoverage, etc…

•  Shared properties and con!guration •  Scripts

Product Owner / User Champions / UX Designer

QA Engineers Flex & Java Developers

Page 50: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Demo

50

o  Streamlining Flex Developement

o  So#ware Factory Demo

Page 51: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 51

One hour was not enough, but

But we’ll publish/release :

o  Uni!ed Agent desktop Solution Accelerator o  LCDS SAP connector o  LCDS Remote Data Management o  Spring-Flex NIO support o  Whitepapers & blogpost on

o  Multiscreen app making o  so&ware factory o  Security & sso

And we already published o  Cairngorm 3 libraries and guidelines o  Cairngorm 3 todo max sample o  Devnet articles

Page 52: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 52

References

Page 53: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 53

Books /Articles «  Effective Java: Programming Language Guide », Joshua Bloch « OO Design Quality Metrics », Robert Martin

h$p://www.octo.com/Java-Productivity-Primer.10/Publications h$p://lil.univ-li$oral.fr/~oumoumsack/qualite/ h$p://www.objectmentor.com/resources/articles/Principles_and_Pa$erns.pdf h$p://www.infoq.com/presentations/effective-api-design h$p://www.infoq.com/news/Ken-Schwaber-Sacri!cing-Quality h$p://www.quotegarden.com/programming.html h$p://www.slideshare.net/francois.le.droff/solutions-linux2008-construire-sa-vision-qualite h$p://www.slideshare.net/francoisledroff/%ex-continuous-quality-builds-%ex-ant-maven h$p://www.slideshare.net/francoisledroff/tesytquality-best-practices-toolkit-for-enterprise-%ex

Photo /Graphics h$ps://duke.dev.java.net/images/comfyChair/index.html h$p://www.%ickr.com/photos/purplema$!sh/3918004964/ h$p://www.%ickr.com/photos/lesloups/1907354379/ h$p://www.%ickr.com/photos/summachphoto/3380254405/in/pool- shocking#/photos/summachphoto/3380254405/in/pool-566250@N24/ h$p://www.%ickr.com/photos/slimcoincidence/594599028/ h$p://www.%ickr.com/photos/sea$lemunicipalarchives/2680257100/sizes/o/in/photostream/

Tools Cairngorm: h$ps://sourceforge.net/adobe/cairngorm/home/ FlexUnit: h$p://%exunit.org/ Parsley/Spicelib: h$p://www.spicefactory.org KapInsect: h$p://lab.kapit.fr/display/kapinspect/Kap+Inspect "underbolt: h$p://github.com/sectore/"underBoltAS3 Flexlib: h$p://code.google.com/p/%exlib/ FlexPMD: h$ps://sourceforge.net/adobe/%expmd/home/ Ant: h$p://ant.apache.org/ Maven: h$p://maven.apache.org/ Ivy: h$p://www.jaya.free.fr/ivy/ Sonar: h$p://www.sonarsource.org/ PMD: h$p://pmd.sourceforge.net/ Spring: h$p://www.springsource.org/ JBoss: h$p://www.jboss.org Hibersap: h$p://hibersap.sourceforge.net/ Dozer: h$p://dozer.sourceforge.net/

Adobe Docs ActionScript Developer Site- h$p://www.adobe.com/devnet/actionscript/ Flex Developer Site - h$p://www.adobe.com/devnet/%ex/documentation.html LCDS Doc Site - h$p://livedocs.adobe.com/livecycle/8.2/programLC/programmer/lcds/help.html?content=lccon!g_4.html

References

Page 54: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Turn in your Surveys for a chance to WIN!

o  Hand in your surveys to the room monitors

o  One survey will be selected as a winner of the Adobe Press e-book

Adobe Flash Platform from Start to Finish: Working Collaboratively Using Adobe Creative Suite 5

o  Winners will be noti"ed via e-mail at the end of each day

54

Page 55: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Questions ?

Page 56: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Appendix

Page 57: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

So#ware Factory: Demo

57

Page 58: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

So#ware Factory: Demo

58

Page 59: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

So#ware Factory: Demo

59

Page 60: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 60

Streamline Flex Development

o  Project con"gurations

o  Use Linked Resources

o  Use external con%guration %le for additional compiler arguments

o  Link your bin folder to a deployed server folder

o  Don’t mix project nature

o  Use multiple source path folders

Page 61: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 61

o  Use Linked Resources

o  Avoid absolute paths in con%guration %les

o  De%ne a Linked Resource

o  How to use the variables in the different con%guration %les

o  .actionscriptProperties

o  .project

<libraryPathEntry kind="3" linkType="1" path="/Users/yaniv/Developer/Repositories/todo_max/todo_flex_todolist_lib/bin/todo_flex_todolist_lib.swc" useDefaultLinkType="false"/>

Streamline Flex Development

<libraryPathEntry kind="3" linkType="1" path="${M2_REPO}/org/spicefactory/parsley-flex4/2.3.1/parsley-flex4-2.3.1.swc" useDefaultLinkType="false"/>

<locationURI>TODO_BLZ_KISS/bin</locationURI>

Page 62: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 62

Streamline Flex Development

o  Use external con"guration "le for additional compiler arguments

Page 63: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 63

Streamline Flex Development

o  Don’t mix project nature

<natures> <nature>com.adobe.flexbuilder.project.flexnature</nature> <nature>com.adobe.flexbuilder.project.actionscriptnature</nature> <nature>com.adobe.ac.pmd.eclipse.flexpmdnature</nature> <nature>org.eclipse.wst.common.project.facet.core.nature</nature> </natures>

Page 64: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 64

Streamline Flex Development

o  Link your bin folder to a deployed server folder

<compiler outputFolderLocation="${TODO_BLZ_KISS}/bin" outputFolderPath="bin-debug">

Page 65: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 65

Streamline Flex Development

o  Point your compiler to the right service-con"g.xml

o  Use the -services compiler argument

o  Use the <services> tag in the additional compiler arguments

-service "${TODO_BLZ_KISS}/WEB-INF/flex/services-config.xml"

<!-- compiler.services: path to Flex Data Services configuration file--> <services>${TODO_BLZ_KISS}/WEB-INF/flex/services-config.xml</services>

Page 66: Flex and LiveCycle Data Services Best Practices from the Trenches (Adobe MAX 2010)

© 2010 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 66

Streamline Flex Development

o  Use multiple source path folders for

o  Unit Tests / Integration Tests

o  Resources

o  Monkey-patching

o  ...