+ All Categories
Home > Technology > It's Not Infernal: Dante's Nine Circles of XPages Heaven

It's Not Infernal: Dante's Nine Circles of XPages Heaven

Date post: 18-Dec-2014
Category:
Upload: teamstudio
View: 323 times
Download: 2 times
Share this document with a friend
Description:
Come join us for this fun but informative webinar on XPages development with Paul Withers and Mike McGarel as they present their session from Connect 2014! Your very own Dante and Virgil will take you through a divine comedy of nine circles that show that XPages is more paradise than perdition. We'll show how XPages and related concepts like OSGi plugins make XPages a modern and vibrant development technology for web, mobile and rich client. On the way we'll guide you past some pitfalls to avoid becoming one of the lost souls. When we re-emerge, you'll see the sky's the limit with star-studded opportunities.
68
1 It's Not Infernal: Dante's Nine Circles of XPages Heaven We will start promptly at 10:30 A.M.
Transcript
Page 1: It's Not Infernal: Dante's Nine Circles of XPages Heaven

1

It's Not Infernal: Dante's Nine Circles of XPages Heaven

We will start promptly at 10:30 A.M.

Page 2: It's Not Infernal: Dante's Nine Circles of XPages Heaven

2

In Memory of Tim Tripcony…

Page 3: It's Not Infernal: Dante's Nine Circles of XPages Heaven

It’s Not Infernal: Dante’s Nine Circles of XPages Heaven

Tweet about this event: #XPages and mention us: @teamstudio @TLCCLTD

@PaulSWithers @MikeMcGarel May 13, 2014

Page 4: It's Not Infernal: Dante's Nine Circles of XPages Heaven

@teamstudio teamstudio.com

@TLCCLTD

tlcc.com

Courtney Carter Inbound Marketing Specialist

Page 5: It's Not Infernal: Dante's Nine Circles of XPages Heaven

Who We Are • Our background is in creating tools for collaborative

computing in mid-size and large enterprises, primarily for IBM 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

Page 6: It's Not Infernal: Dante's Nine Circles of XPages Heaven

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 –

a replication model you already know • Unplugged 3.1 recently released

Page 7: It's Not Infernal: Dante's Nine Circles of XPages Heaven

Unplugged Templates • Continuity – Mobile offline access to

BCM programs

• OneView Approvals – Expense approvals; anywhere, anytime

• CustomerView – lightweight CRM framework for field sales and field service teams

• Contacts – customer information database • Activities – customer activity log • Media – mobile offline file storage and access

Page 8: It's Not Infernal: Dante's Nine Circles of XPages Heaven

• Next Wireless Wednesdays webinar: Enhance Your Enterprise Mobile Application o June 4, 2014

• Next Teamstudio/TLCC webinar: Bootstrap4XPages o June 17, 2014

• Promotions: o Get our IBM Notes Upgrade Pack by May 31 and receive 5 free

Unplugged licenses

o Demo Teamstudio Continuity by June 30 to be entered to win an iPad mini

Page 9: It's Not Infernal: Dante's Nine Circles of XPages Heaven

It's Not Infernal: Dante's Nine Circles of XPages Heaven

3

#XPages

Your Hosts Today:

Howard Greenberg TLCC

@TLCCLtd

Paul Della-Nebbia TLCC

@PaulDN

Page 10: It's Not Infernal: Dante's Nine Circles of XPages Heaven

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!) • OnSite Private Classes • Mentoring/Consulting Services • Free demo courses

– Intro. To XPages Development – Application Development 1

4

Page 11: It's Not Infernal: Dante's Nine Circles of XPages Heaven

5

• Save hundreds and even Thousands of Dollars on the most popular courses and packages

• Through June 13th

http://www.tlcc.com/springsale

Page 12: It's Not Infernal: Dante's Nine Circles of XPages Heaven

Upcoming and Recorded Webinars

6

Webinar Schedule Bootstrap4XPages – June 17th

www.tlcc.com/xpages-webinar

View Previous Webinars (use url above)

Page 13: It's Not Infernal: Dante's Nine Circles of XPages Heaven

Asking Questions

7

Q & A at the end! Type in your questions as they come up

Page 14: It's Not Infernal: Dante's Nine Circles of XPages Heaven

Your Presenters Today:

8

#XPages

Mike McGarel @mmcgarel www.bleedyellow.com/blogs/McGarelGramming

Paul Withers, IBM Champion @PaulSWithers www.intec.co.uk/blog

Page 15: It's Not Infernal: Dante's Nine Circles of XPages Heaven

Paul Withers

ICS Consultant at Intec Systems Ltd IBM Champion 2011-2014Co-Author XPages Extension LibraryOpenNTF DirectorContributor to OpenNTFBlogger on XPages, IBM Domino®

