
Len Barker
by Len Barker, Managing Partner – Lotus Practice
Did you ever notice that it is a lot easier and more enjoyable to cook a gourmet meal when you have nice appliances, cookware and specialty tools to work with? I mean, a good chef will produce a pretty good meal regardless, but in order for the customer and the chef to have an exceptional experience, you really need the right tools.
The same is true for creating web sites and web applications. Give a good web developer a text editor and some pretty good results can be created. Give a good web developer the right appliances and tools and exceptional results will be delivered.
Seven Hills Dance Studio in Lynchburg, Virginia, has been providing dance education to young people for over 70 years. My daughters have been students there for the last 14 years. Recently, the studio management asked me if I would be interested in developing their new website. The initial idea was to create a simple website using the tools provided by their hosting company. Being a professional developer of sites that improve productivity, I couldn’t force myself to simply create a static website. I found myself asking questions like, “Wouldn’t parents like to login and find the phone numbers of other students in their child’s class? Wouldn’t it be nice for management to edit any page of their website, in-line, and not have to call me to make changes?” And, “I am sure the ability to create news and alerts that automatically show up on the home page for the dates that you specify would be a powerful website function, right?”
Of course they said yes, and I quickly abandoned the hosting company and decided to create the site using IBM Lotus XPages.
XPages was the logical choice of development tools for several reasons:
- I am a Lotus developer and know this tool
- I only had 40 hours to complete the entire project
- I needed an authentication mechanism
- I needed document level security
- In order for the results to be exceptional in such a short time, I needed really good tools with modern web 2.0 capabilities.
The following are some lessons learned from this project:
Keep it simple.
You can make an XPages project as simple or as complex as you like. It is tempting to create a fancy application that is completely dynamic and uses very few XPages components. If you are new to XPages, this approach will cause you to waste hours of time and curse your choice of using XPages. Create one XPage for each page in your website and use custom controls for the components that will be on each page (e.g. menu, footer, etc).
Use the XPages References
The amount of good examples and reference material for XPages has grown enormously in the last year. Don’t waste too much time figuring out how to do something, look it up!
Be careful with Scoped Variables
Scoped Variables are a great way of storing information about the user as they click through the website. You may want to store the value of the last page opened in a variable so that the user is returned to the correct tab after opening a dialog box, for example. If you store the variable in the wrong scope (e.g. viewScope instead of requestScope) you may find that the value is used by many user sessions on different PCs. You should test for this.
Get your custom controls finished before you create too many XPages
You will save a great deal of time and make site maintenance far easier if you create your custom controls wisely. A good rule of thumb is that the XPage is simply a container for custom controls. There should be little or no content directly on the XPage. It may take a couple of iterations to get the custom controls designed the way you want. You don’t want to create your custom controls, put them on ten different Xpages and then make a fundamental change to your custom control design. You will then have to delete all of your XPages and create them with your new custom controls. For example, I used the following custom controls in my design of the home page:
- ccBanner (used for banner at top of page)
- ccLoginControl (used to allow user to login/logout)
- ccMenu (used for top navigation menu)
- ccStaticContent (used for displaying static content that can be edited by an admin)
- ccNews (used for displaying a news/alerts feed)
I am very happy with the speed that I was able to create the project, and the Dance Studio is thrilled with the look and control features available on their site. The website will be live by the end of April at http://www.sevenhillsdance.com.
Davalen offers custom XPage development classes that teach users how to create the most powerful websites on for their business needs. Send us an email if you would like more information.
