Performance Tuning Best Practices for ADF Applications

Post on 26-Jan-2023

0 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

Transcript

Session ID:

Prepared by:

Performance Tuning Best Practices for ADF Applications

10398

Gavin WoodsAlex Walworth

Introduction

• Gavin WoodsTechnical Manager (ADF), PITSS America LLC

• Experience:– 2 years, Project Management (ADF and MAF)– 5 years, ADF Development– 2 years, WebLogic Administration

• PITSS America LLC is located in Troy, MichiganPITSS Gmbh (HQ) is located in Stuttgart, Germany

2

Overview

• Running ADF on Mobile Devices

• User Interface Performance Tuning

• ADFBC Performance Tuning

• Miscellaneous Performance Tips

3

Running ADF on Mobile Devices

Enterprise Handheld Devices Today

• There are devices which MAF will not support, that are common in today’s enterprises.

For example, Symbol/Motorola Scan Guns

5

● Runs Windows Mobile 5,6● Ruggedized Scan Gun,

used in warehouses● Hard-Key Driver User

Interface Navigation● Low Computing Power

Too costly to replace with newer iOS/Android devices

Adapting the Hand Held Device

• Don’t use a built-in internet browser like Windows Mobile IE, its too slow!

• Install a common proprietary/third party internet browser designed for handheld mobile devices (e.g. Zebra Enterprise Browser, WaveLink Industrial Browser)

– Lightweight Browser optimized to run modern-day web applications on your mobile device

– Browser should provide JavaScript APIs that integrates with device hard-keys

6

Adapting Your ADF Application

Light ADF Faces

7

PanelGridLayoutGoButton,GoLinkOutputTextListView (9kB)

Heavy ADF Faces

PanelStretch,commandButton, commandLinkLabelTable (245kB)

Source: http://www.ateam-oracle.com/webcenter-mobile-delivery/

User Interface Performance Tuning

Tune your User Interface

• Use the light ADF Faces components, mentioned in slide 7

• Keep Component Id’s to a length of 4-7 characters– Limits the rendering time required by your browser

• Write JavaScript in JS libraries and reference it– Allows your browser to cache the JavaScript

• Write CSS classes in CSS files and reference it– Allows your browser to cache to CSS and limit time

spent in rendering inline CSS• Avoid writing inline CSS in the inlineStyle and

contentStyle property where possible• Use components appropriate for the use-case.

Don’t use heavy components to deliver something simple

9

ADF-Business Component Performance Tuning

Think about your application architecture

• For static data that will get re-used by most/all users (e.g. Menu), store it’s view object(s) in a Shared Application Module– Benefit: Saves JVM heap, saves processing time

• For labels, please use the built-in ResourceBundle and avoid DB-based labels. If you have to do them, store them in an Shared Application Module, set at Application scope.

11

Avoid Complex Business Logic in getters of backing beans

• ADF Lifecyle will execute the getter methods for properties that reference them - and can get executed multiple times

• Recommendation: perform business logic in task flow activity or in a listener method when necessary.

12

Avoid complex business logic data modifications in single server calls

Example: Developer programs the app to complete large amounts of business logic, amounting to minutes of processing time

• Don’t make users wait for long processes

• Utilize threading and notify the user to check later, notify when completed (e.g. email, etc..)

• Writing such business logic in PL/SQL is recommended, avoid ADFBC all together - if your developers are PL/SQL savvy

13

Take care of the simple things

• When building a View Object, use Entity Objects only when necessary. – Don’t create a bunch of Entity Objects and reference

them in a View Object, if you’re not going to do DML operations

• Ensure the Framework envokes View Object queries, prevent programmatic execution

• If using AF:Table/ListView tune your view object’s to fetch batches of rows it needs to display at one time. Avoid setting a fetch for every row.

• Avoid Looping through view object rows programmatically

14

Miscellaneous Performance Tips

Use the ADFLogger, please

• Stop using System.out.println• Stop using printStackTraces

• Use ADFLogger and it’s varying levels of grainularity (INFO, WARNING, SEVERE, etc..)

16

top related