SlideShare uma empresa Scribd logo
1 de 81
Baixar para ler offline
The Autobahn Has no Speed Limit – Your XPages Shouldn’t Either
Tweet about this event: #xpages
and mention us: @teamstudio @TLCCLTD @eknori
October 17, 2013
Taline Badrikian

Marketing Director

@teamstudio
teamstudio.com
@TLCCLTD
@eknori
Who we are
• Our background is in creating tools for collaborative
computing in mid-size and large enterprises, primarily for
Lotus Notes
• Easy-to-use tools for developers and administrators
• 2300+ active customers, 47 countries
• Offices in US, UK and Japan
• Entered mobile space in 2010 with Unplugged – easy
mobilization of Notes apps to Blackberry, Android and iOS
Teamstudio Unplugged
• Your Mobile Domino Server – take your Notes
apps with you!
• End users access Notes applications from
mobile devices whether online or offline
• Leverages existing skills and technology –
XPages – Replication model you already know
• IBM Collaboration Solutions Award Winner 2013
Teamstudio Continuity
•

Mobile BCM application for smartphones and tablets
– iOS, Android and BB

•
•
•

Offline access to all your BCM and
Disaster Recovery data
Store plans, contacts, call trees, and more
Client available for download from app stores
Teamstudio
• Next webinar November 19th
• DCLUG – October 24th
• BLUG All Things Mobile – October 29th
• Promotions:
– Chance to win an iPad mini when you get a demo of Teamstudio
Continuity
The Autobahn has no speed limit
- Your XPages shouldn't either!

Your Host Today:
Paul Della-Nebbia
TLCC
@PaulDN

#XPages
1
Upcoming and Recorded Webinars

Next Webinar on November 19th
www.tlcc.com/xpages-webinar

View Previous Webinars
(use url above)

2
TLCC Courses and Services

• The Leader in Notes and Domino Training since 1997
• Self Paced Distance Learning Courses for Notes/Domino
– XPages, Development, and Administration (user too!)
– Learn anywhere using your Notes client
– Many demos and activities
– An Instructor is a click away

• OnSite Private Classes
• TLCC Mentoring Services

3
What’s New at TLCC

 Free course – Introduction to XPages Development (both 8.5 and 9.0)
 New Courses!
• Notes Domino 9 Application Development 1
• Notes Domino 9 Application Development Update
• Java 1 for XPages Development (9.0)
• Notes Domino 9 System Administration Update
• Notes Domino 9 System Administration 1
 New Packages!
• XPages and JavaScript for Domino 9 Package
• XPages and Rapid Development for Domino 9 Package
• XPages, JavaScript and Rapid Development for Domino 9 Package

 TLCC’s Fall Sale – Extended to Oct. 31st
4
XPages Skills Path
Suggested TLCC Skills Path at TLCC.com

Core Notes/Domino
Skills

Domino Object
Model skills
LotusScript or
Java

Rapid XPages
Development (user
interface controls)
XPages
Development 2

JavaScript for
XPages Developers

XPages
Development 1
Mobile XPages
Development

Java for XPages

TLCC Can Help:
•
•
•
•
•

Self Paced Courses
Instructor Led Online
OnSite Private Instructor Led
Blended Learning
Custom courses
5
Asking Questions

Q & A at the end!
Type in your
questions as they
come up
6
Your Presenters Today:

Howard Greenberg
IBM Champion
Founding Partner
TLCC
@TLCCLtd

Ulrich Krause
IBM Champion
Senior Software Architect
BCC
@Eknori, @bccffm

#XPages
7
About: Ulrich Krause

• Administrator /Developer since 1993
• Senior Software Architect at BCC, Germany

• OpenNTF Contributor
• IBM Champion 2011/2012/2013
•
•
•
•
•

Blog http://www.eknori.de
Web http://www.bcc.biz
Forum (de) (http://www.atnotes.de)
Twitter @eknori
Mail ulrich.krause@eknori.de
8
Agenda

• What factors affect Performance?
• JSF Lifecycle Listener
• Partial Update / Partial Execute
• Tools
• Coding Factors
– ViewNavigator vs. GetItemValue
– SSJS vs. Java
– Stringbuilder
• Questions???

9
XPages Request

10
Hardware

• The hardware used has a significant influence on
performance. There are 3 key elements:
– CPU
– Main Memory
– Hard Disk

11
Hardware

• Main Memory
– Limit defined by the operating system
 Scalability
• CPU
– Cores / Clock / Cache
 Poor response time
• Weak CPU AND Low Memory
– Poor overall performance
– Poor response times
– Server "hangs"

12
Network

• Latency
– Time taken for data transmission between
multiple computers on a network
• Bandwidth
– Rate of transmission of data
• Greater Bandwidth
+ Lower Latency
-------------------------------= Better Connection

13
Client & Browser

• Hardware
• How many data requests / responses are
transmitted
• How much data is transferred (size)
• Caching of resources
• How much CSJS runs
• Size / complexity of the CSS
• Complexity of the site structure

14
Limiting factors on performance

• Browser / HTTP server
– Network latency – distance/time to server.
– Bandwidth – size of files.
– Browser limits on concurrent downloads
• IE7 allows 2 downloads, IE8 allows 6

• HTTP Server / App Server
– HTTP Server JVM heap size & garbage collector
– CPU time, competition between threads, gives slower
response times
– Threads, limited to 40 by default
15
Limiting factors on performance

• App Server / Domino context
– Read design elements from the NSF (XPage .class files, form
structure, etc)
– Backend API calls may be expensive, especially for large data
sets
– Design elements may be network requests

16
Limiting factors on performance

• Servlet / Lifecycle
– Restore control tree – file system read. Control tree locking
– no concurrent access
– Rendered re-evaluated for every control for most phases

• Browser/Client JavaScript/Dojo
– Inline JavaScript blocks insertion of later HTML elements
into the DOM tree
– Dojo does AJAX requests for .js files for dojo modules that
are not loaded

17
General Performance Options

• notes.ini
– HTTPJVMMaxHeapSizeSet=1
– HTTPJVMMaxHeapSize=256M
• Should be set to ¼ of the available RAM

• Domino Administrator
– HTTP server Disable Logging
– HTTP server thread count defaults to 40
• link to IBM article

• Debugging enabled in notes.ini ?
– JavaEnableDebug=1
– JavaDebugOptions=transport=dt_socket,server=y,suspen
d=n,address=8000
– JavascriptEnableDebug=1

18
Reducing Memory Utilization

• xsp.persistence.mode=
– Defines the persistence mode for the JSF pages
• file: All the pages are persisted on disk
• fileex: All the pages are persisted on disk except the current one,
which stays in memory
• <else>: All the pages stay in memory (tree mode)

19
JavaScript/CSS Aggregation

• Groups many DOJO, CSS / JS files into a single file
– Less requests from the browser to the server
– Performance improvements on networks with high
latency
– Enhanced performance parsing CSS / JS
– Fewer connections to the server
On the Server: xsp.properties:
xsp.resources.aggregate=true

20
JavaScript/CSS Aggregation

21
XPages PreLoad

• XPagesPreload=1
• New Feature in Notes / Domino 8.5.3
• Works on Server and Client
• Java classes from the XPages runtime plug-ins loaded
from a fixed list of runtime classes ( 435 in ND 8.5.3 )
– com.ibm.xsp.core, common utility, JS wrapper, FSF runtime
classes

• Java classes referenced in *-faces.config.xml
– XPages control renderer, data sources, complex types

22
XPages PreLoad

• XPagesPreloadDB =
Server!!Db.nsf/XPage.xsp, myLocalDb.nsf

• Works at the application level
• The application is loaded on the client / server startup into
memory
– This happens even when the application is first opened in
the browser
23
XPages PreLoad (cont.)

• For each entry in the notes.ini variable, an XPage
URL is generated and sent to the server
• The application is loaded, and the HTML generated
• The XPages runtime discards the HTML, but retains
the application in memory

24
Scoped Variables

• applicationScope
– Are visible for all users of one application
– Expires some time after the last user used an
applicationScope variable
– applicationScope variables are NOT persistent forever

• sessionScope
– Is valid through the session of the current user
– A user session expires after some time of inactivity
– Uses don't have access to the sessionScope variables of
other users

25
Scoped Variables (cont.)

• viewScope
– Is visible for views on the current page only.
– Useful for transporting a search query to a view.

• requestScope
– Is valid through one request of the current user.
– That includes refreshing of a page.

26
Caching with Application Scope

27
Next Up:

Howard Greenberg
IBM Champion
Founding Partner
TLCC
@TLCCLtd

#XPages
28
JSF Life Cycle - Post

Request

Restore View
•Restore component tree
•Events:
•afterRestoreView

Apply Request
Values
•Copy data to Editable
controls

Process Validations
•Validations
•Converters

Update Model
Values
•Move values to data
source

Invoke Application
•Application logic
•Events:
•onClientLoad (XPage,
etc)
•on… events of button,
etc.

Render Response
•Convert to HTML, etc.
•Events:
•beforeRenderReponse
•afterRenderResponse

Response

29
Lifecycle1 XPage – Initial Page Load

Render Response
• Rendered property for id: label1
• Label property for id: label1
• Rendered property for id: inputText1
• Default value property for id: inputText1
• Rendered property for id: label2
• Rendered property for id: comboBox1
• values property for id: comboBox1
• values property for id: comboBox1
• Rendered property for id: computedField1
• Value property for id: computedField1
• Rendered property for id: computedField2
• Value property for id: computedField2

30
Lifecyle1 – Submit (Full Update)

Restore View

Apply Request Values (8)
•Rendered property for id: label1
•Rendered property for id: inputText1
•Rendered property for id: inputText1
•Rendered property for id: label2
•Rendered property for id: comboBox1
•Rendered property for id: comboBox1
•Rendered property for id: computedField1
•Rendered property for id: computedField2

Update Model Values (8)
•Rendered property for id: label1
•Rendered property for id: inputText1
•Rendered property for id: inputText1
•Rendered property for id: label2
•Rendered property for id: comboBox1
•Rendered property for id: comboBox1
•Rendered property for id: computedField1
•Rendered property for id: computedField2

Invoke Application (1)
•OnClick event for id: button1

39 SSJS Calls

Process Validations (11)
•Rendered property for id: label1
•Rendered property for id: inputText1
•Rendered property for id: inputText1
•Validation for inputText1
•Default value property for id: inputText1
•Rendered property for id: label2
•Rendered property for id: comboBox1
•Rendered property for id: comboBox1
•values property for id: comboBox1
•Rendered property for id: computedField1
•Rendered property for id: computedField2
Render Response (11)
•Rendered property for id: label1
•Label property for id: label1
•Rendered property for id: inputText1
•Rendered property for id: label2
•Rendered property for id: comboBox1
•values property for id: comboBox1
•values property for id: comboBox1
•Rendered property for id: computedField1
•Value property for id: computedField1
•Rendered property for id: computedField2
•Value property for id: computedField2
31
When to Execute - # vs $
<xp:label id="label1">
<xp:this.value>
<![CDATA[#{javascript:return “My
Label”;}]]>
</xp:this.value>
</xp:label>

