Home > Domino Tips > Developer > QuickTips > How to protect your Lotus Notes application design
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

QUICKTIPS

How to protect your Lotus Notes application design


Jim MC
02.22.2007
Rating: -3.66- (out of 5) Hall of fame tip of the month winner


Lotus Notes and Domino tips, tutorials and how-to articles
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


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:
VIEW MEMBER FEEDACK TO THIS TIP

  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:

  • Reference Center: Notes/Domino security tips and resources
  • Reference Center: Notes/Domino applications tips and resources

    This tip was submitted to the SearchDomino.com tip library by member Jim Mck Please let others know how useful it is via the rating scale below. Do you have a useful Lotus Notes, Domino, Workplace or WebSphere tip or code snippet to share? Submit it to our monthly tip contest and you could win a prize.

    Rate this Tip
    To rate tips, you must be a member of SearchDomino.com.
    Register now to start rating these tips. Log in if you are already a member.


    Submit a Tip




    Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



    RELATED CONTENT
    Development Security for Lotus Notes Domino
    Top 10 Lotus Notes/Domino coding and development tips of 2008
    Lotus Notes access error: 'database is not opened yet'
    Top 10 Lotus Notes Domino programming and development tips of 2007
    Verify Lotus Notes user access to Web pages
    A bevy of Notes/Domino development tips
    A smorgasbord of Notes/Domino development tips
    Ajax threats worry researchers
    New chapter and verse on Ajax security
    Java developers can't afford to ignore app security
    Creating Domino doclink buttons

    Lotus Notes Domino Application Development
    Create a dynamic user-driven navigator for a Notes/Domino application
    Top 10 Lotus Notes/Domino coding and development tips of 2008
    Lotus Notes Domino application development best practices
    Mimic Lotus Notes Domino application functionality on the Web
    Top 10 issues when developing Lotus Notes Domino Internet applications
    Top 10 Lotus Notes Domino programming and development tips of 2007
    Export Lotus Notes documents to Microsoft Word via Internet Explorer
    A bevy of Notes/Domino development tips
    Adding an action to the Lotus Notes right-click menu
    A smorgasbord of Notes/Domino development tips

    QuickTips
    View hidden fields on Lotus Notes/Domino forms
    A bevy of Notes/Domino development tips
    Merging views
    Stop an agent without shutting down the Amgr task
    Collapsing outlines
    How to make Notes view icons run code
    Find all databases associated with a template
    Verifying user's date setting and time zone on local PC
    Load design for a single database
    Options for changing passwords

    RELATED RESOURCES
    2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
    Search Bitpipe.com for the latest white papers and business webcasts
    Whatis.com, the online computer dictionary

    DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



  • Domino & Lotus Notes Security Solutions: Authentication, Antispam, Encryption and Antivirus
    HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
    About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
    SEARCH 
    TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

    TechTarget Corporate Web Site  |  Media Kits  |  Site Map




    All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
      TechTarget - The IT Media ROI Experts