Modernizing Your Domino and
XPages Applications
Paul Withers, Intec Systems Ltd
1#engageug
Paul Withers
• ICS Developer
• React and Node Developer
• Lifetime IBM Champion
• OpenNTF Board Member
2#engageug
Notes Developer XPages Developer Java Developer
Microservices
Developer
AGENDA
• Defining the Scope
• Positioning “Now”
• Modernising Web
• Modernising Mobile
• Modernising for DQL
• Modernising Integration
3#engageug
Defining the Scope
4#engageug
Modernisation
• Oxford English Dictionary Definition
The process of adapting something
to modern needs or habits.
e.g. ‘the industry is undergoing modernization’
5#engageug
NOT Changing Colours
6#engageug
Themes CAN Modernise
7#engageug
New Methods of Access are Modernisation
8#engageug
Challenge Previous Assumptions / Behaviours
• Refactor functionality as well as code
• Did reality mirror theory?
• Has time changed needs?
• Have user’s habits changed?
• Should user’s habits change?
• Has platform/environment changed expectations?
• What can you learn from other platforms?
• Do technical changes impact needs?
• Are IT landscape changes relevant?
9#engageug
Migration vs Modernisation
• Migration means moving everything
• Migration rarely allows parallel running
• Migration isn’t interested in platform enhancements
• Modernisation can be addition or change
• Modernisation may not include all functionality
• Modernisation can be gradual
• Modernisation should take into account platform
enhancements
10#engageug
Out of Scope Modernisations
• TeamWorkr
• We4IT Aveedo
• Darwino
• Other third-party modernisation tools
• Modernising development skills
• Modernising development tools
11#engageug
Positioning Now
12#engageug
Notes Client Sample
13#engageug
Notes Client – Navigators
14#engageug
Notes Client – Outlines
15#engageug
XPages
16#engageug
30 Years, Common Theme
17#engageug
Modernising Web
18#engageug
Modern?
19#engageug
Which Would You Use?
20#engageug
OpenNTF Snippets (formerly XSnippets)
21#engageug
Context-Sensitive Options
• Create Snippet
• My Favourites
• Add to Favourite
• Add Comment
All require authentication
Only visible now when authenticated
22#engageug
Navigation Reorganised
• Create Snippet – moved to banner
• Follow OpenNTF and Follow Snippets – moved to footer
• Menu options reduced
Can header and footer areas be better utilized?
Are all menu options required?
Can options be consolidated?
23#engageug
Layout
• Home page combines 30 most recent and most
downloaded
• Layout amended to utilize screen real estate
Tabular layout is typical of Notes Client
Data View offers more flexibility per row
Repeat controls / Forum View breaks out of row paradigm
For multiple columns, Bootstrap is best
24#engageug
Search Improved
• “Full text search” retained
• Combined with “faceted search”
• Facets for Language and Author replace views
What are main search criteria?
Can views be removed by faceted search?
V10 adds DQL and dynamic FT index updates
25#engageug
Behind the Views
• What is throughput?
• Can / should data be archived to optimise the application?
• Reporting may need consideration – combining results, tabbed view
• Which search criteria can use views?
• Which search criteria require full text index / DQL?
• Code for search will be more complex
• Are dominoViews required?
• Will search results be small enough to convert to Java
objects?
26#engageug
Bootstrap Responsive
• Should be preferred out-of-the-box theme
• Unless mobile is explicitly out of scope
• Menus collapse
• Banner and title menus merge!
• Layouts reorganize
• <div styleClass=“col-sm-12 col-md-6”></div>
• sm, xs, md, lg
27#engageug
OpenNTF Snippets (formerly XSnippets)
28#engageug
Layout and Style
• Not all buttons are equal
• Styling can encourage / warn users
• Why are fields ordered the way they are?
• Modernisation allows review
• What new functionality is appropriate?
• Consider social – within / outside the enterprise
29#engageug
Other Approaches
• Dashboard combines information and navigation
• Option to hide
• Links replacing categorised view
• Alphabetical selection to filter further
30#engageug
Forms
• Tabbed tables are problematic on web
• “Wizards” or pseudo tabbed tables
• Set viewScope for tabs visited
• Save as draft (or different form name) until all tabs visited
• Ensure methods for cleanup
• Ensure unique document checking finds these too
31#engageug
Modernising Mobile
32#engageug
All Hail!
• Theo’s Wine app
• https://openntf.org/main.nsf/
project.xsp?r=project/Wine
%20Tasting
33#engageug
Customers, Learn from Jeff Goldblum!
If desktop feels 10 years old, mobile will feel 20 years old
34#engageug
Tablets are Different
• Different size
• Different font size
• Different method of clicking
• Different application integration
• Different add-ons available (e.g. camera)
• Different typing interfaces
• Different text / image ratios
35#engageug
Navigation as Home Page
• Page sizes / layouts have an impact
36#engageug
Image Maps for Categorisation
• Assumes fixed categories
37#engageug
Embedded Views
• Filters via dialog lists / buttons instead of categorization
• Forms with “show single category”
• @Environment for “session scoping”
38#engageug
Multiple in a Single Form
• Embedded view means no out-of-the-box search bar
• Backend search, store in folder (Private Desktop First Use
issues)
• Categorised views
with filters
• Store view name etc
in notes.ini
39#engageug
Images or Bar Text for “Charting”
40#engageug
Recommendations
• Increase font sizes
• Selected / deselected images for “tabs”
• Tabbed tables with switch rows programmatically
• Think about alignment of buttons
• Show only icon
• Avoid icons that are platform-specific if targeting iOS and
Android
41#engageug
@Environment
• Can use in Forms
• Can use in Pages
• Can’t use in View selection formulas
• Can’t use in View column formulas
• Can use in View column hide-when formulas
• Use to filter wide views
• Can cause error messages in Notes Client after changing in DDE
42#engageug
Product Integration
• Why not integrate client with browser?
• Consider future directions of products
• For desktop, show only if online
• If SSO not enabled:
• Pass parameters to a public chart
• Run as server agent, validated with secret key passed from Notes
• Put in folder and process from DQL
• Generate exports on server and post centrally
43#engageug
Modernising for DQL
44#engageug
Why DQL?
• Better performance for some aggregations
• ViewNavigator on a simple query against a simple view
will be quicker
• Very powerful for user-driven flexible queries
• NOT just for Node.js, usable from LS and Java
• Relevant for existing applications as well as new
45#engageug
DQL Requires…
• SELECT @All except for in viewname syntax
• Needs only field name
• Needs sorted ascending
• Needs non-categorized and show multiple values as
separate entries
Modernising for DQL means revisiting
your database design and adding / removing. Do it!
For database size etc,
carefully consider externalizing view indexes
46#engageug
Modernising Integration
47#engageug
REST Service Provider Options
• LotusScript web agent
• Access via ?OpenAgent, “print” JSON response
• No ability to set headers though
• SmartNSF
• CustomRESTHandler or other REST service “route”
• XAgent
• Set viewState=“nostate”
• Can use XOTS for asynchronous processing / chaining
• REST Service Plugin
• Better standardisation, e.g. Gson / Jackson for autoconversion
• HTTP restart to deploy
48#engageug
REST Service Provider Options
• Node.js API Gateway
• DQL to read / write from Domino
• JavaScript to manage validation
• Express recommended for routes
• Node-RED
• HTTP Request Node
• DominoV10 nodes to read / write from Domino
49#engageug
REST Service Considerations
• Assume bad data
• All developers are lazy by nature! Validate and error
• Security?
• Authenticate as Domino user? (Build your own OAuth?)
• Run as signer (or server)?
• Require additional verification?
• Endpoints?
• Use specific endpoints for e.g. approve functions
• Logging
• Do you want to log transactions?
• How will you clean up the logs?
50#engageug
Making REST Service Calls
• LotusScript classes available
• JSON parsing is easier in Java
• Assuming you’re embracing Gson / Jackson
• Apache Wink plugin has bug
• Dependency on Apache Commons Logging not exposed
• Impacts consuming REST services
• Fine for providing REST services
51#engageug
Refactoring
• Re-use XPages workflow code
• Centralise passing document ID / dominoDocument
• Add extra validation in REST service first
• Pass a return value
• Handle errors accordingly – no UI for REST!
52#engageug
Request Types
• GET – No body allowed
• POST – Submit data, read / write
• PUT – Replace entire object
• PATCH – Minor update to existing object
• PATCH is not enabled by default on Domino
• Update the Internet Site Document
• DELETE – No body allowed
53#engageug
Error Codes
• 1xx – Received and understood, stand by
• 2xx – Received, understood and accepted for processing
• 3xx – Redirecting
• 4xx – You did something wrong
• 5xx – We did something wrong!
See Wikipedia
54#engageug
HTTP Status Codes
• 200 – OK
• 202 – Accepted for processing
• 302 – URL found but server is redirecting
• 400 – Bad request
• 401 – Unauthorised
• 403 – Forbidden
• 404 – Not found
• 405 – Method not allowed
• 500 – Internal server error
55#engageug
REST Service Development Tools
• OpenAPI 3.0 (Swagger) specification
• Swagger Editor (online, Node.js app, Docker)
• Postman REST Client
• Firefox RESTClient plugin
• Node-RED
• IBM Cloud, Node.js app, Docker
56#engageug
Summary
• Modernisation means re-evaluation
• Modernisation doesn’t define scope
• Modernisation doesn’t define amount of effort
• Modernisation isn’t a “one size fits all”
• Demos on
https://github.com/paulswithers/EngageModernisation
57#engageug
Thank You
58#engageug
Paul Withers
Intec Systems Ltd & OpenNTF
pwithers@intec.co.uk
@paulswithers
https://www.intec.co.uk/blog
https://paulswithers.github.io
https://www.dominonextstep.com/
https://www.dominonextstep.com/
take-the-quiz/