• # is Compute dynamically
– Executed every time the page is rendered
– Use for values that are likely to change
• $ is Compute on Page Load
– Executed when the page is first loaded
– Use for values that don't change
32
Lifecyle2 – Submit (Full Update) - On Page Load

Restore View

Changed all Rendered and
Values (comboBox) to only
compute on Page Load

Update Model Values
•Rendered property for id: label1
•Rendered property for id: inputText1
•Rendered property for id: inputText1
•Rendered property for id: label2
•Rendered property for id: comboBox1
•Rendered property for id: comboBox1
•Rendered property for id: computedField1
•Rendered property for id: computedField2

Apply Request Values
•Rendered property for id: label1
•Rendered property for id: inputText1
•Rendered property for id: inputText1
•Rendered property for id: label2
•Rendered property for id: comboBox1
•Rendered property for id: comboBox1
•Rendered property for id: computedField1
•Rendered property for id: computedField2

Invoke Application (1)
•OnClick event for id: button1

6 SSJS Calls, saved 33

Process Validations (2)
•Rendered property for id: label1
•Rendered property for id: inputText1
•Rendered property for id: inputText1
•Validation for inputText1
•Default value property for id: inputText1
•Rendered property for id: label2
•Rendered property for id: comboBox1
•Rendered property for id: comboBox1
•values property for id: comboBox1
•Rendered property for id: computedField1
•Rendered property for id: computedField2
Render Response (3)
•Rendered property for id: label1
•Label property for id: label1
•Rendered property for id: inputText1
•Rendered property for id: label2
•Rendered property for id: comboBox1
•values property for id: comboBox1
•values property for id: comboBox1
•Rendered property for id: computedField1
•Value property for id: computedField1
•Rendered property for id: computedField2
•Value property for id: computedField2
33
But I need dynamic Rendering!

Options for dynamically computing the Rendered:
• Scoped variables
– Still get calculated but do the heavy lifting once and then
read the scoped variable in the Rendered property

• DataContexts
– Compute a value at the Xpage or Panel level once
– Refer to the value using EL (much faster than SSJS)

34
DataContext

• Can be thought of as global variables
• Value can be computed dynamically or on page load
– Warning: Computing dynamically has performance impact

• Can be scoped to any level that a data source can
– XPage, Custom Control or Panel
– Set a dataContext in a panel in a repeat control to avoid
multiple references to a NotesDocument's item

• Can be referenced using EL
– Benefit: Not having to go through the SSJS parser

35
DataContext - Pitfall

• Be careful binding data context variables dynamically
– They will be recomputed multiple times, even when in
partial execution mode and if they are not in use (six
times!)
• Apply Request Values
• Process Validations
• Update Model Values
• Invoke Application
• Twice in Render Response!
• If computed on page load then only computed once on page
load
• See Paul Withers blog entry to learn how to set a data context
value via code

36
Partial Refresh vs. Partial Execution?

• Partial Refresh (Update)
– Computes entire XPage,
only sends back what is
in the partial refresh id
(refreshId)

• Partial Execution
– Only calculates what is in
the area specified
(execId)
37
Partial Refresh Demo - Results

Restore View

Apply Request Values (8)
•Rendered property for id: label1
•Rendered property for id: inputText1
•Rendered property for id: inputText1
•Rendered property for id: label2
•Rendered property for id: comboBox1
•Rendered property for id: comboBox1
•Rendered property for id: computedField1
•Rendered property for id: computedField2

Update Model Values (8)
•Rendered property for id: label1
•Rendered property for id: inputText1
•Rendered property for id: inputText1
•Rendered property for id: label2
•Rendered property for id: comboBox1
•Rendered property for id: comboBox1
•Rendered property for id: computedField1
•Rendered property for id: computedField2

Invoke Application (1)
•OnClick event for id: button1

Only Savings
were here!

30 SSJS Calls, saved 9

Process Validations (11)
•Rendered property for id: label1
•Rendered property for id: inputText1
•Rendered property for id: inputText1
•Validation for inputText1
•Default value property for id: inputText1
•Rendered property for id: label2
•Rendered property for id: comboBox1
•Rendered property for id: comboBox1
•values property for id: comboBox1
•Rendered property for id: computedField1
•Rendered property for id: computedField2
Render Response (2)
•Rendered property for id: label1
•Label property for id: label1
•Rendered property for id: inputText1
•Rendered property for id: label2
•Rendered property for id: comboBox1
•values property for id: comboBox1
•values property for id: comboBox1
•Rendered property for id: computedField1
•Value property for id: computedField1
•Rendered property for id: computedField2
•Value property for id: computedField2
38
Partial Refresh Pros and Cons

• Pros
– Reduced control processing in the render response phase
– Smaller response from server
• Means reduced network usage

– Better UI experience
• Rest of the page is still visible while waiting for a response

• Cons
– Controls like computed fields outside refresh area don’t refresh
– Be careful turning this on for a completed XPage (TEST!)
– Can only update one area (one id)
• Workaround on Tim Tripcony blog here
39
Partial Execution Demo - Results

Restore View

16 SSJS Calls
Saved 13
Update Model Values (1)
•Rendered property for id: label1
•Rendered property for id: inputText1
•Rendered property for id: inputText1
•Rendered property for id: label2
•Rendered property for id: comboBox1
•Rendered property for id: comboBox1
•Rendered property for id: computedField1
•Rendered property for id: computedField2

Apply Request Values (1)
•Rendered property for id: label1
•Rendered property for id: inputText1
•Rendered property for id: inputText1
•Rendered property for id: label2
•Rendered property for id: comboBox1
•Rendered property for id: comboBox1
•Rendered property for id: computedField1
•Rendered property for id: computedField2

Invoke Application (1)
•OnClick event for id: button1

Process Validations (1)
•Rendered property for id: label1
•Rendered property for id: inputText1
•Rendered property for id: inputText1
•Validation for inputText1
•Default value property for id: inputText1
•Rendered property for id: label2
•Rendered property for id: comboBox1
•Rendered property for id: comboBox1
•values property for id: comboBox1
•Rendered property for id: computedField1
•Rendered property for id: computedField2

Render Response (12)
•Rendered property for id: label1
•Label property for id: label1
•Rendered property for id: inputText1
•Default value property for id: inputText1
•Rendered property for id: label2
•Rendered property for id: comboBox1
•values property for id: comboBox1
•values property for id: comboBox1
•Rendered property for id: computedField1
•Value property for id: computedField1
•Rendered property for id: computedField2
•Value property for id: computedField2

40
Partial Execution Pros and Cons

• Pros
– Reduced processing in the 3 data-processing phases

• Cons
– Control with onClick event has to be inside the execId area
– Editable values outside of the executed area do not get
submitted/updated (reset to default values)
– Existing XPages need analysis/testing before using this
• Current onclick events might refer to controls where the data
is not submitted
– ExecMode available in 8.5.1
– Have to use source to enter ExecId (in 8.5, 9.0 has Designer UI)
41
Partial Refresh AND Execution Demo - Results

Restore View

Apply Request Values (1)
•Rendered property for id: label1
•Rendered property for id: inputText1
•Rendered property for id: inputText1
•Rendered property for id: label2
•Rendered property for id: comboBox1
•Rendered property for id: comboBox1
•Rendered property for id: computedField1
•Rendered property for id: computedField2
•Rendered property for id: computedField2

Update Model Values (1)
•Rendered property for id: label1
•Rendered property for id: inputText1
•Rendered property for id: inputText1
•Rendered property for id: label2
•Rendered property for id: comboBox1
•Rendered property for id: comboBox1
•Rendered property for id: computedField1
•Rendered property for id: computedField2

Invoke Application (1)
•OnClick event for id: button1

6 SSJS Calls,
saved 33