Designer and beyond– http://www.intec.co.uk/blog

Page 16: It's Not Infernal: Dante's Nine Circles of XPages Heaven

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

2

Page 17: It's Not Infernal: Dante's Nine Circles of XPages Heaven

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”)

3

Page 18: It's Not Infernal: Dante's Nine Circles of XPages Heaven

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

4

Page 19: It's Not Infernal: Dante's Nine Circles of XPages Heaven

First Circle: Limbo

5Mihai Marius Mihu, http://www.flickr.com/photos/mihaimariusmihu/

Page 20: It's Not Infernal: Dante's Nine Circles of XPages Heaven

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

6

Page 21: It's Not Infernal: Dante's Nine Circles of XPages Heaven

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/7

Page 22: It's Not Infernal: Dante's Nine Circles of XPages Heaven

“Limbo” Property Values

Custom Language<xp:textvalue= “Database title is #{database.title}, database path is #{javascript: @Subset(@DbName(), -1);}”></xp:text>

8

Page 23: It's Not Infernal: Dante's Nine Circles of XPages Heaven

Demo

9

Page 24: It's Not Infernal: Dante's Nine Circles of XPages Heaven

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!10

Page 25: It's Not Infernal: Dante's Nine Circles of XPages Heaven

Second Circle: Lust

11

Mihai Marius Mihu, http://www.flickr.com/photos/mihaimariusmihu/

Page 26: It's Not Infernal: Dante's Nine Circles of XPages Heaven

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

12

Page 27: It's Not Infernal: Dante's Nine Circles of XPages Heaven

Looks MatterFirst 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

13

Page 28: It's Not Infernal: Dante's Nine Circles of XPages Heaven

Interface Makeovers

IBM’s OneUI (v3): http://infolib.lotus.com/resources/oneui/3.0/docPublic/index.htm

Extension Library / Dojo widgets http://dojotoolkit.org– XPages Help Application http://xhelp.openntf.org/

Twitter Bootstrap: http://getbootstrap.com

jQuery Plugins – jQuery UI: http://jqueryui.com

14

Page 29: It's Not Infernal: Dante's Nine Circles of XPages Heaven

15

Page 30: It's Not Infernal: Dante's Nine Circles of XPages Heaven

Demo

16

Page 31: It's Not Infernal: Dante's Nine Circles of XPages Heaven

Third Circle: Gluttony

17Mihai Marius Mihu, http://www.flickr.com/photos/mihaimariusmihu/

Page 32: It's Not Infernal: Dante's Nine Circles of XPages Heaven

Don’t Make Browsers Eat Too Much!

xsp.resource.aggregate=true

18

Page 33: It's Not Infernal: Dante's Nine Circles of XPages Heaven

Temporary Gluttony – For Debugging!

xsp.client.resources.uncompressed=true

19

Page 34: It's Not Infernal: Dante's Nine Circles of XPages Heaven

Fourth Circle: Greed

20 Mihai Marius Mihu, http://www.flickr.com/photos/mihaimariusmihu/

Page 35: It's Not Infernal: Dante's Nine Circles of XPages Heaven

Avoid Greed on Server

21

Page 36: It's Not Infernal: Dante's Nine Circles of XPages Heaven

Demo

22

Page 37: It's Not Infernal: Dante's Nine Circles of XPages Heaven

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

23

Page 38: It's Not Infernal: Dante's Nine Circles of XPages Heaven

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

24

Page 39: It's Not Infernal: Dante's Nine Circles of XPages Heaven

Persistence Options

GZip Persisted Files– xsp.persistence.file.gzip– Default=false– Writing…next? You want it again? Reading…

Persist Files Asynchronously– xsp.persistence.file.async– Default=true– Server busy, remembering. Next? (Writing, writing)

25

Page 40: It's Not Infernal: Dante's Nine Circles of XPages Heaven

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

26

Page 41: It's Not Infernal: Dante's Nine Circles of XPages Heaven

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

27

Page 42: It's Not Infernal: Dante's Nine Circles of XPages Heaven

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

28

Page 43: It's Not Infernal: Dante's Nine Circles of XPages Heaven

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

29

Page 44: It's Not Infernal: Dante's Nine Circles of XPages Heaven

Fifth Circle: Wrath

30 Mihai Marius Mihu, http://www.flickr.com/photos/mihaimariusmihu/

Page 45: It's Not Infernal: Dante's Nine Circles of XPages Heaven

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 WebContent\WEB-INF\src)

31

Page 46: It's Not Infernal: Dante's Nine Circles of XPages Heaven

Meet the Users’ Expectations

It’s a “mad mad mad mad world”– Devices– Locations– Connectivity

Responsive design options:– Dojo layout container– Bootstrap responsive

Embedded experience

32

