Creating templates

Using a template, you can establish design standards for use throughout your company. In large companies, a central development group usually designs and manages templates to provide consistent designs and speed up distribution of new databases. Use a template to standardize similar types of applications -- for example, all discussion databases -- or to store individual design elements, such as fields, forms, views, folders, navigators, and agents that you can use in a variety of applications.

To customize a Domino® Designer template, choose File - Application - New Copy to copy the original template and inherit the original design. Give it a different file name in the Copy Database dialog box to prevent future releases from writing over your customized template.

Here's a list of changes you might make when you customize a Designer template:

  • Leave the original Designer template properties alone so that existing databases that inherit their design will continue to be synchronized with the template.
  • Change the newly copied template file name in the Copy Database dialog box (change File - Application - New Copy) to a name that indicates its intended use.

  • Change the newly copied template name (choose File - Application - Properties) to a name that indicates the new template's purpose.

  • If existing databases that inherited the original Designer template design need to inherit the design from the newly created template, edit the database properties of those databases to reflect the name of the newly copied template.

Advantages of standardizing with templates

  • Anyone can quickly and easily create a new database

    Users need to know only one menu selection: choose File - Application - New. They never have to modify the design and don't need to know anything about database design.

  • Developers and experienced users can save design time

    Forms, views, and agents copied from a template require no additional design work or updates. Using a pre-designed form or view that contains complex formulas or a large keywords list reduces the chance of design errors and requires less testing time before a database is rolled out.

  • Databases appear consistent to users

    View, forms, and fields associated with a template use the same names in all databases. This allows users to apply their knowledge of one database to many databases.

Design considerations

  • The template usually does not control the database icon, the About This Database document, and the Using This Database document. If you want an icon, About document, or Using document to inherit all design changes, go into Designer, choose Other - Database Resources, select the icon or document, and make change in the Properties box so that changes are inherited from the template. The default is not inherited. You can also change these design elements by manually copying and pasting the redesigned elements into databases linked to the template.
  • Do not create private agents or folders in templates; their changes can't be distributed automatically. If a private agent or folder exists in a template, you receive error messages when the design is refreshed/replaced. In the case of a shared/private-on-first-use folder: if the folder in the template has been opened or tested, a private folder exists and that folder generates errors when you try to refresh a design.
  • Databases that inherit their design from a template you create do not contain the ACL entries LocalDomainServers and OtherDomainServers. You must add these entries to the template with brackets as follows: [LocalDomainServers] and [OtherDomainServers].

Creating a Single Copy Template

When a database is created from a template, all of the design elements are copied to and reside in this new database. In an environment where many databases inherit from a single template, such as a mail template, the redundancy of data is apparent. The Single Copy Template (SCT) feature in Domino® Release 6 and later, when enabled in a template, results in the replacement of design elements in the inheriting databases on the same server with pointers or reference notes. These reference notes point to the associated design element in the template in a fashion that is transparent to the end user. In this way, design notes are stored only once on the server. Any modifications of design elements in a database inheriting from a single copy template will result in a full copy of that design note in the database.

When databases and/or replicas are created from a single copy template they will initially contain full design notes. It is the Design task which performs the work of creating and removing reference notes from a database. Reduction of database size (disk space) is a major advantage of using single copy templates and will be realized upon compaction of the databases.

To create/enable a single copy template

The following is the recommended way of creating a single copy template:

  1. (Recommended) - Identify a template on a server to be designated as a SCT (mail6.ntf for example). Create a copy of this template (named mail6sct.ntf) to a local area.
  2. Open the Database Properties box (File->Database->Properties) of this new copy (mail6sct.ntf) and in the Design tab, change the template name from StdR6Mail to StdR6MailSCT. You may opt to have this new template inherit design changes from the original, StdR6Mail. Also, click the checkbox labeled "Single Copy Template".
  3. Copy this template back to the server.
  4. Change the inheritance of any/all databases which inherit from mail6.ntf (StdR6Mail) to mail6sct.ntf (StdR6MailSCT). This can be done most easily through use of the convert utility as follows (recommended with the server down):
    1. Convert all user files in the 'mail' subdirectory that currently inherit from StdR6Mail to use mail6sct.ntf
         	$ nconvert   mail\*.nsf   StdR6Mail   mail6sct.ntf

    Refer to documentation on the convert utility for additional information.

    Tip: On Unix systems, use the convert command "convert" rather than "nconvert".

You can also do the following to create a single copy template:

  • Identify a template on a server to be designated as a SCT (mail6.ntf for example). Enable Single Copy Template on this template by selecting the Design tab of the Database Properties box and checking the box labeled 'Single Copy Template'. The next time the design task is run, design elements will be replaced with reference notes in each database which inherits from mail6.ntf. The design task typically runs as a scheduled task overnight, but can be invoked on the server console as follows:
> load design

Disabling Single Copy Template

Should a template designated as a single copy template become corrupt, it is simply a matter of converting the user files back to use the original template. To disconnect a database from a single copy template so that the database contains full design notes rather than reference notes, perform the following depending on the deployment method used:

  1. If method 1 was used, then the original template (mail6.ntf) is still intact and unmodified. Any/all users can be converted back to use this template as follows:
    1. Convert user John Doe's mail file back to use the original template.
         	$ nconvert  mail\jdoe.nsf  StdR6MailSCT  mail6.ntf
    2. Convert all users' mail files in the 'mail' subdirectory back to use the original template.
         	$ nconvert  mail\*.nsf  StdR6MailSCT  mail6.ntf

2. If method 2 was used, open the Database Properties box of the template (mail6.ntf) and uncheck the "Single Copy Template" checkbox. Run the design task to place full design notes back into the database.

   	> load design
Note: In addition to these methods, administrators may want to make an OS-level copy of a template, and store it in a "safe" place. It is small, and is easily restored.

Notes/Restrictions

  • Templates and databases to be designated as Single Copy Templates must be Notes® Domino® ODS (43).
  • Templates that have ever been marked as Single Copy Template cannot be deleted. This is to prevent unresolved references. They must be deleted at the OS-level, if desired.
  • A template that has ever been marked as Single Copy Template cannot have its design replaced at this time.
  • Do not change the name of the single copy template since databases which reference the template may lose their association.
  • Major conversions to/from SCT should be performed with the server down or during hours when server activity is low.

Example