Process Validations (1)
•Rendered property for id: label1
•Rendered property for id: inputText1
•Rendered property for id: inputText1
•Validation for inputText1
•Default value property for id: inputText1
•Rendered property for id: label2
•Rendered property for id: comboBox1
•Rendered property for id: comboBox1
•values property for id: comboBox1
•Rendered property for id: computedField1
•Rendered property for id: computedField2
Render Response (2)
•Rendered property for id: label1
•Label property for id: label1
•Rendered property for id: inputText1
•Rendered property for id: label2
•Rendered property for id: comboBox1
•values property for id: comboBox1
•values property for id: comboBox1
•Rendered property for id: computedField1
•Value property for id: computedField1
•Rendered property for id: computedField2
•Value property for id: computedField2
42
disableValidators= true

•
•
•
•

All phases (1-6) occur
Turns off all validators
Converters continue to work
Items in documents will be updated

Restore View

Apply Request
Values

Process
Validations

Update Model
Values

Invoke
Application

Render
Response

•No Validators get
executed here!

43
Immediate = true

• JSF Lifecycle processes only phases
(1, 2, 6)
• No data processing
• Items in documents are not
updated
• Onclick event handler scripts and
render response calculations are
performed
Restore View

Apply Request
Values

Process
Validations

Update Model
Values

Invoke
Application

Render
Response

44
Using the loaded Property
Loaded only computed once in the createView phase

• Loaded = true
– Not in component tree or
memory

• Loaded = false
– Control is not created
– Can never be rendered
or accessed
– Saves memory too

45
Life Cycle Performance Suggestions

• Most properties, like CSS “style” are
only computed in the
RenderResponse phase
• Watch and minimize:
– Rendered property (when dynamic)
• Computed multiple times!
• Use dataContexts or scoped variables
when able

• Use both Partial Refresh (Update)
and Partial Execute when able

46
Watch Out for @DbLookup

• @DbLookup about 3-4 times slower than SSJS
– res = @DbLookup(db,"CustomersByNameView",names[i], "phone");

vs.
– doc = vw.getDocumentByKey(names[i], true);
res = doc.getItemValueString("phone");

• Five lookups repeated 100 times
– @DbLookup averaged about 1728ms
– getDocumentByKey averaged 510ms
• Other @Functions not tested

47
Next Up:

Ulrich Krause
IBM Champion
Senior Software
Architect
BCC
@Eknori, @BCCFFM

#XPages
48
Images

• Use correct file type depending on content
– JPEG for complex and detailed images
– PNG/GIF for simple images, fonts, transparencies
• Use the HTML <img> tag “width” and “height” attributes

• For faster HTML layout in the browser
– Size the image to size you intend to use
• Resizing using html attributes height and width will delay the
rendering of your page
• Images larger than necessary will waste bandwidth

49
Image Sprites

• Use CSS Image Sprites
– If you have multiple small images, make a single larger
image containing the smaller images
– Use CSS to display only the relevant subset image at a
location in the page
– For semantically significant sprites, provide an
accessibility “title” attribute (as sprites don't use the
IMG “alt” attribute, but you still want to assist blind
users)
– There's no specific XPages support for sprites, but
they're used in the XPages OneIU themes

50
CSS Image Sprite Sample

http://www.w3schools.com/css/tryit.asp?filename=trycss_sprites_img

51
XPages Toolbox

• XPages based Application
– Runs on the Domino server or the Notes client
– An NSF needs to be installed on the server/Notes client
– A profiler jar file should be added to the JVM launch options

• Measures CPU performance and memory allocation
• Available from OpenNTF.org
– Free open source project
• http://www.openntf.org/internal/home.nsf/project.xsp?action=open
Document&name=XPages%20Toolbox

• Extended in 8.5.2 to support backend classes profiling

52
XPages Toolbox

53
XPages Toolbox

• Generate a heap dump of the JVM running in the HTTP
task
– A button in the XPages profiler generates the heap dump
– From the Domino console
• tell http xsp heapdump (triggers com.ibm.jvm.Dump.HeapDump())
• tell http xsp javadump (triggers com.ibm.jvm.Dump.JavaDump())

• Analyze the heap dump using the Eclipse memory
analyzer
– http://www.eclipse.org/mat/
– http://www.ibm.com/developerworks/java/jdk/tools/dtfj.html

54
Heapdump / Javadump Analyzer

55
More Tools

• Print statements
– In rendered/visible computations to see how often executed
• print("panel2 evaluating rendered property");

– In the XPages root control events:
• before/afterPageLoad, afterRestoreView,
before/afterRenderResponse

– Custom control root events:
• before/afterPageLoad

– In the document data source events:
• queryNewDocument, postSaveDocument, etc.

• Task Manager and/or Process Explorer
– Shows CPU usage & process memory usage as it happens

56
More Tools

• Browser developer tools
– for watching network transactions, partial updates,
response times
– BROWSER: Firebug, Developer Tools
– XPiNC: FirebugLite from ExtLib

• Java / Javascript Debugging
– Degrades performance but can inspect objects
• Use the Eclipse Java debugger
– In Dominonotes.ini add these 2 options:
• JavaEnableDebug=1
• JavaDebugOptions=transport=dt_socket,server=y,suspend=n,add
ress=8000
57
Optimization – Step By Step

58
Step 1: Original Code From Sample

• Read all Contacts into a NotesDocumentCollection,
loop the collection and build the JSON by reading
the values from items in the document

59
Step 1: Result

60
Step 2: Store UNID in an item

• Get all Contacts into a NotesDocumentCollection,
loop the collection and build the JSON by reading
the values from items in the document. Also UNID
is stored in document

61
Step 2: Result

62
Step 3: Build JSON on document save

• Get all Contacts into a NotesDocumentCollection, loop
the collection and get the JSON from an item on the
document. JSON is calculated on document save

63
Step 3: Result

64
Step 4: Read JSON from view with ViewNavigator

65
Step 4: Result

66
StringBuilder vs String.concat

• Concatenation of Strings is very easy in Java - all you
need is a +
• Each time you append something via + (String.concat())
a new String is created, the old stuff is copied, the new
stuff is appended, and the old String is thrown away.
The bigger the String gets the longer it takes - there is
more to copy and more garbage is produced.
• Accordingly to Arno Unkrig the optimal strategy is to
use String.concat() for 2 or 3 operands, and
StringBuilder for 4 or more operands

67
StringBuilder vs String.concat

• Use StringBuilder whenever you assemble a String in a
loop
– Keep in mind that + isn't always a good idea

68
Step 5: Use a StringBuilder to concat the JSON

69
Step 5: Result

70
Step 6: Use Java instead of SSJS

Xpage SSJS Code

Java Code
71
Step 6: Result

72
Homework Time – Further References

• IBM article on JSF (non XPages)
• Paul Withers blog (each link below is different)
– Part 1, Part 2, Part 3

• Tony McGuckin’s Video - XPages Master class
– 4 videos plus sample applications

73
Questions????

Use the Q&A pane in WebEx
to ask questions
We will answer your questions
verbally

74
Question and Answer Time!

Howard Greenberg

Ulrich Krause

Upcoming Events:
TLCC Fall Sale – ends 10/31
IBM Connect 2014 Registration is now open

Paul Della-Nebbia

Taline Badrikian
#XPages
@Eknori
@TLCCLtd

@Teamstudio
@PaulDN
@BCCFFM

TLCC Questions?
howardg@tlcc.com paul@tlcc.com
888-241-8522 or 561-953-0095

Teamstudio Questions?
contactus@teamstudio.com
877-228-6178
75

Mais conteúdo relacionado

Mais procurados

XPages: No Experience Needed
XPages: No Experience NeededXPages: No Experience Needed
XPages: No Experience NeededKathy Brown
 
Extension Library - Viagra for XPages
Extension Library - Viagra for XPagesExtension Library - Viagra for XPages
Extension Library - Viagra for XPagesUlrich Krause
 
A hitchhiker’s guide to troubleshooting ibm connections
A hitchhiker’s guide to troubleshooting ibm connectionsA hitchhiker’s guide to troubleshooting ibm connections
A hitchhiker’s guide to troubleshooting ibm connectionsSharon James
 
October OpenNTF Webinar - What we like about Domino/Notes 12, recommended new...
October OpenNTF Webinar - What we like about Domino/Notes 12, recommended new...October OpenNTF Webinar - What we like about Domino/Notes 12, recommended new...
October OpenNTF Webinar - What we like about Domino/Notes 12, recommended new...Howard Greenberg
 
Our take on Domino 10 - a Ytria webinar
Our take on Domino 10 - a Ytria webinarOur take on Domino 10 - a Ytria webinar
Our take on Domino 10 - a Ytria webinarBenedek Menesi
 
JMP201 Introduction to IBM Lotus Notes and IBM Lotus Domino Integration with ...
JMP201 Introduction to IBM Lotus Notes and IBM Lotus Domino Integration with ...JMP201 Introduction to IBM Lotus Notes and IBM Lotus Domino Integration with ...
JMP201 Introduction to IBM Lotus Notes and IBM Lotus Domino Integration with ...John Head
 
Introducing CrossWorlds for IBM Domino
Introducing CrossWorlds for IBM DominoIntroducing CrossWorlds for IBM Domino
Introducing CrossWorlds for IBM DominoDaniele Vistalli
 
21 Ways to make your Data work for you
21 Ways to make your Data work for you21 Ways to make your Data work for you
21 Ways to make your Data work for youChristoph Adler
 
