SlideShare una empresa de Scribd logo
1 de 71
Descargar para leer sin conexión
S

Worst Practices for
Developing an ADF
Application
UKOUG ADF EMG Version 12.1.2.3.4.0.0b
Build WORST_PRACTICES_12.1.2.3.4.0.0b_UKOUG_2013 ADF EMG
S

About us
Paco van der Linden
AMIS
www.adfplus.com
@pavadeli

Wilfred van der Deijl
The Future Group
www.redheap.com
@wilfreddeijl
S

About us
Steven Davelaar
Oracle
ateam-oracle.com
@stevendavelaar

Wilfred van der Deijl
The Future Group
www.redheap.com
@wilfreddeijl
S

Ideal project
● 1 developer
That’s you of course!
S

Threats to a healthy ADF project
● Customer / Business / Functional designer
● Architect
● Project manager
S

Threats to a healthy ADF project
● Customer / Business / Functional designer
● Architect
● Project manager
● Other developers
● Graphic designer
S

Other Developers…
Are not a member of ADF EMG
S

Other Developers…
Do not use ADF EMG Taskflow Tester
S

ADF EMG Taskflow Tester - Wiki
S

ADF EMG Taskflow Tester
S

Other Developers…
Don’t add ADF Source code library
● How to get ADF Source
○
○
○
○
○
○

Go to support.oracle.com
Log Service Request for JDeveloper/ADF
“ADF Source Code Request” as problem type
Sign agreement and upload to SR
Get access to ZIP, typically within one day
New versions don’t need new agreement

● Allows debugging of ADF framework
S

Other Developers…
Don’t add ADF Source code library
S

Other Developers…
Don’t adhere to ADF Code Guidelines
S

ADF Code Guidelines
● 38 pages of excellent content by ADF guru’s
● Topics include:
○
○
○
○
○
○
○
○

General Code Guidelines
ADF Business Components
ADF Faces
ADF TaskFlows
ADF Binding Layer
Security
High Availability
… and more
S

Other developers
● Don’t adhere to your project specific coding
guidelines
● Other developers need your help
○ Reserve time to review each other’s version control
commits
○ You might learn from their code as well!!

● Reserve time to perform QA checks
○ Against ADF coding guidelines and project specific
guidelines
○ ...or automate this
■ come back tomorrow 10:15 - Exchange 6
“Quality Assurance with JDev Auditing Framework”
W

Threats to a healthy ADF project
● Customer / Business / Functional designer
● Architect
● Project manager
● Other developers
● Graphic designer
W
W
W
W
W
W
W

Graphic designer - Pitfalls
● Website ≠ Application
● “HTML is for semantics, CSS is for layout…”
○ ADF Fragment ≠ HTML, ADF skin ≠ CSS
○ ADF Skin
→ primarily colours,
ADF Fragment → the rest

● Bad practice: CSS for layout management
W

ADF Skinning Tips
● Use stand-alone Skin Editor
● Use ADF component selectors
○ don’t look at the generated HTML
○ use ADF Faces Skin Selectors Tag Reference

● Choice
○ UI Designer to learn ADF skinning (preferred choice)
○ ADF developer to learn CSS
W

How to Write Code
W

Logging
● Bad practice: System.err.println()
● Best practice: ADFLogger
○
○
○
○

Configure at Runtime without restart
Analyze Log for Performance
Time your own code
Better insight into ADF Framework internals
W

ADFLogger - Runtime Configuration
W

ADFLogger - Runtime Configuration
W

ADFLogger - Log Analyzer

...or open log file from other (production) server
W

Time custom code with
ADFLogger::begin and
ADFLogger::end

bit.ly/adflogger
S

Understanding ADF Layers
● Bad: code ADF applications like open source
frameworks
● What do we mean by that?
○ All application state is kept in ViewController:
○ Lots of data queried from ADF BC and stored in JSF
managed beans or entries in JSF memory scope
maps
○ State passed back to ADF BC on subsequent
requests: AM methods with lots of arguments

● Good: leverage ADF BC Active Data Model
○ Easy access to previously entered data
○ Row Currency management
S

Understanding ADF Layers
● Signs of ViewController doing ADF BC work
○ import oracle.jbo…
○ Iterating RowSets
○ Storing lots of data in memory scopes or managed
beans. Should only contain true UI state
○ Calling ApplicationModule methods with lots of
arguments even when using binding layer

● Project Audits often show 50-80% of
ViewController code is unnecessary
○ Either completely redundant
○ ...or should be moved to ADF BC layer
S

ADF Faces
a.k.a. the ViewController project
S

ADF Lifecycle - Immediate property
● Bad: I run into issues, let’s try immediate=true
● Big difference: immediate on input component
vs input on command component
● Almost always wrong in input components
● Make sure you understand both JSF lifecycle
and ADF Optimized Lifecycle
● Steven Davelaar’s 18 Lessons
○ also available as ADF Insider Video

bit.ly/jsf-lifecycle
S

Know your ADF Memory Scopes
● Bad: Overuse of SessionScope &
PageFlowScope
● Can have significant impact on mem usage
● Good: The smaller, the better
● Do not cache shorter living objects
○ Should be cheap to request each time when needed
○ Can have disastrous consequences, for example
caching binding objects
S

