Skip to main content
    Country/region select      Terms of use
     Home      Products      Services & solutions      Support & downloads      My account     

developerWorks  >  Lotus  >  Forums & community  >  Best Practice Makes Perfect

Best Practice Makes Perfect

A collaboration with Domino developers about how to do it and how to get it right in Domino

Complete nonsenseI've been thinking about the comments people have been making about the difficulty of correcting performance due to poor design after the fact. You're making some excellent points, and I respect your experience with watching the evolution (or lack thereof) of customer applications.

It certainly sounds like nothing we can do as is effective in improving application performance, as making sure that the people who design them have every opportunity and encouragement to do things right in the first place. As you might have guessed from the title of my blog, this has been my interest all along.

There are two ways I can think of offhand to address this -- the first and, I think more important, is better education. The other is better, more automated tools that can be applied automatically during development.

Besides the discussion here, what got me thinking about this is an example from a customer where the word NULL was used in a formula -- not as a field name, but as if it had some special meaning. For the record, NULL isn't a special word in a formula. It's treated the same as any other name: if you have a field named Null in your document, it gives the value of the field, otherwise it returns "". Instead of NULL, you could use any other word which isn't a fieldname, such as Hüperdoo or Squizzle. In fact, these are better choices because it's less likely that someone will later add a field with these names, making your existing formulas fail. Instead, use "". Then the formula can't be broken by later design changes.

I kind of expect that nearly all of you already know this, but it serves to further my topic. I'm well aware that people don't all come up with this wrong idea independently. They're doing it because someone has taught them to do it (see cartoon). I hope, after all these years, it's not official education materials from Lotus, or Lotus-certified trainers. But to make sure of that, I've signed up to review the training materials that we're putting out with version 8.0 -- the update courses and (more important for our purposes here) the start-from-scratch classes. I think I'll try to talk Rocky Oliver into doing the same. It's not only whether the training mentions the things you need to know, but whether the code samples and exercise answers reflect good design.

I've long been doing the same kind of review of the Designer help -- as I mentioned recently as regards supplying a date to the Search method -- but there is kind of a lot of it and only one of me, so I want to again urge you, if you see something in the help that you know is dumb, please use that feedback link.

The other side of education is certification. I'd like it to be difficult to get certified without a grounding in best practices. So I signed up to review the certification test questions also -- I'll probably suggest some additional ones, but don't worry -- there will be no puns. (Note: they might require me to take the version 7 update exam first. Heh.)

Then from the tools standpoint -- what I would really like to see someone come up with is a product that we might call, let's say, "Training Wheels for Lotus Notes." Whenever you went to save a design note, it would execute some code to analyze the information about to be saved, and come up with a screen of warnings. "Field 'Retry_d' is Computed, but it's just a copy of 'Retry'. You should probably make it 'Computed for Display'" or "Action 'Add Comment', Sub MarkAll, line 14: See Designer help for performance advisory on GetNthDocument method." The user could then opt to save or keep editing (and if the screen of warnings could stay up while they're editing, for reference, that would be ideal). Some of these hints might require longer explanations that the user could read by clicking a link: "The use of @Now and @Today in a view selection formula will drastically slow your application. Click here for details and alternative design suggestions."

Andre Guirard | 10 May 2007 01:15:00 AM ET | Man-cave, Plymouth, MN, USA | Comments (10)

Search this blog 


    About IBM Privacy Contact