2. Paul Withers
ICS Consultant at Intec Systems Ltd
IBM Champion 2011-2014
Co-Author XPages Extension Library
OpenNTF Director
Contributor to OpenNTF
Blogger on XPages, IBM Domino®
Designer and beyond
– http://www.intec.co.uk/blog
3. Mike McGarel
Working with Web technologies for over 14 years
Working with IBM Notes® & IBM Domino® since version 4.6
Corporate developer
Site developer for MWLUG
3
4. Dante’s Inferno
Author: Dante Alighieri, 14th Century
Part of Divine Comedy with Purgatorio and Paradiso
Journey by Dante over Easter Weekend 1300
Dante rescued and guided by the Roman poet Virgil
“Lasciate ogne speranza, voi ch’intrate”
(“Abandon all hope, ye who enter here”)
4
5. The Circles
First Circle: Limbo
Second Circle: Lust
Third Circle: Gluttony
Fourth Circle: Greed
Fifth Circle: Wrath
Sixth Circle: Heresy
Seventh Circle: Violence
Eighth Circle: Fraud
Ninth Circle: Treachery
5
7. Hybrid “Limbo” Applications
Add XPages into traditional Domino web applications
Use existing Domino databases as data source and new
XPages database for user interface
Add mobile interface
Add XPages for sidebar
7
8. SSJS – The “Limbo” Language
Server-side JavaScript leverages pre-existing knowledge
– JavaScript syntax
• NotesDocument.getUniversalID()
• @DbLookup(@DbName(),“myViewName”,2,
“[FAILSILENT]”)
– Domino objects use LotusScript names
– Many Formula Language @Functions supported
• Kathy Brown has blogged which ones are not
• http://www.runningnotes.net/index.php/2010/03/25/list-
of-formula-not-supported-in-xpages/
8
9. “Limbo” Property Values
Custom Language
<xp:text
value= “Database title is #{database.title}, database path
is #{javascript: @Subset(@DbName(), -1);}”>
</xp:text>
9
11. Converting LS to SSJS
Replace “Dim” with “var”
Replace “ As ” with “:”
Add “;”
Remember methods etc are case sensitive and need ()
GetAllDocumentsByKey – need to pass key as Vector
Full syntax required for interacting with Notes Items
RECYCLE!
11
13. It’s All About Wants
Users want:
– a familiar “look and feel”
– something easy to use
– to get in and out
You want them to want your app
13
14. Looks Matter
First impressions are key
Better looking “equals” works better
Steve McDonagh’s great series on design principles:
http://dominoyesmaybe.blogspot.com/2012/09/principals-of-
design-1-balance.html
14
24. Persistence Options
Keep Pages in Memory
– Remembering, remembering, remembering…
– xsp.persistence.mode=basic
– Best for…quick retrieval, few users
Keep Pages on Disk
– Writing…next? You want it again? Reading…
– xsp.persistence.mode=file
– Best for…lots of users, but slower retrieval
24
25. Persistence Options
Keep Only The Current Page in Memory
– Remembering, remembering, remembering…
– Oh, new page? Writing….and now…
– Remembering, remembering, remembering…
– xsp.persistence.mode=fileex
– Best for…lots of users, quick retrieval of current page
25
27. Persistence Options
Maximum Pages
– xsp.persistence.tree.maxviews
• Default=4
• Remembering, remembering, remembering
• Only applies when xsp.persistence.mode=basic
– xsp.persistence.file.maxviews
• Default=10
• Writing, retrieving, writing, writing, discarding…
• Default folder defined by xsp.persistence.dir.xspstate
27
28. Page Persistence Mode
xsp.persistence.viewstate=fulltree
– Default option, whole component tree persisted
xsp.persistence.viewstate=nostate
–No component tree stored, similar to
xsp.session.transient=true
xsp.persistence.viewstate=delta
– Valid if pages stored in memory
– Only stores changes since page loaded
28
29. Page Persistence Mode
xsp.persistence.viewstate=deltaex
– Valid if multiple pages stored in memory
– Stores full component tree for current page, deltas for
others
Viewstate property on XPage allows developer to define at
page level
29
30. xsp.session.transient
xsp.session.transient=“false” sets XPage stateless
– Default VALUES overridden between requests
– Default STATES not overridden
NOT “Go to next page from current”
– INSTEAD “Go to next page from default”
NOT “Toggle show detail from previous state”
– INSTEAD “Toggle show detail from default”
Great for large, read only pages, Websites – no storage
30
32. More Responsiveness = Less Anger
Partial page refreshes
Client-side processing
– Dojo JavaScript framework (included with XPages)
– jQuery JavaScript framework (easily added)
– Other JavaScript frameworks or custom scripts
Server-side processing
– XAgent (XPage of just code with UI redirect)
– Java (design element or WebContentWEB-INFsrc)
32
37. Why?
#{javascript:…} means parse this string using SSJS rules
Pass commands to VariableResolver
Look for corresponding variable name
Map to a Java object/method
So why not go straight to the source?
37
42. Themes
Themes can force controls to behave consistently
But some elements cannot be manipulated easily
–EventHandlers don’t have a default stylekit
–They can have a themeId applied though
Themes loaded at end of page rendering
–getStyleKitFamily() to find default theme id
–Or use Mark Leusink’s debug toolbar
42
43. “Strong-Arming” All Events
Dojo Standby Control on OpenNTF
– Hijacks partial refreshes
– Adds standby message during long-running partial
refreshes
– http://openntf.org/XSnippets.nsf/snippet.xsp?id=standby-
dialog-custom-control
43
46. HTTPOnly Cookies
Since Domino 9.0 SessionID and DomAuthSessId are now
HTTPOnly
Cannot be modified or removed via JavaScript
–http://openntf.org/XSnippets.nsf/snippet.xsp?id=clear-
session-whole-server does not work
Cannot be intercepted
46
47. How To Add Your Own HTTPOnly Cookie
Serdar Basegmez XSnippet
http://openntf.org/XSnippets.nsf/snippet.xsp?id=extended-
cookie-implementation-for-httponly-cookies
47
49. Beyond Domino Designer
Generate Javadocs
Eclipse Modeling Tools to create UML designs
– Use latest Eclipse for RCP and RAP Developers
– Download from Eclipse Marketplace
Atlassian SourceTree and Perforce P4Merge
SHOW 103 Wednesday 8am
http://www.slideshare.net/paulswithers1/beyond-domino-
designer
49
50. We climbed, he first, I following his steps,
Till on our view the beautiful lights of heaven
Dawned through a circular opening in the cave:
Thence issuing we again beheld the stars
Dante, Inferno, Canto 34 130-133
50
51. Summary
XPages is a gateway to other worlds
It is a journey – small steps lead to great strides
Learn from what others have done
Be prepared for the “Great Beyond”
51
52. Other Sessions
SHOW103: Source Control 101: Implementing an End-to-End Solution
SHOW104: Practical Java
AD201: Domino Application Development: Today and Tomorrow
AD202: Get The Best Out of Bootstrap4XPages
AD207: Widgets, LiveText and Now OpenSocial
AD209: Making Your Team More Productive with IBM Domino Designer JMP101: Java for
XPages Development
JMP106: Make Your Business Open and Social using IBM Notes Social Edition 9.0.1
BP207: Don’t Reinvent The Wheel – Re(use) Open Source Software from OpenNTF
GURU101: Gurupalooza
52
55. Access Connect Online to complete your session surveys using any:
– Web or mobile browser
– Connect Online kiosk onsite
55
Mike McGarel
Czarnowski Display Services Inc.
mcgarelgramming@gmail.com
http://www.bleedyellow.com/blogs/McGarelGramming/
@mmcgarel
Paul Withers
Intec Systems Ltd
pwithers@intec.co.uk
http://www.intec.co.uk/blog
@PaulSWithers