Extreme Disastrous Caching
S

Extreme Disastrous Caching
S

Memory Scopes Guidelines
● SessionScope
○ only use for user context
○ often (UTF) PageFlowScope is better
■ Two browser tabs share SessionScope but have
independent UTF PageFlowScope

● RequestScope
○ often BackingBeanScope is better
○ each ADF Region or Declarative Component has own
BackingBeanScope but share RequestScope

● Bad: Accessing SessionScope beans from BTF
○ BTF should be reusable and not rely on SessionScope
○ taskflow parameters are there for a reason
W

tion
olu

“My ADF application is memoryhhungry”
es
a
l) p
al

ave
th

We

igh
m

(sm
a

of t
rt
W

JSF Component Binding
JDeveloper Generated Code
<af:inputText binding=”#{pageFlowScope.MyBean.lastName}”/>
W

JSF Component Binding
● First ask yourself if it is really needed
● binding=”#{pageFlowScope.MyBean.lastName}”
references UIComponent in PageFlow bean
● UIComponents should be released after each
request
● But Managed Bean might require
PageFlowScope for its functionality
W

JSF Component Binding
ComponentReference

Enhancement Request logged
W

“My JSF Component seems to travel around”
W

Building Component Tree
binding
attribute

No

create
component

Not Null

use
component

Yes

call
getter
Null

create
component

call setter
bit.ly/compbind
W

ADF Business
Components
a.k.a. the Model project
S

ADF BC Data Model - Master Detail
Beware of excessive querying

Navigate row here...

Requery
(if
populated)
S

ADF BC Data Model - Master Detail
Prevent excessive querying
● Use top level ViewObject instances with bind
variables
● or reset detail ViewObject on master row
navigation

bit.ly/masterdetail
S

ADF BC Data Model - Master Detail
Prevent excessive querying
W

“I encountered a dramatic ADF bug!!!
Sometimes users lose entered data when the
application is under heavy load.”
W

Disable Application Module Pooling
W

Don’t Simply passivate all!
W

“ADF has huge performance problems!!!
When under heavy load requests can take
several minutes.”

“Besides, what is this PS_TXN table for? It is
eating up our tablespace.”
W

Don’t Simply Passivate All
● Every ViewRow with transient atts is
persisted
● During activation all state is applied
W

Simply passivate all?

No!

○ Every ViewRow with transient atts is
persisted
○ During activation all state is applied
S

What is passivated?
○ Set logger:
oracle.jbo.server.Serializer
○ To:
W

What is passivated?
○ Set logger:
oracle.jbo.server.Serializer
○ To:
W

“My ADF application is hacked!!!
Sometimes users see data from other
sessions.”

“By the way, I did test the application with AM
pooling off.”
W

Application Module Recycling
Not Losing, but Leaking state

● AM Instances Recycled for other users under
load
● Not detected by disabling AM pooling!
W

Detecting State Leakage
W

Default AM Pool Tuning
W

Default ViewObject Tuning
W

Eclipse Memory Analyzer Tool

bit.ly/eclipsemat
W

Eclipse Memory Analyzer Tool (MAT)
● Make heap dump of running server
JDK_HOME/bin/jmap -dump:file=path
jvm_process_id

●
●
●
●

Download and run standalone Eclipse MAT
Inspect all objects in heap
Query Heap Objects
Predefined Reports and Tools

bit.ly/eclipsemat
W

Java Mission Control

bit.ly/miscontrol
W

Java Mission Control
●
●
●
●

Any version of JRockit
Hotspot (aka Sun JVM) since 1.7.0_40
Record a period of time
Analyze
○
○
○
○
○

CPU performance
Memory Usage
Garbage Collection
Thread Concurrency
etcetera
W

Miscellaneous
W

Password management
● Bad: Credentials in clear text (eg. web.xml)
● Worse: Override with deployment plans

bit.ly/secure-adf
W

Reading Credential Store

bit.ly/secure-adf
S

Load/Stress Testing
● 5 developers on a Friday afternoon:
“Ready…. Set…. Go”
● Every ADF project initially has performance
issues
● Consider
○ JMeter - Free open source, not optimized for ADF
○ Oracle Application Testing Suite - ADF aware

● Requires
○ Production like testing environment
○ Good knowledge of chosen test tool
○ 10 days setup (assuming test tool experience)
S

Further Reading
● bit.ly/adflogger
○ ADFLogger Custom Timings

● bit.ly/secure-adf
○ FMW Credential Store

● bit.ly/eclipsemat
○ Memory Analyzer Tool

● bit.ly/miscontrol
○ Java Mission Control

● bit.ly/jsf-lifecycle
○ Steven Davelaar’s JSF Lifecycle Lessons

● bit.ly/compbind
○ JSF Component Bindings

● bit.ly/masterdetail
○ Lazy Master Detail Query
S

That’s all folks!

Más contenido relacionado

La actualidad más candente

ADF Mythbusters UKOUG'14
ADF Mythbusters UKOUG'14ADF Mythbusters UKOUG'14
ADF Mythbusters UKOUG'14andrejusb
 
Marrying HTML5 and Angular to ADF - Oracle OpenWorld 2014 Preview
Marrying HTML5 and Angular to ADF - Oracle OpenWorld 2014 PreviewMarrying HTML5 and Angular to ADF - Oracle OpenWorld 2014 Preview
Marrying HTML5 and Angular to ADF - Oracle OpenWorld 2014 PreviewLucas Jellema
 
ADF Development Survival Kit
ADF Development Survival KitADF Development Survival Kit
ADF Development Survival Kitandrejusb
 
Upcoming JDeveloper ADF Business Components REST support
Upcoming JDeveloper ADF Business Components REST supportUpcoming JDeveloper ADF Business Components REST support
Upcoming JDeveloper ADF Business Components REST supportSteven Davelaar
 
Oracle ADF Architecture TV - Design - Task Flow Communication Pattern
Oracle ADF Architecture TV - Design - Task Flow Communication PatternOracle ADF Architecture TV - Design - Task Flow Communication Pattern
Oracle ADF Architecture TV - Design - Task Flow Communication PatternChris Muir
 
Building a custom Oracle ADF Component
Building a custom Oracle ADF ComponentBuilding a custom Oracle ADF Component
Building a custom Oracle ADF ComponentWilfred van der Deijl
 
A-Team Mobile Persistence Accelerator Overview
A-Team Mobile Persistence Accelerator OverviewA-Team Mobile Persistence Accelerator Overview
A-Team Mobile Persistence Accelerator OverviewSteven Davelaar
 
Adf performance tuning tips slideshare
Adf performance tuning tips slideshareAdf performance tuning tips slideshare
Adf performance tuning tips slideshareVinay Kumar
 
AEM Sightly Deep Dive
AEM Sightly Deep DiveAEM Sightly Deep Dive
AEM Sightly Deep DiveGabriel Walt
 
HTML5: the new frontier of the web
HTML5: the new frontier of the webHTML5: the new frontier of the web
HTML5: the new frontier of the webIvano Malavolta
 
Oracle ADF Architecture TV - Design - Task Flow Data Control Scope Options
Oracle ADF Architecture TV - Design - Task Flow Data Control Scope OptionsOracle ADF Architecture TV - Design - Task Flow Data Control Scope Options
Oracle ADF Architecture TV - Design - Task Flow Data Control Scope OptionsChris Muir
 
Sightly - AEM6 UI Development using JS and JAVA
Sightly - AEM6 UI Development using JS and JAVASightly - AEM6 UI Development using JS and JAVA
Sightly - AEM6 UI Development using JS and JAVAYash Mody
 
Oracle ADF Architecture TV - Design - Task Flow Transaction Options
Oracle ADF Architecture TV - Design - Task Flow Transaction OptionsOracle ADF Architecture TV - Design - Task Flow Transaction Options
Oracle ADF Architecture TV - Design - Task Flow Transaction OptionsChris Muir
 
Forms, ADF and JET a Non-Aggression Pact
Forms, ADF and JET a Non-Aggression PactForms, ADF and JET a Non-Aggression Pact
Forms, ADF and JET a Non-Aggression Pactandrejusb
 
Introduction to Sightly and Sling Models
Introduction to Sightly and Sling ModelsIntroduction to Sightly and Sling Models
Introduction to Sightly and Sling ModelsStefano Celentano
 
NLOUG 2017- Oracle WebCenter Portal 12c Performance
NLOUG 2017- Oracle WebCenter Portal 12c PerformanceNLOUG 2017- Oracle WebCenter Portal 12c Performance
NLOUG 2017- Oracle WebCenter Portal 12c PerformanceDaniel Merchán García
 
Modern development paradigms
Modern development paradigmsModern development paradigms
Modern development paradigmsIvano Malavolta
 
Alexander Zeng
Alexander ZengAlexander Zeng
Alexander ZengAlex Zeng
 
Three WEM Dev Tricks
Three WEM Dev TricksThree WEM Dev Tricks
Three WEM Dev TricksGabriel Walt
 
Oracle adfj developer slides
Oracle adfj developer slidesOracle adfj developer slides
Oracle adfj developer slidesRajasekhar Manda
 

La actualidad más candente (20)

ADF Mythbusters UKOUG'14
ADF Mythbusters UKOUG'14ADF Mythbusters UKOUG'14
ADF Mythbusters UKOUG'14
 
Marrying HTML5 and Angular to ADF - Oracle OpenWorld 2014 Preview
Marrying HTML5 and Angular to ADF - Oracle OpenWorld 2014 PreviewMarrying HTML5 and Angular to ADF - Oracle OpenWorld 2014 Preview
Marrying HTML5 and Angular to ADF - Oracle OpenWorld 2014 Preview
 
ADF Development Survival Kit
ADF Development Survival KitADF Development Survival Kit
ADF Development Survival Kit
 
Upcoming JDeveloper ADF Business Components REST support
Upcoming JDeveloper ADF Business Components REST supportUpcoming JDeveloper ADF Business Components REST support
Upcoming JDeveloper ADF Business Components REST support
 
Oracle ADF Architecture TV - Design - Task Flow Communication Pattern
Oracle ADF Architecture TV - Design - Task Flow Communication PatternOracle ADF Architecture TV - Design - Task Flow Communication Pattern
Oracle ADF Architecture TV - Design - Task Flow Communication Pattern
 
Building a custom Oracle ADF Component
Building a custom Oracle ADF ComponentBuilding a custom Oracle ADF Component
Building a custom Oracle ADF Component
 
A-Team Mobile Persistence Accelerator Overview
A-Team Mobile Persistence Accelerator OverviewA-Team Mobile Persistence Accelerator Overview
A-Team Mobile Persistence Accelerator Overview
 
Adf performance tuning tips slideshare
Adf performance tuning tips slideshareAdf performance tuning tips slideshare
Adf performance tuning tips slideshare
 
AEM Sightly Deep Dive
AEM Sightly Deep DiveAEM Sightly Deep Dive
AEM Sightly Deep Dive
 
HTML5: the new frontier of the web
HTML5: the new frontier of the webHTML5: the new frontier of the web
HTML5: the new frontier of the web
 
Oracle ADF Architecture TV - Design - Task Flow Data Control Scope Options
Oracle ADF Architecture TV - Design - Task Flow Data Control Scope OptionsOracle ADF Architecture TV - Design - Task Flow Data Control Scope Options
Oracle ADF Architecture TV - Design - Task Flow Data Control Scope Options
 
Sightly - AEM6 UI Development using JS and JAVA
Sightly - AEM6 UI Development using JS and JAVASightly - AEM6 UI Development using JS and JAVA
Sightly - AEM6 UI Development using JS and JAVA
 
Oracle ADF Architecture TV - Design - Task Flow Transaction Options
Oracle ADF Architecture TV - Design - Task Flow Transaction OptionsOracle ADF Architecture TV - Design - Task Flow Transaction Options
Oracle ADF Architecture TV - Design - Task Flow Transaction Options
 
Forms, ADF and JET a Non-Aggression Pact
Forms, ADF and JET a Non-Aggression PactForms, ADF and JET a Non-Aggression Pact
Forms, ADF and JET a Non-Aggression Pact
 
Introduction to Sightly and Sling Models
Introduction to Sightly and Sling ModelsIntroduction to Sightly and Sling Models
Introduction to Sightly and Sling Models
 
NLOUG 2017- Oracle WebCenter Portal 12c Performance
NLOUG 2017- Oracle WebCenter Portal 12c PerformanceNLOUG 2017- Oracle WebCenter Portal 12c Performance
NLOUG 2017- Oracle WebCenter Portal 12c Performance
 
Modern development paradigms
Modern development paradigmsModern development paradigms
Modern development paradigms
 
Alexander Zeng
Alexander ZengAlexander Zeng
Alexander Zeng
 
Three WEM Dev Tricks
Three WEM Dev TricksThree WEM Dev Tricks
Three WEM Dev Tricks
 
Oracle adfj developer slides
Oracle adfj developer slidesOracle adfj developer slides
Oracle adfj developer slides
 

Destacado

ADF Anti-Patterns: Dangerous Tutorials
ADF Anti-Patterns: Dangerous TutorialsADF Anti-Patterns: Dangerous Tutorials
ADF Anti-Patterns: Dangerous Tutorialsandrejusb
 
18 Invaluable Lessons About ADF-JSF Interaction
18 Invaluable Lessons About ADF-JSF Interaction18 Invaluable Lessons About ADF-JSF Interaction
18 Invaluable Lessons About ADF-JSF InteractionSteven Davelaar
 
JDeveloper Auditing Framework (UKOUG Tech2013)
JDeveloper Auditing Framework (UKOUG Tech2013)JDeveloper Auditing Framework (UKOUG Tech2013)
JDeveloper Auditing Framework (UKOUG Tech2013)Wilfred van der Deijl
 
J Headstart, EvolucióN De Forms A Adf
J Headstart, EvolucióN De Forms A AdfJ Headstart, EvolucióN De Forms A Adf
J Headstart, EvolucióN De Forms A AdfPedro Gallardo
 
Custom audit rules in Jdeveloper extension
Custom audit rules in Jdeveloper extensionCustom audit rules in Jdeveloper extension
Custom audit rules in Jdeveloper extensionVinay Kumar
 
ADF User Interface Design Best Pratices
ADF User Interface Design Best PraticesADF User Interface Design Best Pratices
ADF User Interface Design Best PraticesAndreas Koop
 
Guidelines for moving from Oracle Forms to Oracle ADF and SOA
Guidelines for moving from Oracle Forms to Oracle ADF and SOAGuidelines for moving from Oracle Forms to Oracle ADF and SOA
Guidelines for moving from Oracle Forms to Oracle ADF and SOASteven Davelaar
 
Talking Services with Oracle ADF and Oracle SOA Suite
Talking Services with Oracle ADF and Oracle SOA SuiteTalking Services with Oracle ADF and Oracle SOA Suite
Talking Services with Oracle ADF and Oracle SOA SuiteDataNext Solutions
 
Oracle ADF Overview
Oracle ADF OverviewOracle ADF Overview
Oracle ADF OverviewBahaa Farouk
 
Working with Portlets in ADF and Webcenter
Working with Portlets in ADF and WebcenterWorking with Portlets in ADF and Webcenter
Working with Portlets in ADF and WebcenterDataNext Solutions
 
JHeadstart Forms2ADF Generator – Migrating from Oracle Forms to a Best-Practi...
JHeadstart Forms2ADF Generator – Migrating from Oracle Forms to a Best-Practi...JHeadstart Forms2ADF Generator – Migrating from Oracle Forms to a Best-Practi...
JHeadstart Forms2ADF Generator – Migrating from Oracle Forms to a Best-Practi...Steven Davelaar
 

Destacado (15)

ADF Anti-Patterns: Dangerous Tutorials
ADF Anti-Patterns: Dangerous TutorialsADF Anti-Patterns: Dangerous Tutorials
ADF Anti-Patterns: Dangerous Tutorials
 
18 Invaluable Lessons About ADF-JSF Interaction
18 Invaluable Lessons About ADF-JSF Interaction18 Invaluable Lessons About ADF-JSF Interaction
18 Invaluable Lessons About ADF-JSF Interaction
 
JDeveloper Auditing Framework (UKOUG Tech2013)
JDeveloper Auditing Framework (UKOUG Tech2013)JDeveloper Auditing Framework (UKOUG Tech2013)
JDeveloper Auditing Framework (UKOUG Tech2013)
 
J Headstart, EvolucióN De Forms A Adf
J Headstart, EvolucióN De Forms A AdfJ Headstart, EvolucióN De Forms A Adf
J Headstart, EvolucióN De Forms A Adf
 
Custom audit rules in Jdeveloper extension
Custom audit rules in Jdeveloper extensionCustom audit rules in Jdeveloper extension
Custom audit rules in Jdeveloper extension
 
so-aDF
so-aDFso-aDF
so-aDF
 
Reporting solutions for ADF Applications
Reporting solutions for ADF ApplicationsReporting solutions for ADF Applications
Reporting solutions for ADF Applications
 
ADF User Interface Design Best Pratices
ADF User Interface Design Best PraticesADF User Interface Design Best Pratices
ADF User Interface Design Best Pratices
 
Guidelines for moving from Oracle Forms to Oracle ADF and SOA
Guidelines for moving from Oracle Forms to Oracle ADF and SOAGuidelines for moving from Oracle Forms to Oracle ADF and SOA
Guidelines for moving from Oracle Forms to Oracle ADF and SOA
 
Talking Services with Oracle ADF and Oracle SOA Suite
Talking Services with Oracle ADF and Oracle SOA SuiteTalking Services with Oracle ADF and Oracle SOA Suite
Talking Services with Oracle ADF and Oracle SOA Suite
 
Oracle ADF Overview
Oracle ADF OverviewOracle ADF Overview
Oracle ADF Overview
 
Working with Portlets in ADF and Webcenter
Working with Portlets in ADF and WebcenterWorking with Portlets in ADF and Webcenter
Working with Portlets in ADF and Webcenter
 
Java SE 8 best practices
Java SE 8 best practicesJava SE 8 best practices
Java SE 8 best practices
 
JHeadstart Forms2ADF Generator – Migrating from Oracle Forms to a Best-Practi...
JHeadstart Forms2ADF Generator – Migrating from Oracle Forms to a Best-Practi...JHeadstart Forms2ADF Generator – Migrating from Oracle Forms to a Best-Practi...
JHeadstart Forms2ADF Generator – Migrating from Oracle Forms to a Best-Practi...
 
ADF in action 1.2
ADF in action 1.2ADF in action 1.2
ADF in action 1.2
 

Similar a ADF Worst Practices (UKOUG Tech2013)

Raising ux bar with offline first design
Raising ux bar with offline first designRaising ux bar with offline first design
Raising ux bar with offline first designKyrylo Reznykov
 
Devoxx : being productive with JHipster
Devoxx : being productive with JHipsterDevoxx : being productive with JHipster
Devoxx : being productive with JHipsterJulien Dubois
 
LCU14 201- Binary Analysis Tools
LCU14 201- Binary Analysis ToolsLCU14 201- Binary Analysis Tools
LCU14 201- Binary Analysis ToolsLinaro
 
Android Lollipop: The developer's perspective
Android Lollipop: The developer's perspectiveAndroid Lollipop: The developer's perspective
Android Lollipop: The developer's perspectiveSebastian Vieira
 
Snowflake Automated Deployments / CI/CD Pipelines
Snowflake Automated Deployments / CI/CD PipelinesSnowflake Automated Deployments / CI/CD Pipelines
Snowflake Automated Deployments / CI/CD PipelinesDrew Hansen
 
Xamarin.android memory management gotchas
Xamarin.android memory management gotchasXamarin.android memory management gotchas
Xamarin.android memory management gotchasAlec Tucker
 
PyGrunn2013 High Performance Web Applications with TurboGears
PyGrunn2013  High Performance Web Applications with TurboGearsPyGrunn2013  High Performance Web Applications with TurboGears
PyGrunn2013 High Performance Web Applications with TurboGearsAlessandro Molina
 
Continuous Profiling for Android Game Performance Optimization
Continuous Profiling for Android Game Performance OptimizationContinuous Profiling for Android Game Performance Optimization
Continuous Profiling for Android Game Performance OptimizationKLab Inc. / Tech
 
Node.js Web Apps @ ebay scale
Node.js Web Apps @ ebay scaleNode.js Web Apps @ ebay scale
Node.js Web Apps @ ebay scaleDmytro Semenov
 
GeoServer Developers Workshop
GeoServer Developers WorkshopGeoServer Developers Workshop
GeoServer Developers WorkshopJody Garnett
 
On component interface
On component interfaceOn component interface
On component interfaceLaurence Chen
 
JSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendJSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendVlad Fedosov
 
Using JavaScript to write Native Mobile Applications
Using JavaScript to write Native Mobile ApplicationsUsing JavaScript to write Native Mobile Applications
Using JavaScript to write Native Mobile ApplicationsDerek Anderson
 
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...JSFestUA
 
Experiences building a distributed shared log on RADOS - Noah Watkins
Experiences building a distributed shared log on RADOS - Noah WatkinsExperiences building a distributed shared log on RADOS - Noah Watkins
Experiences building a distributed shared log on RADOS - Noah WatkinsCeph Community
 
You Can Work on the Web Patform! (GOSIM 2023)
You Can Work on the Web Patform! (GOSIM 2023)You Can Work on the Web Patform! (GOSIM 2023)
You Can Work on the Web Patform! (GOSIM 2023)Igalia
 
Developing Applications for Android - Lecture#3
Developing Applications for Android - Lecture#3Developing Applications for Android - Lecture#3
Developing Applications for Android - Lecture#3Usman Chaudhry
 
JavascriptMVC: Another choice of web framework
JavascriptMVC: Another choice of web frameworkJavascriptMVC: Another choice of web framework
JavascriptMVC: Another choice of web frameworkAlive Kuo
 
Containers explained as for cook and a mecanics
 Containers explained as for cook and a mecanics  Containers explained as for cook and a mecanics
Containers explained as for cook and a mecanics Rachid Zarouali
 

Similar a ADF Worst Practices (UKOUG Tech2013) (20)

Raising ux bar with offline first design
Raising ux bar with offline first designRaising ux bar with offline first design
Raising ux bar with offline first design
 
Devoxx : being productive with JHipster
Devoxx : being productive with JHipsterDevoxx : being productive with JHipster
Devoxx : being productive with JHipster
 
LCU14 201- Binary Analysis Tools
LCU14 201- Binary Analysis ToolsLCU14 201- Binary Analysis Tools
LCU14 201- Binary Analysis Tools
 
Android Lollipop: The developer's perspective
Android Lollipop: The developer's perspectiveAndroid Lollipop: The developer's perspective
Android Lollipop: The developer's perspective
 
Snowflake Automated Deployments / CI/CD Pipelines
Snowflake Automated Deployments / CI/CD PipelinesSnowflake Automated Deployments / CI/CD Pipelines
Snowflake Automated Deployments / CI/CD Pipelines
 
Xamarin.android memory management gotchas
Xamarin.android memory management gotchasXamarin.android memory management gotchas
Xamarin.android memory management gotchas
 
PyGrunn2013 High Performance Web Applications with TurboGears
PyGrunn2013  High Performance Web Applications with TurboGearsPyGrunn2013  High Performance Web Applications with TurboGears
PyGrunn2013 High Performance Web Applications with TurboGears
 
Continuous Profiling for Android Game Performance Optimization
Continuous Profiling for Android Game Performance OptimizationContinuous Profiling for Android Game Performance Optimization
Continuous Profiling for Android Game Performance Optimization
 
Android Platform Debugging & Development
Android Platform Debugging & Development Android Platform Debugging & Development
Android Platform Debugging & Development
 
Node.js Web Apps @ ebay scale
Node.js Web Apps @ ebay scaleNode.js Web Apps @ ebay scale
Node.js Web Apps @ ebay scale
 
GeoServer Developers Workshop
GeoServer Developers WorkshopGeoServer Developers Workshop
GeoServer Developers Workshop
 
On component interface
On component interfaceOn component interface
On component interface
 
JSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendJSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontend
 
Using JavaScript to write Native Mobile Applications
Using JavaScript to write Native Mobile ApplicationsUsing JavaScript to write Native Mobile Applications
Using JavaScript to write Native Mobile Applications
 
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
 
Experiences building a distributed shared log on RADOS - Noah Watkins
Experiences building a distributed shared log on RADOS - Noah WatkinsExperiences building a distributed shared log on RADOS - Noah Watkins
Experiences building a distributed shared log on RADOS - Noah Watkins
 
You Can Work on the Web Patform! (GOSIM 2023)
You Can Work on the Web Patform! (GOSIM 2023)You Can Work on the Web Patform! (GOSIM 2023)
You Can Work on the Web Patform! (GOSIM 2023)
 
Developing Applications for Android - Lecture#3
Developing Applications for Android - Lecture#3Developing Applications for Android - Lecture#3
Developing Applications for Android - Lecture#3
 
JavascriptMVC: Another choice of web framework
JavascriptMVC: Another choice of web frameworkJavascriptMVC: Another choice of web framework
JavascriptMVC: Another choice of web framework
 
Containers explained as for cook and a mecanics
 Containers explained as for cook and a mecanics  Containers explained as for cook and a mecanics
Containers explained as for cook and a mecanics
 

Último

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 

Último (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 

ADF Worst Practices (UKOUG Tech2013)

  • 1. S Worst Practices for Developing an ADF Application UKOUG ADF EMG Version 12.1.2.3.4.0.0b Build WORST_PRACTICES_12.1.2.3.4.0.0b_UKOUG_2013 ADF EMG
  • 2. S About us Paco van der Linden AMIS www.adfplus.com @pavadeli Wilfred van der Deijl The Future Group www.redheap.com @wilfreddeijl
  • 3. S About us Steven Davelaar Oracle ateam-oracle.com @stevendavelaar Wilfred van der Deijl The Future Group www.redheap.com @wilfreddeijl
  • 4. S Ideal project ● 1 developer That’s you of course!
  • 5. S Threats to a healthy ADF project ● Customer / Business / Functional designer ● Architect ● Project manager
  • 6. S Threats to a healthy ADF project ● Customer / Business / Functional designer ● Architect ● Project manager ● Other developers ● Graphic designer
  • 7. S Other Developers… Are not a member of ADF EMG
  • 8. S Other Developers… Do not use ADF EMG Taskflow Tester
  • 9. S ADF EMG Taskflow Tester - Wiki
  • 11. S Other Developers… Don’t add ADF Source code library ● How to get ADF Source ○ ○ ○ ○ ○ ○ Go to support.oracle.com Log Service Request for JDeveloper/ADF “ADF Source Code Request” as problem type Sign agreement and upload to SR Get access to ZIP, typically within one day New versions don’t need new agreement ● Allows debugging of ADF framework
  • 12. S Other Developers… Don’t add ADF Source code library
  • 13. S Other Developers… Don’t adhere to ADF Code Guidelines
  • 14. S ADF Code Guidelines ● 38 pages of excellent content by ADF guru’s ● Topics include: ○ ○ ○ ○ ○ ○ ○ ○ General Code Guidelines ADF Business Components ADF Faces ADF TaskFlows ADF Binding Layer Security High Availability … and more
  • 15. S Other developers ● Don’t adhere to your project specific coding guidelines ● Other developers need your help ○ Reserve time to review each other’s version control commits ○ You might learn from their code as well!! ● Reserve time to perform QA checks ○ Against ADF coding guidelines and project specific guidelines ○ ...or automate this ■ come back tomorrow 10:15 - Exchange 6 “Quality Assurance with JDev Auditing Framework”
  • 16. W Threats to a healthy ADF project ● Customer / Business / Functional designer ● Architect ● Project manager ● Other developers ● Graphic designer
  • 17. W
  • 18. W
  • 19. W
  • 20. W
  • 21. W
  • 22. W
  • 23. W Graphic designer - Pitfalls ● Website ≠ Application ● “HTML is for semantics, CSS is for layout…” ○ ADF Fragment ≠ HTML, ADF skin ≠ CSS ○ ADF Skin → primarily colours, ADF Fragment → the rest ● Bad practice: CSS for layout management
  • 24. W ADF Skinning Tips ● Use stand-alone Skin Editor ● Use ADF component selectors ○ don’t look at the generated HTML ○ use ADF Faces Skin Selectors Tag Reference ● Choice ○ UI Designer to learn ADF skinning (preferred choice) ○ ADF developer to learn CSS
  • 26. W Logging ● Bad practice: System.err.println() ● Best practice: ADFLogger ○ ○ ○ ○ Configure at Runtime without restart Analyze Log for Performance Time your own code Better insight into ADF Framework internals
  • 27. W ADFLogger - Runtime Configuration
  • 28. W ADFLogger - Runtime Configuration
  • 29. W ADFLogger - Log Analyzer ...or open log file from other (production) server
  • 30. W Time custom code with ADFLogger::begin and ADFLogger::end bit.ly/adflogger
  • 31. S Understanding ADF Layers ● Bad: code ADF applications like open source frameworks ● What do we mean by that? ○ All application state is kept in ViewController: ○ Lots of data queried from ADF BC and stored in JSF managed beans or entries in JSF memory scope maps ○ State passed back to ADF BC on subsequent requests: AM methods with lots of arguments ● Good: leverage ADF BC Active Data Model ○ Easy access to previously entered data ○ Row Currency management
  • 32. S Understanding ADF Layers ● Signs of ViewController doing ADF BC work ○ import oracle.jbo… ○ Iterating RowSets ○ Storing lots of data in memory scopes or managed beans. Should only contain true UI state ○ Calling ApplicationModule methods with lots of arguments even when using binding layer ● Project Audits often show 50-80% of ViewController code is unnecessary ○ Either completely redundant ○ ...or should be moved to ADF BC layer
  • 33. S ADF Faces a.k.a. the ViewController project
  • 34. S ADF Lifecycle - Immediate property ● Bad: I run into issues, let’s try immediate=true ● Big difference: immediate on input component vs input on command component ● Almost always wrong in input components ● Make sure you understand both JSF lifecycle and ADF Optimized Lifecycle ● Steven Davelaar’s 18 Lessons ○ also available as ADF Insider Video bit.ly/jsf-lifecycle
  • 35. S Know your ADF Memory Scopes ● Bad: Overuse of SessionScope & PageFlowScope ● Can have significant impact on mem usage ● Good: The smaller, the better ● Do not cache shorter living objects ○ Should be cheap to request each time when needed ○ Can have disastrous consequences, for example caching binding objects
  • 38. S Memory Scopes Guidelines ● SessionScope ○ only use for user context ○ often (UTF) PageFlowScope is better ■ Two browser tabs share SessionScope but have independent UTF PageFlowScope ● RequestScope ○ often BackingBeanScope is better ○ each ADF Region or Declarative Component has own BackingBeanScope but share RequestScope ● Bad: Accessing SessionScope beans from BTF ○ BTF should be reusable and not rely on SessionScope ○ taskflow parameters are there for a reason
  • 39. W tion olu “My ADF application is memoryhhungry” es a l) p al ave th We igh m (sm a of t rt
  • 40. W JSF Component Binding JDeveloper Generated Code <af:inputText binding=”#{pageFlowScope.MyBean.lastName}”/>
  • 41. W JSF Component Binding ● First ask yourself if it is really needed ● binding=”#{pageFlowScope.MyBean.lastName}” references UIComponent in PageFlow bean ● UIComponents should be released after each request ● But Managed Bean might require PageFlowScope for its functionality
  • 43. W “My JSF Component seems to travel around”
  • 44. W Building Component Tree binding attribute No create component Not Null use component Yes call getter Null create component call setter bit.ly/compbind
  • 46. S ADF BC Data Model - Master Detail Beware of excessive querying Navigate row here... Requery (if populated)
  • 47. S ADF BC Data Model - Master Detail Prevent excessive querying ● Use top level ViewObject instances with bind variables ● or reset detail ViewObject on master row navigation bit.ly/masterdetail
  • 48. S ADF BC Data Model - Master Detail Prevent excessive querying
  • 49. W “I encountered a dramatic ADF bug!!! Sometimes users lose entered data when the application is under heavy load.”
  • 52. W “ADF has huge performance problems!!! When under heavy load requests can take several minutes.” “Besides, what is this PS_TXN table for? It is eating up our tablespace.”
  • 53. W Don’t Simply Passivate All ● Every ViewRow with transient atts is persisted ● During activation all state is applied
  • 54. W Simply passivate all? No! ○ Every ViewRow with transient atts is persisted ○ During activation all state is applied
  • 55. S What is passivated? ○ Set logger: oracle.jbo.server.Serializer ○ To:
  • 56. W What is passivated? ○ Set logger: oracle.jbo.server.Serializer ○ To:
  • 57. W “My ADF application is hacked!!! Sometimes users see data from other sessions.” “By the way, I did test the application with AM pooling off.”
  • 58. W Application Module Recycling Not Losing, but Leaking state ● AM Instances Recycled for other users under load ● Not detected by disabling AM pooling!
  • 62. W Eclipse Memory Analyzer Tool bit.ly/eclipsemat
  • 63. W Eclipse Memory Analyzer Tool (MAT) ● Make heap dump of running server JDK_HOME/bin/jmap -dump:file=path jvm_process_id ● ● ● ● Download and run standalone Eclipse MAT Inspect all objects in heap Query Heap Objects Predefined Reports and Tools bit.ly/eclipsemat
  • 65. W Java Mission Control ● ● ● ● Any version of JRockit Hotspot (aka Sun JVM) since 1.7.0_40 Record a period of time Analyze ○ ○ ○ ○ ○ CPU performance Memory Usage Garbage Collection Thread Concurrency etcetera
  • 67. W Password management ● Bad: Credentials in clear text (eg. web.xml) ● Worse: Override with deployment plans bit.ly/secure-adf
  • 69. S Load/Stress Testing ● 5 developers on a Friday afternoon: “Ready…. Set…. Go” ● Every ADF project initially has performance issues ● Consider ○ JMeter - Free open source, not optimized for ADF ○ Oracle Application Testing Suite - ADF aware ● Requires ○ Production like testing environment ○ Good knowledge of chosen test tool ○ 10 days setup (assuming test tool experience)
  • 70. S Further Reading ● bit.ly/adflogger ○ ADFLogger Custom Timings ● bit.ly/secure-adf ○ FMW Credential Store ● bit.ly/eclipsemat ○ Memory Analyzer Tool ● bit.ly/miscontrol ○ Java Mission Control ● bit.ly/jsf-lifecycle ○ Steven Davelaar’s JSF Lifecycle Lessons ● bit.ly/compbind ○ JSF Component Bindings ● bit.ly/masterdetail ○ Lazy Master Detail Query