This session was delivered at Lotusphere 2009 by Matt White (Mr. XPages) and Bruce Elgort of Elguji Software, the makers of IdeaJam, IQJam, LinkJam and TaskJam.
33. What I Learned Today
1. What I should think about before I start coding
2. What XPages are
3. Getting around in Domino Designer for Eclipse
8.5 (DDE)
4. What Custom Controls are
5. What Script Libraries are
6. Some best practices for web application
development
Bruce Elgort Matt White
B
42. Benefits of XPages
• Getting rid of the last 10+ years of “hacks” you have learned
including:
Pager controls
Ajaxy stuff
View design
Merging data from different documents, views and databases on the same page
Rich text editing
Type-ahead
Native CSS design
Proper HTML (XHTML)
• XPages provide features that rival other platforms
• Less code to write
• Bringing the ease of writing Notes applications to the web
• You can write an entire application without writing much code
M
14
44. XPages - What are they?
• New server task that is part of HTTP
As developers who really cares about admin server tasks?
• An XPage is a Java Server Face JEE Application
• In Domino Designer for Eclipse (DDE) in IBM Lotus/Notes Domino 8.5
there are three “main” new design elements:
XPages
Custom Controls
Server Side Script Libraries
• All code is written in JavaScript
@Functions are available - (here be dragons around!)
Code, commas and case sensitivity are very important
Turn on the debugger (we will show how later)
BM
15
46. Our Focus Application - TaskJam
• We wanted to develop a simple web based task management system
which met our day-to-day needs:
Easily create tasks
Share tasks with others
Due dates
Prioritize tasks
Tag tasks using Web 2.0 tagging
• This type of application requires:
Input validation
Pager controls
Tag clouds
Create tasks “in-line”
Type-ahead
B
16
48. Some of Our Best Practices
• Using the Yahoo UI Library (http://developer.yahoo.com/yui)
– Grids CSS - layout made easy for all “Class A” browsers:
●
Internet Explorer
●
FireFox
●
Safari
– Font CSS - Provides consistent font sizing
• Simple to use - use a single page to do most things
• Don’t restrict the user into task categories
Set them free to add on-the-fly
• Don’t add to much too much validation which would make the
application hard to use
M
17
51. Building TaskJam
• The Layout Custom Control
Making use of YUI
Separating out UI from functionality
• The TaskRow and Repeat Custom Controls in Home XPage
Scoped variables
Simple view data binding
• The Task Custom Control
Binding a classic Notes form to a Custom Control
Validation
Type-ahead
• Advanced Coding - Tag Cloud
More on Scoped Variables
Making use of Dojo
MB
20
62. Some other Tips and Tricks
• In the Server Document there is now a setting for “Sign agents or
XPages to run on behalf of the invoker”
• But it’s also worth making sure that the “Sign or run unrestricted
methods and operations” setting is also completed
• Debugging your database is much easier by checking the “Display
Default Error Page” option in the Application Properties in
Designer.
• The “print” statement is also your friend, or have a look at our
“OpenLogXPages” script library if you use OpenLog
• Use OpenLog with all of your applications (http://openntf.org)
M
64. More Tips and Tricks
• Firebug is invaluable in XPages development
• Classic web development is still needed for non HTML transactions
such as JSON data or RSS feeds, so agents are still required.
• The Notes interface is still important for administration
• We can let admins clear the caches with a simple XPage after they
have changed settings in the Control Panel (resetCache.xsp)
M
65. Looking at What We Have Learned today
• What an XPage is
• What a Custom Control is
• How do use Custom Controls to create XPages
• How to use a Server Side Script Library
• Validation
• Scoped Variables
• Data Binding
• YUI
M
26
73. Related Sessions
• AD204 - XPages 101
• AD205 - XPages Things You Can't Afford to Miss
• AD207 - Building an "XPages-Powered" IBM Lotus Domino
Application
• AD212 - 10 Web 2.0 User Interface Patterns for IBM Lotus Notes
and XPages
B
29
75. Q&A
• Don’t forget to fill in the evaluations...
• BP105: Developing a World Class Web 2.0 Application with
XPages
• Bruce Elgort
bruce.elgort@gmail.com
• Matt White
matthew.white@fclonline.com
• Come see us Pedestal 227 if you have questions about XPages
MB
30