In today’s high productivity business environment, all the application development, including the Domino applications, are expected to deliver consistently effective results in an optimum manner. In all application development activities, source code development requires a major labor effort. The Template (.ntf) is associated with Notes and Domino as a mechanism for source code control management processes. It is imperative to manage the source code using templates to achieve cost effective results in a consistent manner. The benefits of template are not just limited to the new application development but also for the enhancement of the existing applications. If your application is identical, or similar to, an existing template available in your Domino application portfolio, the most convenient way to create a new application is to use that template as your starting point. This is a common scenario where the new application requires almost all features similar to an existing template. There could also be some scenarios wherein you need features to be inherited from a cluster of templates.
The following are scenarios of using templates:
- Application level inheritance:
It is not uncommon that the business wants to deploy several applications that all use the same code features. However, certain work-groups, for example, a product quality department, would want to maintain their own set of data to be managed privately. Instead of maintaining separate copies of application code for each department, best practice for the development team is to separate the databases for each department and have the applications that inherit the code or design from a common master template. This approach allows each work-group to maintain their private data but share the same code. Any future improvement in the application features is to be implemented only in the master template. You can configure the Database (see the figure below) so that the design refresh task would automatically propagate the changes over to all applications that inherit this template.
- Design level inheritance
It is common for a Domino applications in a portfolio to have several common features and also has its own distinct features simultaneously. The best approach in using templates in this scenario is as follows:
- The application inherits its design through the database level inheritance activated in the database property "Inherit design from master template" for the major functions.
- The additional features in this application could be inherited from more than one template.
- Create a new master template and have the code inheritance at the design level that allows certain design elements inherit its code from one template and others from another template (See the figure below). Such design elements need to be copied and pasted from the master template to the application. These design elements would update itself automatically whenever the design in the master template has been changed.
- Template documentation
Templates are used among work groups and it is important to document each template clearly. It helps the source code version control management process. All templates should incorporate documentation. It is a good practice to document your work especially when you are working with templates that might have many developers working in conjunction to build the finished product. Using the built-in documentation that Domino provides can greatly enhance your template in the long run. Examples of built-in documentation include:
- About This Database
This mode of documentation introduces the template to all users. It describes the purpose of the template, who might use it and when, and the recommended access control settings for databases created with the template. The best practice to document about the template in About this Database is to divide it into two logical sections. The first section list down the features and functionality that is built-in to this template. It also list down the version history details (for e.g. Version Name, Number and Date) and the development team responsible for maintenance of the template. The second section has the technical details or embedded a technical specification document. This helps the team members old and new to be aware of the technical implementation of the design.
- Using This Database
The Using This Database document gives instructions about the usage of the application and its features. It has to be updated with more focus to the end user of the application. The document list down the steps and procedures to carry out the activities to make use of the features offered by the application. The application information in this section is expected to be the user manual for the end user training on this application.
Parent topic: 4.0 Coding techniques