Engage 2019: Modernising Your Domino and XPages Applications

  • 1.
    Modernizing Your Dominoand XPages Applications Paul Withers, Intec Systems Ltd 1#engageug
  • 2.
    Paul Withers • ICSDeveloper • React and Node Developer • Lifetime IBM Champion • OpenNTF Board Member 2#engageug Notes Developer XPages Developer Java Developer Microservices Developer
  • 3.
    AGENDA • Defining theScope • Positioning “Now” • Modernising Web • Modernising Mobile • Modernising for DQL • Modernising Integration 3#engageug
  • 4.
  • 5.
    Modernisation • Oxford EnglishDictionary Definition The process of adapting something to modern needs or habits. e.g. ‘the industry is undergoing modernization’ 5#engageug
  • 6.
  • 7.
  • 8.
    New Methods ofAccess are Modernisation 8#engageug
  • 9.
    Challenge Previous Assumptions/ Behaviours • Refactor functionality as well as code • Did reality mirror theory? • Has time changed needs? • Have user’s habits changed? • Should user’s habits change? • Has platform/environment changed expectations? • What can you learn from other platforms? • Do technical changes impact needs? • Are IT landscape changes relevant? 9#engageug
  • 10.
    Migration vs Modernisation •Migration means moving everything • Migration rarely allows parallel running • Migration isn’t interested in platform enhancements • Modernisation can be addition or change • Modernisation may not include all functionality • Modernisation can be gradual • Modernisation should take into account platform enhancements 10#engageug
  • 11.
    Out of ScopeModernisations • TeamWorkr • We4IT Aveedo • Darwino • Other third-party modernisation tools • Modernising development skills • Modernising development tools 11#engageug
  • 12.
  • 13.
  • 14.
    Notes Client –Navigators 14#engageug
  • 15.
    Notes Client –Outlines 15#engageug
  • 16.
  • 17.
    30 Years, CommonTheme 17#engageug
  • 18.
  • 19.
  • 20.
    Which Would YouUse? 20#engageug
  • 21.
    OpenNTF Snippets (formerlyXSnippets) 21#engageug
  • 22.
    Context-Sensitive Options • CreateSnippet • My Favourites • Add to Favourite • Add Comment All require authentication Only visible now when authenticated 22#engageug
  • 23.
    Navigation Reorganised • CreateSnippet – moved to banner • Follow OpenNTF and Follow Snippets – moved to footer • Menu options reduced Can header and footer areas be better utilized? Are all menu options required? Can options be consolidated? 23#engageug
  • 24.
    Layout • Home pagecombines 30 most recent and most downloaded • Layout amended to utilize screen real estate Tabular layout is typical of Notes Client Data View offers more flexibility per row Repeat controls / Forum View breaks out of row paradigm For multiple columns, Bootstrap is best 24#engageug
  • 25.
    Search Improved • “Fulltext search” retained • Combined with “faceted search” • Facets for Language and Author replace views What are main search criteria? Can views be removed by faceted search? V10 adds DQL and dynamic FT index updates 25#engageug
  • 26.
    Behind the Views •What is throughput? • Can / should data be archived to optimise the application? • Reporting may need consideration – combining results, tabbed view • Which search criteria can use views? • Which search criteria require full text index / DQL? • Code for search will be more complex • Are dominoViews required? • Will search results be small enough to convert to Java objects? 26#engageug
  • 27.
    Bootstrap Responsive • Shouldbe preferred out-of-the-box theme • Unless mobile is explicitly out of scope • Menus collapse • Banner and title menus merge! • Layouts reorganize • <div styleClass=“col-sm-12 col-md-6”></div> • sm, xs, md, lg 27#engageug
  • 28.
    OpenNTF Snippets (formerlyXSnippets) 28#engageug
  • 29.
    Layout and Style •Not all buttons are equal • Styling can encourage / warn users • Why are fields ordered the way they are? • Modernisation allows review • What new functionality is appropriate? • Consider social – within / outside the enterprise 29#engageug
  • 30.
    Other Approaches • Dashboardcombines information and navigation • Option to hide • Links replacing categorised view • Alphabetical selection to filter further 30#engageug
  • 31.
    Forms • Tabbed tablesare problematic on web • “Wizards” or pseudo tabbed tables • Set viewScope for tabs visited • Save as draft (or different form name) until all tabs visited • Ensure methods for cleanup • Ensure unique document checking finds these too 31#engageug
  • 32.
  • 33.
    All Hail! • Theo’sWine app • https://openntf.org/main.nsf/ project.xsp?r=project/Wine %20Tasting 33#engageug
  • 34.
    Customers, Learn fromJeff Goldblum! If desktop feels 10 years old, mobile will feel 20 years old 34#engageug
  • 35.
    Tablets are Different •Different size • Different font size • Different method of clicking • Different application integration • Different add-ons available (e.g. camera) • Different typing interfaces • Different text / image ratios 35#engageug
  • 36.
    Navigation as HomePage • Page sizes / layouts have an impact 36#engageug
  • 37.
    Image Maps forCategorisation • Assumes fixed categories 37#engageug
  • 38.
    Embedded Views • Filtersvia dialog lists / buttons instead of categorization • Forms with “show single category” • @Environment for “session scoping” 38#engageug
  • 39.
    Multiple in aSingle Form • Embedded view means no out-of-the-box search bar • Backend search, store in folder (Private Desktop First Use issues) • Categorised views with filters • Store view name etc in notes.ini 39#engageug
  • 40.
    Images or BarText for “Charting” 40#engageug
  • 41.
    Recommendations • Increase fontsizes • Selected / deselected images for “tabs” • Tabbed tables with switch rows programmatically • Think about alignment of buttons • Show only icon • Avoid icons that are platform-specific if targeting iOS and Android 41#engageug
  • 42.
    @Environment • Can usein Forms • Can use in Pages • Can’t use in View selection formulas • Can’t use in View column formulas • Can use in View column hide-when formulas • Use to filter wide views • Can cause error messages in Notes Client after changing in DDE 42#engageug
  • 43.
    Product Integration • Whynot integrate client with browser? • Consider future directions of products • For desktop, show only if online • If SSO not enabled: • Pass parameters to a public chart • Run as server agent, validated with secret key passed from Notes • Put in folder and process from DQL • Generate exports on server and post centrally 43#engageug
  • 44.
  • 45.
    Why DQL? • Betterperformance for some aggregations • ViewNavigator on a simple query against a simple view will be quicker • Very powerful for user-driven flexible queries • NOT just for Node.js, usable from LS and Java • Relevant for existing applications as well as new 45#engageug
  • 46.
    DQL Requires… • SELECT@All except for in viewname syntax • Needs only field name • Needs sorted ascending • Needs non-categorized and show multiple values as separate entries Modernising for DQL means revisiting your database design and adding / removing. Do it! For database size etc, carefully consider externalizing view indexes 46#engageug
  • 47.
  • 48.
    REST Service ProviderOptions • LotusScript web agent • Access via ?OpenAgent, “print” JSON response • No ability to set headers though • SmartNSF • CustomRESTHandler or other REST service “route” • XAgent • Set viewState=“nostate” • Can use XOTS for asynchronous processing / chaining • REST Service Plugin • Better standardisation, e.g. Gson / Jackson for autoconversion • HTTP restart to deploy 48#engageug
  • 49.
    REST Service ProviderOptions • Node.js API Gateway • DQL to read / write from Domino • JavaScript to manage validation • Express recommended for routes • Node-RED • HTTP Request Node • DominoV10 nodes to read / write from Domino 49#engageug
  • 50.
    REST Service Considerations •Assume bad data • All developers are lazy by nature! Validate and error • Security? • Authenticate as Domino user? (Build your own OAuth?) • Run as signer (or server)? • Require additional verification? • Endpoints? • Use specific endpoints for e.g. approve functions • Logging • Do you want to log transactions? • How will you clean up the logs? 50#engageug
  • 51.
    Making REST ServiceCalls • LotusScript classes available • JSON parsing is easier in Java • Assuming you’re embracing Gson / Jackson • Apache Wink plugin has bug • Dependency on Apache Commons Logging not exposed • Impacts consuming REST services • Fine for providing REST services 51#engageug
  • 52.
    Refactoring • Re-use XPagesworkflow code • Centralise passing document ID / dominoDocument • Add extra validation in REST service first • Pass a return value • Handle errors accordingly – no UI for REST! 52#engageug
  • 53.
    Request Types • GET– No body allowed • POST – Submit data, read / write • PUT – Replace entire object • PATCH – Minor update to existing object • PATCH is not enabled by default on Domino • Update the Internet Site Document • DELETE – No body allowed 53#engageug
  • 54.
    Error Codes • 1xx– Received and understood, stand by • 2xx – Received, understood and accepted for processing • 3xx – Redirecting • 4xx – You did something wrong • 5xx – We did something wrong! See Wikipedia 54#engageug
  • 55.
    HTTP Status Codes •200 – OK • 202 – Accepted for processing • 302 – URL found but server is redirecting • 400 – Bad request • 401 – Unauthorised • 403 – Forbidden • 404 – Not found • 405 – Method not allowed • 500 – Internal server error 55#engageug
  • 56.
    REST Service DevelopmentTools • OpenAPI 3.0 (Swagger) specification • Swagger Editor (online, Node.js app, Docker) • Postman REST Client • Firefox RESTClient plugin • Node-RED • IBM Cloud, Node.js app, Docker 56#engageug
  • 57.
    Summary • Modernisation meansre-evaluation • Modernisation doesn’t define scope • Modernisation doesn’t define amount of effort • Modernisation isn’t a “one size fits all” • Demos on https://github.com/paulswithers/EngageModernisation 57#engageug
  • 58.
    Thank You 58#engageug Paul Withers IntecSystems Ltd & OpenNTF pwithers@intec.co.uk @paulswithers https://www.intec.co.uk/blog https://paulswithers.github.io https://www.dominonextstep.com/ https://www.dominonextstep.com/ take-the-quiz/