Manage Learn to apply best practices and optimize your operations.

How to protect your Lotus Notes application design

SearchDomino.com member Jim Mck explains how to hide your Lotus Notes database design, so no one can make design changes or copy your application's source code.

Lotus Notes developers are often concerned about the security of their Lotus Notes application design, especially when an application is about to be rolled out to users. Even in the case when developers are packaging and selling their own Lotus Notes applications, they don't want to give away the source code along with it.

This tip provides an easy method that hides the design of the Lotus Notes database when you are rolling out an application or selling it. When the Lotus Notes database design is hidden, no one can make design changes or even display the design by making a copy of the database.

Be sure to take a note of the following things before hiding the design of your Lotus Notes database:

  • Hiding the design disables all the design capabilities for the database. So make sure that you have a template or a copy of the Lotus Notes database where the design isn't hidden, or you won't be able to make any changes.
  • As a Lotus Notes application developer, you might not have the necessary Domino Directory permissions to change any or all the security related settings. If you don't, seek the assistance of a systems administrator who is skilled in this area.

Now follow these steps to hide the design of a database: 

  1. Create a Lotus Notes database template.
  2. Create a new Lotus Notes database using the template.
  3. With the new Lotus Notes database selected, choose File -> Database -> Replace Design from the Lotus Notes menu.
  4. Select the template you used to create the Lotus Notes database and choose Hide Formulas and LotusScript.
  5. Make sure to select Inherit Future Design Changes.
  6. Choose Replace and Yes to confirm the replacement.

Now the next time you roll out or sell an application, you won't have to worry about your source code being copied.

MEMBER FEEDBACK TO THIS TIP

We were hiding the design of our Lotus Notes applications but ended up having several problems when we sent out template updates to our customers. The design either did not update at all, or duplicate design elements were placed into customer applications

We then had to add tools to our applications to deal with and remove duplicated design elements after a design update. In the end, we decided not to use hidden designs anymore due to the problems we encountered.

According to Lotus Technote #1087252, "Replacing design with template containing hidden design does not delete existing design elements," Lotus has no plans to address these issues.
—Alex E.

******************************************

This is not a guaranteed way of hiding the Lotus Notes application design. Anyone savvy enough to write about 10 lines of LotusScript code can do it, while using some of the Lotus Notes API calls to get around this. A better way is to remove the LotusScript source code altogether, leaving only the compiled code. Create a copy of the template locally, and run this script from another Lotus Notes database:

 Function RemoveAllScript( Byval szFilename As String ) If debug Then On Error Goto erh Dim db As New NotesDatabase( "", szFilename ) Dim dc As Variant 'Dim doc As NotesDocument Dim docTmp As NotesDocument Dim dbDesign As DatabaseDesign Set dbDesign = CreateDatabaseDesign( db ) dc = dbDesign.databaseScriptDocuments dc = dbDesign.alldesigndocuments If Not Isnull( dc ) Then Forall doc In dc Dim bModified As Integer bModified = False If Not doc.hasItem( "$Class" ) Then If doc.HasItem( "$$AssistAction" ) Then bModified= True doc.RemoveItem( "$$AssistAction" ) End If If doc.HasItem( "$ScriptLib" ) Then bModified= True doc.RemoveItem( "$ScriptLib" ) End If ' If bModified Then doc.sign doc.save True, False End If ' End If End Forall End If Set dbDesign = Nothing Set db = Nothing Exit Function erh: Msgbox "Error in RemoveAllElements on line " & Erl & " : " & Error$ End Function

The CreateDatabaseDesign method can be found in the LotusScript library.
—Simon D.

******************************************

You don't have to create a new Lotus Notes database from the template. After you've created the template, you can replace the design of the already rolled out Lotus Notes database. In the window where you have to choose the template, you can check Hide, etc.
—Koos V.

******************************************

As far as I know, the Lotus Notes application design can be unhidden by only changing a hexadecimal byte to "00." The code will still remain protected though.
—Noel R.

Do you have comments on this tip? Let us know.

Related information from SearchDomino.com:

This was last published in February 2007

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchExchange

SearchContentManagement

Close