Page 47: It's Not Infernal: Dante's Nine Circles of XPages Heaven

Demo

33

Page 48: It's Not Infernal: Dante's Nine Circles of XPages Heaven

Sixth Circle: Heresy

34 Mihai Marius Mihu, http://www.flickr.com/photos/mihaimariusmihu/

Page 49: It's Not Infernal: Dante's Nine Circles of XPages Heaven

Java

“IBM always wanted us to use Java” – NO!

35

Page 50: It's Not Infernal: Dante's Nine Circles of XPages Heaven

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?

36

Page 51: It's Not Infernal: Dante's Nine Circles of XPages Heaven

Demo

37

Page 52: It's Not Infernal: Dante's Nine Circles of XPages Heaven

OpenNTF Domino API

38

Page 53: It's Not Infernal: Dante's Nine Circles of XPages Heaven

OpenNTF Domino API

Document.replaceItemValue(“myDateField”, new Date());– Or Document.put(“myDateField”, new Date());

for (Document doc : dc) {…}

Transactional Processing

SyncHelper

Email Helpers

OpenLog

Document Scanner

Database Listeners39

Page 54: It's Not Infernal: Dante's Nine Circles of XPages Heaven

Seventh Circle: Violence

40 Mihai Marius Mihu, http://www.flickr.com/photos/mihaimariusmihu/

Page 55: It's Not Infernal: Dante's Nine Circles of XPages Heaven

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

41

Page 56: It's Not Infernal: Dante's Nine Circles of XPages Heaven

“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

42

Page 57: It's Not Infernal: Dante's Nine Circles of XPages Heaven

Eighth Circle: Fraud

43

Mihai Marius Mihu, http://www.flickr.com/photos/mihaimariusmihu/

Page 58: It's Not Infernal: Dante's Nine Circles of XPages Heaven

SessionScope

SessionScope is fraudulent– Session only for current application– Browser session, not user session

44

Page 59: It's Not Infernal: Dante's Nine Circles of XPages Heaven

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

45

Page 60: It's Not Infernal: Dante's Nine Circles of XPages Heaven

How To Add Your Own HTTPOnly Cookie

Serdar Basegmez XSnippet

http://openntf.org/XSnippets.nsf/snippet.xsp?id=extended- cookie-implementation-for-httponly-cookies

46

Page 61: It's Not Infernal: Dante's Nine Circles of XPages Heaven

Ninth Circle: Treachery

47Mihai Marius Mihu, http://www.flickr.com/photos/mihaimariusmihu/

Page 62: It's Not Infernal: Dante's Nine Circles of XPages Heaven

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

48

Page 63: It's Not Infernal: Dante's Nine Circles of XPages Heaven

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 starsDante, Inferno, Canto 34 130-133

49

Page 64: It's Not Infernal: Dante's Nine Circles of XPages Heaven

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”

50

Page 65: It's Not Infernal: Dante's Nine Circles of XPages Heaven

IBM Resources

XPages.Info: http://xpages.info

XPages Forum: http://www-10.lotus.com/ldd/xpagesforum.nsf

Notes/Domino Application Development Wiki: http://www-10.lotus.com/ldd/ddwiki.nsf

Collaboration Today: http://collaborationtoday.info

OpenNTF: http://openntf.org

OpenNTF Snippets: http://openntf.org/XSnippets.nsf/home.xsp

The “XPages trilogy”:– Mastering XPages, 2nd Edition due shortly (IBM Press)– XPages Extension Library (IBM Press)– XPages Portable Command Guide (IBM Press)

51

Page 66: It's Not Infernal: Dante's Nine Circles of XPages Heaven

Community Resources

Planet Lotus: http://planetlotus.org

Notes in 9 (videos): http://www.notesin9.com

XPages cheat sheets: http://www.xpagescheatsheets.com

YouAtNotes XPages wiki: http://www.xpageswiki.com

Stack Overflow: http://stackoverflow.com/questions/tagged/xpages

52

Page 67: It's Not Infernal: Dante's Nine Circles of XPages Heaven

Questions????

9

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

Page 68: It's Not Infernal: Dante's Nine Circles of XPages Heaven

Upcoming Events: 6/17 – TLCC XPages Webinar 6/4 - Teamstudio Wireless Wednesdays 6/16-17 – Social Connections in Prague 8/27-29 – MWLug in Grand Rapids, MI

Question and Answer Time!

10

Teamstudio Questions? [email protected] 877-228-6178

TLCC Questions?

[email protected] [email protected] 888-241-8522 or 561-953-0095

Howard Greenberg Courtney Carter

@PaulSWithers

@mmcgarel

#XPages

@TLCCLtd

@Teamstudio

@PaulDN

Paul Della-Nebbia Paul Withers Mike McGarel


Recommended