Skip to main content link. Accesskey S
  • Anonymous
  • Log on
  • Help
  • IBM logo
  • Lotus Notes and Domino Application Development wiki
  • All Wikis
  • Home
  • Community Articles
  • Product Documentation
  • Learning Center


Search

Advanced Search

Categories

Tag Cloud

  • 6.0
  • 6.5
  • 8.0
  • 8.5
  • 8.5.1
  • 8.5.2
  • action bar
  • Agents
  • Ajax
  • app dev
  • Application
  • beginner
  • C&S
  • calendaring and scheduling
  • client
  • components
  • composite applications
  • Controls
  • converters
  • css
  • Custom controls
  • Data Binding
  • db2
  • design elements
  • dialog boxes
  • Documents
  • Dojo
  • Domino
  • Domino Designer
  • Domino Designer 8.5
  • DXL
  • Eclipse
  • error handling
  • errors
  • extensions
  • FAQ
  • Forms
  • formulas
  • getting started
  • globalization
  • Help
  • html
  • Installation
  • interface
  • internationalization
  • Java
  • JavaScript
  • JSF
  • localization
  • Lotus Domino Designer
  • LotusScript
  • LotusSphere
  • LotusTechInfo
  • menu bar
  • Mobile
  • new user
  • Notes
  • Notes 8
  • notes.ini
  • NSD
  • oneui
  • OpenNTF
  • partial update
  • performance
  • Pickers
  • Portal
  • presentations
  • programming
  • Redbooks
  • Requested Articles
  • roadmap
  • rooms and resources
  • samples
  • security
  • templates
  • themes
  • Tips
  • troubleshooting
  • tutorials
  • validation
  • variables
  • video
  • VideoFest
  • View
  • view control
  • ViewPanel
  • Views
  • web
  • Web apps
  • Web services
  • webdev
  • x-pages
  • XML
  • Xpage
  • XPages
  • XPages Extensibility API
  • XPages Extension Library
  • xsp-config
  • データソース
  • 九州地区ノーツパートナー会
InformationInformation
You are currently viewing machine translated content. IBM translation might be available. Click IBM Translated Product Documentation to see what is available.X


Home > IBM Redbooks: Lotus Domino Development Best Practices > 2.4 Development
Rate this article 1 starRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

2.4 Development 

expanded Abstract
collapsed Abstract
No abstract provided.
ShowTable of Contents
HideTable of Contents
  • 1 Coding practices
  • 2 Version management
  • 3 Unit testing
Previous | Next

In this section we have a look at how you can fine-tune your coding and development process to optimize your application development and its performance.

Coding practices


Best coding practices for software development can be broken into many levels based on the coding language, the platform, the target environment, and so on. Using best practices for a given situation (in our case Domino and XPages) reduces the probability of introducing errors into your applications, regardless of which software development lifecycle (SDLC) model is being used to create that application. In a team environment, best coding practices ensure the use of standards and uniform coding, reducing oversight errors and the time spent in code review.

Some of the best coding practices that you can use are:
  • Use a uniform standard and naming convention across all the code.
  • Have code reviews involving multiple developers.
  • Unit test all code.
  • Have proper documentation, including generous amounts of code comments.
  • Use script libraries to prevent duplication of functions, constants such as view and item names, and common datatypes and enumerations.
  • If you write LotusScript or JavaScript, use object-oriented coding techniques.
  • Avoid goto statements and overly deep levels of nesting.
  • Limit modules to a reasonable length; generally not more than 60 lines.
  • Simplify and optimize your code as much as possible.
  • Remove unnecessary code before deploying.
  • If you write LotusScript, use Option Declare, which cuts your initial coding errors by half. There's an option in the editor which automatically inserts this statement for you.

For general coding best practices, we recommend doing some reading on the subject, for instance in such works as The Elements of Programming Style by Brian W. Kernighan and P. J. Plauger.

We discuss more about XPages development best practices in 4.6 Optimizing XPages using custom control.

Version management


For an effective tracking and proper maintenance of your code, you should use a version management system for your applications. In Lotus Domino Designer 8.5.3, a new source control feature has been provided which helps you to do version management out of the box without using the external plugin that you had to use earlier. This feature has been introduced to let you store NSF based design elements into a source control repository and perform common source control operations using Lotus Domino Designer. Using this feature, you can create an association between an on-disk project managed by the source control and the virtual NSF based project that your Designer recognizes and tracks.



To use this feature, follow these steps:
  1. Install and configure the open-source version source control systems and create and configure a repository.
  2. Associate your application (NSF) with an on-disk project (ODP) or create a new one.
  3. Commit your changes from Designer on-disk project to the repository.
  4. Ask your team to retrieve on-disk project from the repository and associate their databases with the on-disk project.
  5. Modify either NSF or on-disk project (ODP) and synchronize the two files.
  6. Commit changes to repository and ask other team members to download and sync their local files.

Unit testing


Unit test is the first and most important level of testing in the software development lifecycle. It is usually done by the programmer, and it is their responsibility to make sure that their piece of code passes through without any errors and is compatible with the rest of the application. You can save a lot of effort and resources in the long run if all the programmers in your team do their quota of unit testing thoroughly.

In order to make the unit testing effective, first of all, make sure that it is followed rigorously by all the team members and have and allot sufficient time for them to test.

You can refer to this link for details on what, why and how of unit testing http://en.wikipedia.org/wiki/Unit_testing.

The Domino open source website, OpenNTF.org, contains multiple projects with free tools to assist in unit testing of Notes and XPages applications.

Parent topic: 2.0 Application development lifecycle

expanded Article information
collapsed Article information
Category:
IBM Redbooks: Lotus Domino Development Best Practices
Tags:
Redbooks

This Version: Version 2 January 9, 2012 4:11:15 PM by Amanda J Bauman  IBMer

expanded Attachments (0)
collapsed Attachments (0)

 


expanded Versions (2)
collapsed Versions (2)
Version Comparison     
Version Date Changed by               Summary of changes
This version (2) Jan 9, 2012 4:11:15 PM Amanda J Bauman  
1 Jan 9, 2012 2:45:38 PM Amanda J Bauman  
expanded Comments (0)
collapsed Comments (0)
Copy and paste this wiki markup to link to this article from another article in this wiki.
Go ElsewhereStay ConnectedSubscribe to RSSHelpAbout
  • All Lotus and WebSphere Portal wikis
  • IBM developerWorks
  • IBM Software support
  • IBM Social Business User Experience Blog
  • IBMSocialBizUX on Twitter
  • IBMSocialBizUX on Facebook
  • Lotus product forums
  • IBM Social Business UX blog
  • IBM Collaboration Solutions
  • Recently added feedRecently added
  • Recently edited feedRecently edited
  • Recently added comments feedRecently Added Comments
  • Wiki Help
  • Forgot user name/password
  • Wiki design feedback
  • Content feedback
  • About the wiki
  • About IBM
  • Privacy
  • Contact IBM
  • IBM Terms of use
  • Wiki terms of use