Best Practices for Installing IBM Verse on Premises
Best Practices for Installing IBM Verse on PremisesBest Practices for Installing IBM Verse on Premises
Best Practices for Installing IBM Verse on PremisesTimsterC
 
SHOW102 XPages: Still No Experience Necessary IBM Connect 2014
SHOW102 XPages: Still No Experience Necessary IBM Connect 2014SHOW102 XPages: Still No Experience Necessary IBM Connect 2014
SHOW102 XPages: Still No Experience Necessary IBM Connect 2014Kathy Brown
 
The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...Mark Roden
 
O365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - MaterialO365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - MaterialThomas Daly
 
Soccnx10: Best and worst practices deploying IBM Connections
Soccnx10: Best and worst practices deploying IBM ConnectionsSoccnx10: Best and worst practices deploying IBM Connections
Soccnx10: Best and worst practices deploying IBM Connectionspanagenda
 
An introduction to configuring Domino for Docker
An introduction to configuring Domino for DockerAn introduction to configuring Domino for Docker
An introduction to configuring Domino for DockerGabriella Davis
 
DEV-1430 IBM Connections Integration
DEV-1430 IBM Connections IntegrationDEV-1430 IBM Connections Integration
DEV-1430 IBM Connections IntegrationJesse Gallagher
 
MWLUG 2015 - An Introduction to MVC
MWLUG 2015 - An Introduction to MVCMWLUG 2015 - An Introduction to MVC
MWLUG 2015 - An Introduction to MVCUlrich Krause
 
The future of web development write once, run everywhere with angular js an...
The future of web development   write once, run everywhere with angular js an...The future of web development   write once, run everywhere with angular js an...
The future of web development write once, run everywhere with angular js an...Mark Leusink
 

Mais procurados (20)

XPages: No Experience Needed
XPages: No Experience NeededXPages: No Experience Needed
XPages: No Experience Needed
 
Extension Library - Viagra for XPages
Extension Library - Viagra for XPagesExtension Library - Viagra for XPages
Extension Library - Viagra for XPages
 
A hitchhiker’s guide to troubleshooting ibm connections
A hitchhiker’s guide to troubleshooting ibm connectionsA hitchhiker’s guide to troubleshooting ibm connections
A hitchhiker’s guide to troubleshooting ibm connections
 
October OpenNTF Webinar - What we like about Domino/Notes 12, recommended new...
October OpenNTF Webinar - What we like about Domino/Notes 12, recommended new...October OpenNTF Webinar - What we like about Domino/Notes 12, recommended new...
October OpenNTF Webinar - What we like about Domino/Notes 12, recommended new...
 
Our take on Domino 10 - a Ytria webinar
Our take on Domino 10 - a Ytria webinarOur take on Domino 10 - a Ytria webinar
Our take on Domino 10 - a Ytria webinar
 
JMP201 Introduction to IBM Lotus Notes and IBM Lotus Domino Integration with ...
JMP201 Introduction to IBM Lotus Notes and IBM Lotus Domino Integration with ...JMP201 Introduction to IBM Lotus Notes and IBM Lotus Domino Integration with ...
JMP201 Introduction to IBM Lotus Notes and IBM Lotus Domino Integration with ...
 
Introducing CrossWorlds for IBM Domino
Introducing CrossWorlds for IBM DominoIntroducing CrossWorlds for IBM Domino
Introducing CrossWorlds for IBM Domino
 
Quickr
QuickrQuickr
Quickr
 
Ms vs ibm_v1.3
Ms vs ibm_v1.3Ms vs ibm_v1.3
Ms vs ibm_v1.3
 
21 Ways to make your Data work for you
21 Ways to make your Data work for you21 Ways to make your Data work for you
21 Ways to make your Data work for you
 
Best Practices for Installing IBM Verse on Premises
Best Practices for Installing IBM Verse on PremisesBest Practices for Installing IBM Verse on Premises
Best Practices for Installing IBM Verse on Premises
 
SHOW102 XPages: Still No Experience Necessary IBM Connect 2014
SHOW102 XPages: Still No Experience Necessary IBM Connect 2014SHOW102 XPages: Still No Experience Necessary IBM Connect 2014
SHOW102 XPages: Still No Experience Necessary IBM Connect 2014
 
The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...
 
O365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - MaterialO365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - Material
 
Self Healing Capabilities of Domino 10
Self Healing Capabilities of Domino 10Self Healing Capabilities of Domino 10
Self Healing Capabilities of Domino 10
 
Soccnx10: Best and worst practices deploying IBM Connections
Soccnx10: Best and worst practices deploying IBM ConnectionsSoccnx10: Best and worst practices deploying IBM Connections
Soccnx10: Best and worst practices deploying IBM Connections
 
An introduction to configuring Domino for Docker
An introduction to configuring Domino for DockerAn introduction to configuring Domino for Docker
An introduction to configuring Domino for Docker
 
DEV-1430 IBM Connections Integration
DEV-1430 IBM Connections IntegrationDEV-1430 IBM Connections Integration
DEV-1430 IBM Connections Integration
 
MWLUG 2015 - An Introduction to MVC
MWLUG 2015 - An Introduction to MVCMWLUG 2015 - An Introduction to MVC
MWLUG 2015 - An Introduction to MVC
 
The future of web development write once, run everywhere with angular js an...
The future of web development   write once, run everywhere with angular js an...The future of web development   write once, run everywhere with angular js an...
The future of web development write once, run everywhere with angular js an...
 

Semelhante a The Autobahn Has No Speed Limit - Your XPages Shouldn't Either!

AOUG_11Nov2016_Challenges_with_EBS12_2
AOUG_11Nov2016_Challenges_with_EBS12_2AOUG_11Nov2016_Challenges_with_EBS12_2
AOUG_11Nov2016_Challenges_with_EBS12_2Sean Braymen
 
Life In The FastLane: Full Speed XPages
Life In The FastLane: Full Speed XPagesLife In The FastLane: Full Speed XPages
Life In The FastLane: Full Speed XPagesUlrich Krause
 
Mixing d ps building architecture on the cross cutting example
Mixing d ps building architecture on the cross cutting exampleMixing d ps building architecture on the cross cutting example
Mixing d ps building architecture on the cross cutting examplecorehard_by
 
Lessons learned from the worlds largest XPage project
Lessons learned from the worlds largest XPage projectLessons learned from the worlds largest XPage project
Lessons learned from the worlds largest XPage projectMark Roden
 
Architecture Patterns - Open Discussion
Architecture Patterns - Open DiscussionArchitecture Patterns - Open Discussion
Architecture Patterns - Open DiscussionNguyen Tung
 
Cloud Computing in Systems Programming Curriculum
Cloud Computing in Systems Programming CurriculumCloud Computing in Systems Programming Curriculum
Cloud Computing in Systems Programming CurriculumSteven Miller
 
Optimus XPages: An Explosion of Techniques and Best Practices
Optimus XPages: An Explosion of Techniques and Best PracticesOptimus XPages: An Explosion of Techniques and Best Practices
Optimus XPages: An Explosion of Techniques and Best PracticesTeamstudio
 
SharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi VončinaSharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi VončinaSPC Adriatics
 
XPages Application Layout Control - TLCC March, 2014 Webinar
XPages Application Layout Control - TLCC March, 2014 WebinarXPages Application Layout Control - TLCC March, 2014 Webinar
XPages Application Layout Control - TLCC March, 2014 WebinarHoward Greenberg
 
Application Layout Control
Application Layout ControlApplication Layout Control
Application Layout ControlTeamstudio
 
Cognos Performance Tuning Tips & Tricks
Cognos Performance Tuning Tips & TricksCognos Performance Tuning Tips & Tricks
Cognos Performance Tuning Tips & TricksSenturus
 
Agileand saas davepatterson_armandofox_050813webinar
Agileand saas davepatterson_armandofox_050813webinarAgileand saas davepatterson_armandofox_050813webinar
Agileand saas davepatterson_armandofox_050813webinarRoberto Jr. Figueroa
 
Application Virtualization, University of New Hampshire
Application Virtualization, University of New HampshireApplication Virtualization, University of New Hampshire
Application Virtualization, University of New HampshireTony Austwick
 
Hpc lunch and learn
Hpc lunch and learnHpc lunch and learn
Hpc lunch and learnJohn D Almon
 
Learn from my Mistakes - Building Better Solutions in SPFx
Learn from my  Mistakes - Building Better Solutions in SPFxLearn from my  Mistakes - Building Better Solutions in SPFx
Learn from my Mistakes - Building Better Solutions in SPFxThomas Daly
 

Semelhante a The Autobahn Has No Speed Limit - Your XPages Shouldn't Either! (20)

AOUG_11Nov2016_Challenges_with_EBS12_2
AOUG_11Nov2016_Challenges_with_EBS12_2AOUG_11Nov2016_Challenges_with_EBS12_2
AOUG_11Nov2016_Challenges_with_EBS12_2
 
Life In The FastLane: Full Speed XPages
Life In The FastLane: Full Speed XPagesLife In The FastLane: Full Speed XPages
Life In The FastLane: Full Speed XPages
 
Remix
RemixRemix
Remix
 
