In my Lotusphere session AD207, I presented an XPages built Survey Tool application. Here was the abstract for the session:
Building an "XPages-Powered" IBM Lotus Domino Application
An unlimited number of editable documents on the same page? Generating the type of controls for fields on page load? Dynamic applications have always been a challenge for Lotus Domino development. Not anymore! In this session, you'll learn how to utilize the power of XPages to build a survey tool that can have an unlimited number of questions. We’ll show you how to dynamically allow for the selection of controls on the page load, such as checkboxes, radio buttons, and combo boxes, etc. Go under the hood and see how we use multiple data sources per page and some powerful XPage controls to build this application with a minimum amount of coding.
The goals that I set out to accomplish in this session were:
- To select an application that could not easily be built with the standard Domino Designer..... demonstrating the power of XPages.
- Secondly my goal was to utilize XPage controls to build a complex application with a minimum amount of code or workarounds.
- Thinking “Inside the Box”....
Thinking "Inside the Box" ??? Yes, you are right, I am the first person on the planet to coin that phrase... It was a little tongue-in-cheek humor but the point is, when was the last time you used only the tools provided for you in the domino designer to build a web application? Probably 1998 when we all built the view with the left hand navigator. So I wanted to show how you can build a complex application with just the tools provided in the box and with very minimal code.
An underlying key difference between standard Domino development and XPages is the separation between the presentation and the data store. This change allows a developer to build applications they could not easily build previously, and also approach application design from a different angle. By taking advantage of this change and utilizing the built in XPage controls that exploit this separation, you can build sophisticated applications that were extremely difficult in the past.
The reason I chose a Survey tool was that a Survey Tool provides many challenges for Domino Designer:
- It must allow an administrator to create an unlimited number of questions
- Allow the Admin to change the order of the questions
- Select the type of input control to display: check box, radio buttons, text box, drop down list etc.,. and render them dynamically
- Provide dynamic validation
- Provide dynamic navigation: one question per page, all per page
- Report on the data
You can download my presentation, which covers the design details, here: Lotusphere 2009 presentation - AD207
You can download the SurveyTool.nsf application here (requires registration): Lotusphere 2009 sample application - SurveyTool.nsf
Here's a couple of screen shots:
- Administering questions for a survey. Note that multiple questions can actually be edited at the same time because they are independent docs:
- editing questions by clicking on the individual edit links:
- Taking a survey showing all questions on a single page:
- The same survey except configured to show only one question per page:
- Reporting on the survey by using the dojo toolbox provided with Domino 8.5:
This application is not 100% complete, for example access control needs to be worked out, but it's a great example app to learn some advanced XPage techniques from.
I hope you enjoy it as much as I did presenting it....