IBM Domino XPages has created many new opportunities in the development of browser applications. On OpenNTF there are many useful modules, code snippets and even ready-made applications that can simplify and speed up development work. However, there are other libraries, frameworks and techniques that can be used to enhance XPages and get more out of them, and more are being added all the time. This session looks at a few of them including bootstrap alternatives, Office integration, charting components and calendar views. How can they be used in resolving real world issues and creating innovative solutions to customer issues? The session will include practical demonstration of these elements as well as tips tricks and traps in to watch for in using them.
Oranges are not the only fruit (Alternative Solutions for Providing Additional Functionality in your Xpages Apps)
1. UKLUG 2012 – Cardiff, Wales
@matthew_fyleman@matthew_fyleman September 2012
Presenter: Matthew Fyleman
Company: We4IT Group
Alternative Solutions for
Providing Additional Functionality in your Xpages Apps
Oranges are not the only fruit
2. UKLUG 2012 – Cardiff, Wales
@matthew_fyleman@matthew_fyleman
Agenda
•About me
•Beyond the borders of OpenNTF:
•Bootstrap alternatives
•Charting components
•Calendar views
•Office integration
•Questions
3. UKLUG 2012 – Cardiff, Wales
@matthew_fyleman@matthew_fyleman
About Me
•Senior Developer and Product
Manager for We4IT
•Over 22 years as an IBM Domino
Developer
•Now working almost entirely with
Xpages
•Film addict!
4. UKLUG 2012 – Cardiff, Wales
@matthew_fyleman@matthew_fyleman
Beyond the borders of OpenNTF
•OpenNTF is an excellent resource!!!
- but it doesn’t have all the answers
•Why would you want to do this?
o Solution unavailable
o Deployment restrictions
o Differentiation
5. UKLUG 2012 – Cardiff, Wales
@matthew_fyleman@matthew_fyleman
Bootstrap Alternatives
Foundation
http://foundation.zurb.com
For
Very nice base style
Against
Heavyweight
Utilises
SASS, jQuery, Foundation Icon Fonts
Features
Grids, UI elements, Customiser
Supports
IE 9+
6. UKLUG 2012 – Cardiff, Wales
@matthew_fyleman@matthew_fyleman
Bootstrap Alternatives
Pure
http://purecss.io
For
Super lightweight
Against
No LESS/SASS
Utilises
jQuery
Features
Grids, Basic UI elements
Supports
IE 7+
7. UKLUG 2012 – Cardiff, Wales
@matthew_fyleman@matthew_fyleman
Bootstrap Alternatives
UIKit
http://getuikit.com/
For
Very simple structure
Easy to style
Against
Not commonly used
Utilises
jQuery
Features
Grids, UI elements, Themeroller
Supports
IE 9+
8. UKLUG 2012 – Cardiff, Wales
@matthew_fyleman@matthew_fyleman
Bootstrap
9. UKLUG 2012 – Cardiff, Wales
@matthew_fyleman@matthew_fyleman
Foundation
10. UKLUG 2012 – Cardiff, Wales
@matthew_fyleman@matthew_fyleman
Pure
11. UKLUG 2012 – Cardiff, Wales
@matthew_fyleman@matthew_fyleman
UIKit
12. UKLUG 2012 – Cardiff, Wales
@matthew_fyleman@matthew_fyleman
Bootstrap Alternatives
•Bootstrap4XPages can generally be implemented faster
•By implementing an alternative …
• Committing to a little more work
• Can achieve a more individual result
• Potentially a nicer result (of course subjective)
14. UKLUG 2012 – Cardiff, Wales
@matthew_fyleman@matthew_fyleman
Bootstrap Alternatives
Demo
15. UKLUG 2012 – Cardiff, Wales
@matthew_fyleman@matthew_fyleman
Charting Components
Projects on OpenNTF use:
jqPlot
http://www.jqplot.com
JFreeChart
http://www.jfree.org/jfreechart/
dojox.charting
http://dojotoolkit.org/reference-guide/1.10/dojox/charting.html
16. UKLUG 2012 – Cardiff, Wales
@matthew_fyleman@matthew_fyleman
Charting Components
Alternative
Chart.js
http://www.chartjs.org
• Dynamic
• Responsive
• IE9+ and all modern Browsers
Example code:
<canvas id="canvas" height="450" width="600"></canvas>
var ctx = document.getElementById("canvas").getContext("2d");
new Chart(ctx).Line(JSONOBJECT, {responsive: true});
20. UKLUG 2012 – Cardiff, Wales
@matthew_fyleman@matthew_fyleman
Charting Components
AMD - Loader problem
From Sven Hasselbach:
“Looks like an AMD loader problem with Dojo & JQM. I have tried out to disable the
Factory scan in a test page and this worked for me. To do this I have added the
following parameters in the xsp.properties:
xsp.client.script.dojo.djConfig=dojo-amd-factory-scan: false
Maybe this can help you with your problems in ND9.”
Three solutions…
21. UKLUG 2012 – Cardiff, Wales
@matthew_fyleman@matthew_fyleman
Charting Components
AMD - Loader problem – Solution 1
Change the JavaScript Library:
22. UKLUG 2012 – Cardiff, Wales
@matthew_fyleman@matthew_fyleman
Charting Components
AMD - Loader problem – Solution 2
Change the xsp.properties:
http://xomino.com/2013/05/14/xpages-nd9-dojo-1-8-does-not-work-
with-other-amd-loaders-and-the-work-around/
xsp.client.script.dojo.djConfig=dojo-amd-factory-scan: false
23. UKLUG 2012 – Cardiff, Wales
@matthew_fyleman@matthew_fyleman
Charting Components
AMD - Loader problem
Change the order in which the scripts are loaded:
http://hasselba.ch/blog/?p=1216
Only works if the scripts are consolidated:.
30. UKLUG 2012 – Cardiff, Wales
@matthew_fyleman@matthew_fyleman
Office Integration
docx4j
http://www.docx4java.org/
For
•Still supported and developed, better
handling of .docx files
•HTML can be included (Rich Text)
Against
•No .doc support, exclusively .docx (.pptx,
.xlsx)
31. UKLUG 2012 – Cardiff, Wales
@matthew_fyleman@matthew_fyleman
Office Integration
Demo
32. UKLUG 2012 – Cardiff, Wales
@matthew_fyleman@matthew_fyleman
Office Integration – Problem 1
Security exception occurred servicing request for: /demo.xsp - HTTP Code: 403
You need to adjust the java security policy:
[notes program]/jvm/lib/security/java.policy
Solution 1: Only for Developers! (and 8.5.x users)
grant { permission java.security.AllPermission; };
Solution 2: The better way:
grant codeBase "xspnsf://server:0/yourdatabase.nsf/-" {
permission java.security.AllPermission;
};
See Stephan Wissel’s blog: http://www.wissel.net/blog/d6plinks/SHWL-8JYAT5
33. UKLUG 2012 – Cardiff, Wales
@matthew_fyleman@matthew_fyleman
Office Integration – Problem 2
After downloading the file once, the page stops responding
Solution: CSJS:
XSP.allowSubmit();
34. UKLUG 2012 – Cardiff, Wales
@matthew_fyleman@matthew_fyleman
Questions?
35. UKLUG 2012 – Cardiff, Wales
@matthew_fyleman@matthew_fyleman
Attend our next session to win a BB-8 Sphero!:
Today, 13:30, Room 1
Simon Peek - „Need XPages apps fast? Need
apps on Mobile devices? Don’t have XPages
knowledge? We4IT brings you Aveedo!”
36. UKLUG 2012 – Cardiff, Wales
@matthew_fyleman@matthew_fyleman
Matthew Fyleman
We4IT Group
email: matthew.fyleman@we4it.com :