XPages Performance Master Class - Survive in the fast lane on the Autobahn (E...
XPages Performance Master Class - Survive in the fast lane on the Autobahn (E...XPages Performance Master Class - Survive in the fast lane on the Autobahn (E...
XPages Performance Master Class - Survive in the fast lane on the Autobahn (E...
 
Mixing d ps building architecture on the cross cutting example
Mixing d ps building architecture on the cross cutting exampleMixing d ps building architecture on the cross cutting example
Mixing d ps building architecture on the cross cutting example
 
Optimizing performance
Optimizing performanceOptimizing performance
Optimizing performance
 
Lessons learned from the worlds largest XPage project
Lessons learned from the worlds largest XPage projectLessons learned from the worlds largest XPage project
Lessons learned from the worlds largest XPage project
 
Architecture Patterns - Open Discussion
Architecture Patterns - Open DiscussionArchitecture Patterns - Open Discussion
Architecture Patterns - Open Discussion
 
Cloud Computing in Systems Programming Curriculum
Cloud Computing in Systems Programming CurriculumCloud Computing in Systems Programming Curriculum
Cloud Computing in Systems Programming Curriculum
 
Optimus XPages: An Explosion of Techniques and Best Practices
Optimus XPages: An Explosion of Techniques and Best PracticesOptimus XPages: An Explosion of Techniques and Best Practices
Optimus XPages: An Explosion of Techniques and Best Practices
 
SharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi VončinaSharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi Vončina
 
XPages Application Layout Control - TLCC March, 2014 Webinar
XPages Application Layout Control - TLCC March, 2014 WebinarXPages Application Layout Control - TLCC March, 2014 Webinar
XPages Application Layout Control - TLCC March, 2014 Webinar
 
Application Layout Control
Application Layout ControlApplication Layout Control
Application Layout Control
 
Cognos Performance Tuning Tips & Tricks
Cognos Performance Tuning Tips & TricksCognos Performance Tuning Tips & Tricks
Cognos Performance Tuning Tips & Tricks
 
Agileand saas davepatterson_armandofox_050813webinar
Agileand saas davepatterson_armandofox_050813webinarAgileand saas davepatterson_armandofox_050813webinar
Agileand saas davepatterson_armandofox_050813webinar
 
Application Virtualization, University of New Hampshire
Application Virtualization, University of New HampshireApplication Virtualization, University of New Hampshire
Application Virtualization, University of New Hampshire
 
Web Performance Optimization (WPO)
Web Performance Optimization (WPO)Web Performance Optimization (WPO)
Web Performance Optimization (WPO)
 
Hpc lunch and learn
Hpc lunch and learnHpc lunch and learn
Hpc lunch and learn
 
Learn from my Mistakes - Building Better Solutions in SPFx
Learn from my  Mistakes - Building Better Solutions in SPFxLearn from my  Mistakes - Building Better Solutions in SPFx
Learn from my Mistakes - Building Better Solutions in SPFx
 
Internals of Presto Service
Internals of Presto ServiceInternals of Presto Service
Internals of Presto Service
 

Mais de Teamstudio

Search Terms and Design Complexity: A Tutorial Before Modernizing or Migrating
Search Terms and Design Complexity: A Tutorial Before Modernizing or MigratingSearch Terms and Design Complexity: A Tutorial Before Modernizing or Migrating
Search Terms and Design Complexity: A Tutorial Before Modernizing or MigratingTeamstudio
 
Back from the Dead: When Bad Code Kills a Good Server
Back from the Dead: When Bad Code Kills a Good ServerBack from the Dead: When Bad Code Kills a Good Server
Back from the Dead: When Bad Code Kills a Good ServerTeamstudio
 
Understand Usage with Detailed Access Information
Understand Usage with Detailed Access InformationUnderstand Usage with Detailed Access Information
Understand Usage with Detailed Access InformationTeamstudio
 
IBM Presents the Notes Domino Roadmap and a Deep Dive into Feature Pack 8
IBM Presents the Notes Domino Roadmap and a Deep Dive into Feature Pack 8IBM Presents the Notes Domino Roadmap and a Deep Dive into Feature Pack 8
IBM Presents the Notes Domino Roadmap and a Deep Dive into Feature Pack 8Teamstudio
 
Marty, You're Just Not Thinking Fourth Dimensionally
Marty, You're Just Not Thinking Fourth DimensionallyMarty, You're Just Not Thinking Fourth Dimensionally
Marty, You're Just Not Thinking Fourth DimensionallyTeamstudio
 
IBM Presents the IBM Notes and Domino Roadmap
IBM Presents the IBM Notes and Domino RoadmapIBM Presents the IBM Notes and Domino Roadmap
IBM Presents the IBM Notes and Domino RoadmapTeamstudio
 
XPages and jQuery DataTables: Simplifying View Creation while Maximizing Func...
XPages and jQuery DataTables: Simplifying View Creation while Maximizing Func...XPages and jQuery DataTables: Simplifying View Creation while Maximizing Func...
XPages and jQuery DataTables: Simplifying View Creation while Maximizing Func...Teamstudio
 
Take a Trip Into the Forest: A Java Primer on Maps, Trees, and Collections
Take a Trip Into the Forest: A Java Primer on Maps, Trees, and Collections Take a Trip Into the Forest: A Java Primer on Maps, Trees, and Collections
Take a Trip Into the Forest: A Java Primer on Maps, Trees, and Collections Teamstudio
 
Expanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate UsabilityExpanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate UsabilityTeamstudio
 
Optimus XPages Part 2: The Deep Dive
Optimus XPages Part 2: The Deep DiveOptimus XPages Part 2: The Deep Dive
Optimus XPages Part 2: The Deep DiveTeamstudio
 
Understand the True Business Usage of Notes Applications with Usage Auditor
Understand the True Business Usage of Notes Applications with Usage AuditorUnderstand the True Business Usage of Notes Applications with Usage Auditor
Understand the True Business Usage of Notes Applications with Usage AuditorTeamstudio
 
Building Responsive Applications Using XPages
Building Responsive Applications Using XPagesBuilding Responsive Applications Using XPages
Building Responsive Applications Using XPagesTeamstudio
 
Using Cool New Frameworks in (Mobile) Domino Apps
Using Cool New Frameworks in (Mobile) Domino AppsUsing Cool New Frameworks in (Mobile) Domino Apps
Using Cool New Frameworks in (Mobile) Domino AppsTeamstudio
 
Ask the XPages Experts
Ask the XPages ExpertsAsk the XPages Experts
Ask the XPages ExpertsTeamstudio
 
Everything XControls
Everything XControlsEverything XControls
Everything XControlsTeamstudio
 
Mobilisez vos Applications IBM Notes avec Teamstudio Unplugged ! (French Lang...
Mobilisez vos Applications IBM Notes avec Teamstudio Unplugged ! (French Lang...Mobilisez vos Applications IBM Notes avec Teamstudio Unplugged ! (French Lang...
Mobilisez vos Applications IBM Notes avec Teamstudio Unplugged ! (French Lang...Teamstudio
 
Domino, Notes, and Verse - Where are We and Whats the Future?
Domino, Notes, and Verse - Where are We and Whats the Future?Domino, Notes, and Verse - Where are We and Whats the Future?
Domino, Notes, and Verse - Where are We and Whats the Future?Teamstudio
 
App.Next - The Future of Domino Application Development
App.Next - The Future of Domino Application DevelopmentApp.Next - The Future of Domino Application Development
App.Next - The Future of Domino Application DevelopmentTeamstudio
 
Presenting Data – An Alternative to the View Control
Presenting Data – An Alternative to the View ControlPresenting Data – An Alternative to the View Control
Presenting Data – An Alternative to the View ControlTeamstudio
 
A Notes Developer's Journey into Java
A Notes Developer's Journey into JavaA Notes Developer's Journey into Java
A Notes Developer's Journey into JavaTeamstudio
 

Mais de Teamstudio (20)

Search Terms and Design Complexity: A Tutorial Before Modernizing or Migrating
Search Terms and Design Complexity: A Tutorial Before Modernizing or MigratingSearch Terms and Design Complexity: A Tutorial Before Modernizing or Migrating
Search Terms and Design Complexity: A Tutorial Before Modernizing or Migrating
 
Back from the Dead: When Bad Code Kills a Good Server
Back from the Dead: When Bad Code Kills a Good ServerBack from the Dead: When Bad Code Kills a Good Server
Back from the Dead: When Bad Code Kills a Good Server
 
Understand Usage with Detailed Access Information
Understand Usage with Detailed Access InformationUnderstand Usage with Detailed Access Information
Understand Usage with Detailed Access Information
 
IBM Presents the Notes Domino Roadmap and a Deep Dive into Feature Pack 8
IBM Presents the Notes Domino Roadmap and a Deep Dive into Feature Pack 8IBM Presents the Notes Domino Roadmap and a Deep Dive into Feature Pack 8
IBM Presents the Notes Domino Roadmap and a Deep Dive into Feature Pack 8
 
Marty, You're Just Not Thinking Fourth Dimensionally
Marty, You're Just Not Thinking Fourth DimensionallyMarty, You're Just Not Thinking Fourth Dimensionally
Marty, You're Just Not Thinking Fourth Dimensionally
 
IBM Presents the IBM Notes and Domino Roadmap
IBM Presents the IBM Notes and Domino RoadmapIBM Presents the IBM Notes and Domino Roadmap
IBM Presents the IBM Notes and Domino Roadmap
 
XPages and jQuery DataTables: Simplifying View Creation while Maximizing Func...
XPages and jQuery DataTables: Simplifying View Creation while Maximizing Func...XPages and jQuery DataTables: Simplifying View Creation while Maximizing Func...
XPages and jQuery DataTables: Simplifying View Creation while Maximizing Func...
 
Take a Trip Into the Forest: A Java Primer on Maps, Trees, and Collections
Take a Trip Into the Forest: A Java Primer on Maps, Trees, and Collections Take a Trip Into the Forest: A Java Primer on Maps, Trees, and Collections
Take a Trip Into the Forest: A Java Primer on Maps, Trees, and Collections
 
Expanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate UsabilityExpanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate Usability
 
Optimus XPages Part 2: The Deep Dive
Optimus XPages Part 2: The Deep DiveOptimus XPages Part 2: The Deep Dive
Optimus XPages Part 2: The Deep Dive
 
Understand the True Business Usage of Notes Applications with Usage Auditor
Understand the True Business Usage of Notes Applications with Usage AuditorUnderstand the True Business Usage of Notes Applications with Usage Auditor
Understand the True Business Usage of Notes Applications with Usage Auditor
 
Building Responsive Applications Using XPages
Building Responsive Applications Using XPagesBuilding Responsive Applications Using XPages
Building Responsive Applications Using XPages
 
Using Cool New Frameworks in (Mobile) Domino Apps
Using Cool New Frameworks in (Mobile) Domino AppsUsing Cool New Frameworks in (Mobile) Domino Apps
Using Cool New Frameworks in (Mobile) Domino Apps
 
Ask the XPages Experts
Ask the XPages ExpertsAsk the XPages Experts
Ask the XPages Experts
 
Everything XControls
Everything XControlsEverything XControls
Everything XControls
 
Mobilisez vos Applications IBM Notes avec Teamstudio Unplugged ! (French Lang...
Mobilisez vos Applications IBM Notes avec Teamstudio Unplugged ! (French Lang...Mobilisez vos Applications IBM Notes avec Teamstudio Unplugged ! (French Lang...
Mobilisez vos Applications IBM Notes avec Teamstudio Unplugged ! (French Lang...
 
Domino, Notes, and Verse - Where are We and Whats the Future?
Domino, Notes, and Verse - Where are We and Whats the Future?Domino, Notes, and Verse - Where are We and Whats the Future?
Domino, Notes, and Verse - Where are We and Whats the Future?
 
App.Next - The Future of Domino Application Development
App.Next - The Future of Domino Application DevelopmentApp.Next - The Future of Domino Application Development
App.Next - The Future of Domino Application Development
 
Presenting Data – An Alternative to the View Control
Presenting Data – An Alternative to the View ControlPresenting Data – An Alternative to the View Control
Presenting Data – An Alternative to the View Control
 
A Notes Developer's Journey into Java
A Notes Developer's Journey into JavaA Notes Developer's Journey into Java
A Notes Developer's Journey into Java
 

Último

Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 

Último (20)

Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 

The Autobahn Has No Speed Limit - Your XPages Shouldn't Either!

  • 1. The Autobahn Has no Speed Limit – Your XPages Shouldn’t Either Tweet about this event: #xpages and mention us: @teamstudio @TLCCLTD @eknori October 17, 2013
  • 3. Who we are • Our background is in creating tools for collaborative computing in mid-size and large enterprises, primarily for Lotus Notes • Easy-to-use tools for developers and administrators • 2300+ active customers, 47 countries • Offices in US, UK and Japan • Entered mobile space in 2010 with Unplugged – easy mobilization of Notes apps to Blackberry, Android and iOS
  • 4. Teamstudio Unplugged • Your Mobile Domino Server – take your Notes apps with you! • End users access Notes applications from mobile devices whether online or offline • Leverages existing skills and technology – XPages – Replication model you already know • IBM Collaboration Solutions Award Winner 2013
  • 5. Teamstudio Continuity • Mobile BCM application for smartphones and tablets – iOS, Android and BB • • • Offline access to all your BCM and Disaster Recovery data Store plans, contacts, call trees, and more Client available for download from app stores
  • 6. Teamstudio • Next webinar November 19th • DCLUG – October 24th • BLUG All Things Mobile – October 29th • Promotions: – Chance to win an iPad mini when you get a demo of Teamstudio Continuity
  • 7. The Autobahn has no speed limit - Your XPages shouldn't either! Your Host Today: Paul Della-Nebbia TLCC @PaulDN #XPages 1
  • 8. Upcoming and Recorded Webinars Next Webinar on November 19th www.tlcc.com/xpages-webinar View Previous Webinars (use url above) 2
  • 9. TLCC Courses and Services • The Leader in Notes and Domino Training since 1997 • Self Paced Distance Learning Courses for Notes/Domino – XPages, Development, and Administration (user too!) – Learn anywhere using your Notes client – Many demos and activities – An Instructor is a click away • OnSite Private Classes • TLCC Mentoring Services 3
  • 10. What’s New at TLCC  Free course – Introduction to XPages Development (both 8.5 and 9.0)  New Courses! • Notes Domino 9 Application Development 1 • Notes Domino 9 Application Development Update • Java 1 for XPages Development (9.0) • Notes Domino 9 System Administration Update • Notes Domino 9 System Administration 1  New Packages! • XPages and JavaScript for Domino 9 Package • XPages and Rapid Development for Domino 9 Package • XPages, JavaScript and Rapid Development for Domino 9 Package  TLCC’s Fall Sale – Extended to Oct. 31st 4
  • 11. XPages Skills Path Suggested TLCC Skills Path at TLCC.com Core Notes/Domino Skills Domino Object Model skills LotusScript or Java Rapid XPages Development (user interface controls) XPages Development 2 JavaScript for XPages Developers XPages Development 1 Mobile XPages Development Java for XPages TLCC Can Help: • • • • • Self Paced Courses Instructor Led Online OnSite Private Instructor Led Blended Learning Custom courses 5
  • 12. Asking Questions Q & A at the end! Type in your questions as they come up 6
  • 13. Your Presenters Today: Howard Greenberg IBM Champion Founding Partner TLCC @TLCCLtd Ulrich Krause IBM Champion Senior Software Architect BCC @Eknori, @bccffm #XPages 7
  • 14. About: Ulrich Krause • Administrator /Developer since 1993 • Senior Software Architect at BCC, Germany • OpenNTF Contributor • IBM Champion 2011/2012/2013 • • • • • Blog http://www.eknori.de Web http://www.bcc.biz Forum (de) (http://www.atnotes.de) Twitter @eknori Mail ulrich.krause@eknori.de 8
  • 15. Agenda • What factors affect Performance? • JSF Lifecycle Listener • Partial Update / Partial Execute • Tools • Coding Factors – ViewNavigator vs. GetItemValue – SSJS vs. Java – Stringbuilder • Questions??? 9
  • 17. Hardware • The hardware used has a significant influence on performance. There are 3 key elements: – CPU – Main Memory – Hard Disk 11
  • 18. Hardware • Main Memory – Limit defined by the operating system  Scalability • CPU – Cores / Clock / Cache  Poor response time • Weak CPU AND Low Memory – Poor overall performance – Poor response times – Server "hangs" 12
  • 19. Network • Latency – Time taken for data transmission between multiple computers on a network • Bandwidth – Rate of transmission of data • Greater Bandwidth + Lower Latency -------------------------------= Better Connection 13
  • 20. Client & Browser • Hardware • How many data requests / responses are transmitted • How much data is transferred (size) • Caching of resources • How much CSJS runs • Size / complexity of the CSS • Complexity of the site structure 14
  • 21. Limiting factors on performance • Browser / HTTP server – Network latency – distance/time to server. – Bandwidth – size of files. – Browser limits on concurrent downloads • IE7 allows 2 downloads, IE8 allows 6 • HTTP Server / App Server – HTTP Server JVM heap size & garbage collector – CPU time, competition between threads, gives slower response times – Threads, limited to 40 by default 15
  • 22. Limiting factors on performance • App Server / Domino context – Read design elements from the NSF (XPage .class files, form structure, etc) – Backend API calls may be expensive, especially for large data sets – Design elements may be network requests 16
  • 23. Limiting factors on performance • Servlet / Lifecycle – Restore control tree – file system read. Control tree locking – no concurrent access – Rendered re-evaluated for every control for most phases • Browser/Client JavaScript/Dojo – Inline JavaScript blocks insertion of later HTML elements into the DOM tree – Dojo does AJAX requests for .js files for dojo modules that are not loaded 17
  • 24. General Performance Options • notes.ini – HTTPJVMMaxHeapSizeSet=1 – HTTPJVMMaxHeapSize=256M • Should be set to ¼ of the available RAM • Domino Administrator – HTTP server Disable Logging – HTTP server thread count defaults to 40 • link to IBM article • Debugging enabled in notes.ini ? – JavaEnableDebug=1 – JavaDebugOptions=transport=dt_socket,server=y,suspen d=n,address=8000 – JavascriptEnableDebug=1 18
  • 25. Reducing Memory Utilization • xsp.persistence.mode= – Defines the persistence mode for the JSF pages • file: All the pages are persisted on disk • fileex: All the pages are persisted on disk except the current one, which stays in memory • <else>: All the pages stay in memory (tree mode) 19
  • 26. JavaScript/CSS Aggregation • Groups many DOJO, CSS / JS files into a single file – Less requests from the browser to the server – Performance improvements on networks with high latency – Enhanced performance parsing CSS / JS – Fewer connections to the server On the Server: xsp.properties: xsp.resources.aggregate=true 20
  • 28. XPages PreLoad • XPagesPreload=1 • New Feature in Notes / Domino 8.5.3 • Works on Server and Client • Java classes from the XPages runtime plug-ins loaded from a fixed list of runtime classes ( 435 in ND 8.5.3 ) – com.ibm.xsp.core, common utility, JS wrapper, FSF runtime classes • Java classes referenced in *-faces.config.xml – XPages control renderer, data sources, complex types 22
  • 29. XPages PreLoad • XPagesPreloadDB = Server!!Db.nsf/XPage.xsp, myLocalDb.nsf • Works at the application level • The application is loaded on the client / server startup into memory – This happens even when the application is first opened in the browser 23
  • 30. XPages PreLoad (cont.) • For each entry in the notes.ini variable, an XPage URL is generated and sent to the server • The application is loaded, and the HTML generated • The XPages runtime discards the HTML, but retains the application in memory 24
  • 31. Scoped Variables • applicationScope – Are visible for all users of one application – Expires some time after the last user used an applicationScope variable – applicationScope variables are NOT persistent forever • sessionScope – Is valid through the session of the current user – A user session expires after some time of inactivity – Uses don't have access to the sessionScope variables of other users 25
  • 32. Scoped Variables (cont.) • viewScope – Is visible for views on the current page only. – Useful for transporting a search query to a view. • requestScope – Is valid through one request of the current user. – That includes refreshing of a page. 26
  • 34. Next Up: Howard Greenberg IBM Champion Founding Partner TLCC @TLCCLtd #XPages 28
  • 35. JSF Life Cycle - Post Request Restore View •Restore component tree •Events: •afterRestoreView Apply Request Values •Copy data to Editable controls Process Validations •Validations •Converters Update Model Values •Move values to data source Invoke Application •Application logic •Events: •onClientLoad (XPage, etc) •on… events of button, etc. Render Response •Convert to HTML, etc. •Events: •beforeRenderReponse •afterRenderResponse Response 29
  • 36. Lifecycle1 XPage – Initial Page Load Render Response • Rendered property for id: label1 • Label property for id: label1 • Rendered property for id: inputText1 • Default value property for id: inputText1 • Rendered property for id: label2 • Rendered property for id: comboBox1 • values property for id: comboBox1 • values property for id: comboBox1 • Rendered property for id: computedField1 • Value property for id: computedField1 • Rendered property for id: computedField2 • Value property for id: computedField2 30
  • 37. Lifecyle1 – Submit (Full Update) Restore View Apply Request Values (8) •Rendered property for id: label1 •Rendered property for id: inputText1 •Rendered property for id: inputText1 •Rendered property for id: label2 •Rendered property for id: comboBox1 •Rendered property for id: comboBox1 •Rendered property for id: computedField1 •Rendered property for id: computedField2 Update Model Values (8) •Rendered property for id: label1 •Rendered property for id: inputText1 •Rendered property for id: inputText1 •Rendered property for id: label2 •Rendered property for id: comboBox1 •Rendered property for id: comboBox1 •Rendered property for id: computedField1 •Rendered property for id: computedField2 Invoke Application (1) •OnClick event for id: button1 39 SSJS Calls Process Validations (11) •Rendered property for id: label1 •Rendered property for id: inputText1 •Rendered property for id: inputText1 •Validation for inputText1 •Default value property for id: inputText1 •Rendered property for id: label2 •Rendered property for id: comboBox1 •Rendered property for id: comboBox1 •values property for id: comboBox1 •Rendered property for id: computedField1 •Rendered property for id: computedField2 Render Response (11) •Rendered property for id: label1 •Label property for id: label1 •Rendered property for id: inputText1 •Rendered property for id: label2 •Rendered property for id: comboBox1 •values property for id: comboBox1 •values property for id: comboBox1 •Rendered property for id: computedField1 •Value property for id: computedField1 •Rendered property for id: computedField2 •Value property for id: computedField2 31
  • 38. When to Execute - # vs $ <xp:label id="label1"> <xp:this.value> <![CDATA[#{javascript:return “My Label”;}]]> </xp:this.value> </xp:label> • # is Compute dynamically – Executed every time the page is rendered – Use for values that are likely to change • $ is Compute on Page Load – Executed when the page is first loaded – Use for values that don't change 32
  • 39. Lifecyle2 – Submit (Full Update) - On Page Load Restore View Changed all Rendered and Values (comboBox) to only compute on Page Load Update Model Values •Rendered property for id: label1 •Rendered property for id: inputText1 •Rendered property for id: inputText1 •Rendered property for id: label2 •Rendered property for id: comboBox1 •Rendered property for id: comboBox1 •Rendered property for id: computedField1 •Rendered property for id: computedField2 Apply Request Values •Rendered property for id: label1 •Rendered property for id: inputText1 •Rendered property for id: inputText1 •Rendered property for id: label2 •Rendered property for id: comboBox1 •Rendered property for id: comboBox1 •Rendered property for id: computedField1 •Rendered property for id: computedField2 Invoke Application (1) •OnClick event for id: button1 6 SSJS Calls, saved 33 Process Validations (2) •Rendered property for id: label1 •Rendered property for id: inputText1 •Rendered property for id: inputText1 •Validation for inputText1 •Default value property for id: inputText1 •Rendered property for id: label2 •Rendered property for id: comboBox1 •Rendered property for id: comboBox1 •values property for id: comboBox1 •Rendered property for id: computedField1 •Rendered property for id: computedField2 Render Response (3) •Rendered property for id: label1 •Label property for id: label1 •Rendered property for id: inputText1 •Rendered property for id: label2 •Rendered property for id: comboBox1 •values property for id: comboBox1 •values property for id: comboBox1 •Rendered property for id: computedField1 •Value property for id: computedField1 •Rendered property for id: computedField2 •Value property for id: computedField2 33
  • 40. But I need dynamic Rendering! Options for dynamically computing the Rendered: • Scoped variables – Still get calculated but do the heavy lifting once and then read the scoped variable in the Rendered property • DataContexts – Compute a value at the Xpage or Panel level once – Refer to the value using EL (much faster than SSJS) 34
  • 41. DataContext • Can be thought of as global variables • Value can be computed dynamically or on page load – Warning: Computing dynamically has performance impact • Can be scoped to any level that a data source can – XPage, Custom Control or Panel – Set a dataContext in a panel in a repeat control to avoid multiple references to a NotesDocument's item • Can be referenced using EL – Benefit: Not having to go through the SSJS parser 35
  • 42. DataContext - Pitfall • Be careful binding data context variables dynamically – They will be recomputed multiple times, even when in partial execution mode and if they are not in use (six times!) • Apply Request Values • Process Validations • Update Model Values • Invoke Application • Twice in Render Response! • If computed on page load then only computed once on page load • See Paul Withers blog entry to learn how to set a data context value via code 36
  • 43. Partial Refresh vs. Partial Execution? • Partial Refresh (Update) – Computes entire XPage, only sends back what is in the partial refresh id (refreshId) • Partial Execution – Only calculates what is in the area specified (execId) 37
  • 44. Partial Refresh Demo - Results Restore View Apply Request Values (8) •Rendered property for id: label1 •Rendered property for id: inputText1 •Rendered property for id: inputText1 •Rendered property for id: label2 •Rendered property for id: comboBox1 •Rendered property for id: comboBox1 •Rendered property for id: computedField1 •Rendered property for id: computedField2 Update Model Values (8) •Rendered property for id: label1 •Rendered property for id: inputText1 •Rendered property for id: inputText1 •Rendered property for id: label2 •Rendered property for id: comboBox1 •Rendered property for id: comboBox1 •Rendered property for id: computedField1 •Rendered property for id: computedField2 Invoke Application (1) •OnClick event for id: button1 Only Savings were here! 30 SSJS Calls, saved 9 Process Validations (11) •Rendered property for id: label1 •Rendered property for id: inputText1 •Rendered property for id: inputText1 •Validation for inputText1 •Default value property for id: inputText1 •Rendered property for id: label2 •Rendered property for id: comboBox1 •Rendered property for id: comboBox1 •values property for id: comboBox1 •Rendered property for id: computedField1 •Rendered property for id: computedField2 Render Response (2) •Rendered property for id: label1 •Label property for id: label1 •Rendered property for id: inputText1 •Rendered property for id: label2 •Rendered property for id: comboBox1 •values property for id: comboBox1 •values property for id: comboBox1 •Rendered property for id: computedField1 •Value property for id: computedField1 •Rendered property for id: computedField2 •Value property for id: computedField2 38
  • 45. Partial Refresh Pros and Cons • Pros – Reduced control processing in the render response phase – Smaller response from server • Means reduced network usage – Better UI experience • Rest of the page is still visible while waiting for a response • Cons – Controls like computed fields outside refresh area don’t refresh – Be careful turning this on for a completed XPage (TEST!) – Can only update one area (one id) • Workaround on Tim Tripcony blog here 39
  • 46. Partial Execution Demo - Results Restore View 16 SSJS Calls Saved 13 Update Model Values (1) •Rendered property for id: label1 •Rendered property for id: inputText1 •Rendered property for id: inputText1 •Rendered property for id: label2 •Rendered property for id: comboBox1 •Rendered property for id: comboBox1 •Rendered property for id: computedField1 •Rendered property for id: computedField2 Apply Request Values (1) •Rendered property for id: label1 •Rendered property for id: inputText1 •Rendered property for id: inputText1 •Rendered property for id: label2 •Rendered property for id: comboBox1 •Rendered property for id: comboBox1 •Rendered property for id: computedField1 •Rendered property for id: computedField2 Invoke Application (1) •OnClick event for id: button1 Process Validations (1) •Rendered property for id: label1 •Rendered property for id: inputText1 •Rendered property for id: inputText1 •Validation for inputText1 •Default value property for id: inputText1 •Rendered property for id: label2 •Rendered property for id: comboBox1 •Rendered property for id: comboBox1 •values property for id: comboBox1 •Rendered property for id: computedField1 •Rendered property for id: computedField2 Render Response (12) •Rendered property for id: label1 •Label property for id: label1 •Rendered property for id: inputText1 •Default value property for id: inputText1 •Rendered property for id: label2 •Rendered property for id: comboBox1 •values property for id: comboBox1 •values property for id: comboBox1 •Rendered property for id: computedField1 •Value property for id: computedField1 •Rendered property for id: computedField2 •Value property for id: computedField2 40
  • 47. Partial Execution Pros and Cons • Pros – Reduced processing in the 3 data-processing phases • Cons – Control with onClick event has to be inside the execId area – Editable values outside of the executed area do not get submitted/updated (reset to default values) – Existing XPages need analysis/testing before using this • Current onclick events might refer to controls where the data is not submitted – ExecMode available in 8.5.1 – Have to use source to enter ExecId (in 8.5, 9.0 has Designer UI) 41
  • 48. Partial Refresh AND Execution Demo - Results Restore View Apply Request Values (1) •Rendered property for id: label1 •Rendered property for id: inputText1 •Rendered property for id: inputText1 •Rendered property for id: label2 •Rendered property for id: comboBox1 •Rendered property for id: comboBox1 •Rendered property for id: computedField1 •Rendered property for id: computedField2 •Rendered property for id: computedField2 Update Model Values (1) •Rendered property for id: label1 •Rendered property for id: inputText1 •Rendered property for id: inputText1 •Rendered property for id: label2 •Rendered property for id: comboBox1 •Rendered property for id: comboBox1 •Rendered property for id: computedField1 •Rendered property for id: computedField2 Invoke Application (1) •OnClick event for id: button1 6 SSJS Calls, saved 33 Process Validations (1) •Rendered property for id: label1 •Rendered property for id: inputText1 •Rendered property for id: inputText1 •Validation for inputText1 •Default value property for id: inputText1 •Rendered property for id: label2 •Rendered property for id: comboBox1 •Rendered property for id: comboBox1 •values property for id: comboBox1 •Rendered property for id: computedField1 •Rendered property for id: computedField2 Render Response (2) •Rendered property for id: label1 •Label property for id: label1 •Rendered property for id: inputText1 •Rendered property for id: label2 •Rendered property for id: comboBox1 •values property for id: comboBox1 •values property for id: comboBox1 •Rendered property for id: computedField1 •Value property for id: computedField1 •Rendered property for id: computedField2 •Value property for id: computedField2 42
  • 49. disableValidators= true • • • • All phases (1-6) occur Turns off all validators Converters continue to work Items in documents will be updated Restore View Apply Request Values Process Validations Update Model Values Invoke Application Render Response •No Validators get executed here! 43
  • 50. Immediate = true • JSF Lifecycle processes only phases (1, 2, 6) • No data processing • Items in documents are not updated • Onclick event handler scripts and render response calculations are performed Restore View Apply Request Values Process Validations Update Model Values Invoke Application Render Response 44
  • 51. Using the loaded Property Loaded only computed once in the createView phase • Loaded = true – Not in component tree or memory • Loaded = false – Control is not created – Can never be rendered or accessed – Saves memory too 45
  • 52. Life Cycle Performance Suggestions • Most properties, like CSS “style” are only computed in the RenderResponse phase • Watch and minimize: – Rendered property (when dynamic) • Computed multiple times! • Use dataContexts or scoped variables when able • Use both Partial Refresh (Update) and Partial Execute when able 46
  • 53. Watch Out for @DbLookup • @DbLookup about 3-4 times slower than SSJS – res = @DbLookup(db,"CustomersByNameView",names[i], "phone"); vs. – doc = vw.getDocumentByKey(names[i], true); res = doc.getItemValueString("phone"); • Five lookups repeated 100 times – @DbLookup averaged about 1728ms – getDocumentByKey averaged 510ms • Other @Functions not tested 47
  • 54. Next Up: Ulrich Krause IBM Champion Senior Software Architect BCC @Eknori, @BCCFFM #XPages 48
  • 55. Images • Use correct file type depending on content – JPEG for complex and detailed images – PNG/GIF for simple images, fonts, transparencies • Use the HTML <img> tag “width” and “height” attributes • For faster HTML layout in the browser – Size the image to size you intend to use • Resizing using html attributes height and width will delay the rendering of your page • Images larger than necessary will waste bandwidth 49
  • 56. Image Sprites • Use CSS Image Sprites – If you have multiple small images, make a single larger image containing the smaller images – Use CSS to display only the relevant subset image at a location in the page – For semantically significant sprites, provide an accessibility “title” attribute (as sprites don't use the IMG “alt” attribute, but you still want to assist blind users) – There's no specific XPages support for sprites, but they're used in the XPages OneIU themes 50
  • 57. CSS Image Sprite Sample http://www.w3schools.com/css/tryit.asp?filename=trycss_sprites_img 51
  • 58. XPages Toolbox • XPages based Application – Runs on the Domino server or the Notes client – An NSF needs to be installed on the server/Notes client – A profiler jar file should be added to the JVM launch options • Measures CPU performance and memory allocation • Available from OpenNTF.org – Free open source project • http://www.openntf.org/internal/home.nsf/project.xsp?action=open Document&name=XPages%20Toolbox • Extended in 8.5.2 to support backend classes profiling 52
  • 60. XPages Toolbox • Generate a heap dump of the JVM running in the HTTP task – A button in the XPages profiler generates the heap dump – From the Domino console • tell http xsp heapdump (triggers com.ibm.jvm.Dump.HeapDump()) • tell http xsp javadump (triggers com.ibm.jvm.Dump.JavaDump()) • Analyze the heap dump using the Eclipse memory analyzer – http://www.eclipse.org/mat/ – http://www.ibm.com/developerworks/java/jdk/tools/dtfj.html 54
  • 61. Heapdump / Javadump Analyzer 55
  • 62. More Tools • Print statements – In rendered/visible computations to see how often executed • print("panel2 evaluating rendered property"); – In the XPages root control events: • before/afterPageLoad, afterRestoreView, before/afterRenderResponse – Custom control root events: • before/afterPageLoad – In the document data source events: • queryNewDocument, postSaveDocument, etc. • Task Manager and/or Process Explorer – Shows CPU usage & process memory usage as it happens 56
  • 63. More Tools • Browser developer tools – for watching network transactions, partial updates, response times – BROWSER: Firebug, Developer Tools – XPiNC: FirebugLite from ExtLib • Java / Javascript Debugging – Degrades performance but can inspect objects • Use the Eclipse Java debugger – In Dominonotes.ini add these 2 options: • JavaEnableDebug=1 • JavaDebugOptions=transport=dt_socket,server=y,suspend=n,add ress=8000 57
  • 64. Optimization – Step By Step 58
  • 65. Step 1: Original Code From Sample • Read all Contacts into a NotesDocumentCollection, loop the collection and build the JSON by reading the values from items in the document 59
  • 67. Step 2: Store UNID in an item • Get all Contacts into a NotesDocumentCollection, loop the collection and build the JSON by reading the values from items in the document. Also UNID is stored in document 61
  • 69. Step 3: Build JSON on document save • Get all Contacts into a NotesDocumentCollection, loop the collection and get the JSON from an item on the document. JSON is calculated on document save 63
  • 71. Step 4: Read JSON from view with ViewNavigator 65
  • 73. StringBuilder vs String.concat • Concatenation of Strings is very easy in Java - all you need is a + • Each time you append something via + (String.concat()) a new String is created, the old stuff is copied, the new stuff is appended, and the old String is thrown away. The bigger the String gets the longer it takes - there is more to copy and more garbage is produced. • Accordingly to Arno Unkrig the optimal strategy is to use String.concat() for 2 or 3 operands, and StringBuilder for 4 or more operands 67
  • 74. StringBuilder vs String.concat • Use StringBuilder whenever you assemble a String in a loop – Keep in mind that + isn't always a good idea 68
  • 75. Step 5: Use a StringBuilder to concat the JSON 69
  • 77. Step 6: Use Java instead of SSJS Xpage SSJS Code Java Code 71
  • 79. Homework Time – Further References • IBM article on JSF (non XPages) • Paul Withers blog (each link below is different) – Part 1, Part 2, Part 3 • Tony McGuckin’s Video - XPages Master class – 4 videos plus sample applications 73
  • 80. Questions???? Use the Q&A pane in WebEx to ask questions We will answer your questions verbally 74
  • 81. Question and Answer Time! Howard Greenberg Ulrich Krause Upcoming Events: TLCC Fall Sale – ends 10/31 IBM Connect 2014 Registration is now open Paul Della-Nebbia Taline Badrikian #XPages @Eknori @TLCCLtd @Teamstudio @PaulDN @BCCFFM TLCC Questions? howardg@tlcc.com paul@tlcc.com 888-241-8522 or 561-953-0095 Teamstudio Questions? contactus@teamstudio.com 877-228-6178 75