Hiding a LotusScript Library

This section illustrates how to hide a LotusScript library from a database design. This is sometimes done to protect proprietary or sensitive code. When implemented, the library is no longer visible or accessible in the database design. All code is stored externally to the database in an ASCII text file that is referenced at compile time. Code that is managed in this fashion cannot be viewed in the Designer client or traced from the Lotus Notes client.

Its important to note that because the code is stored and managed externally to the Designer client, this means that the syntax checking, colors for LotusScript keywords, and the "type-ahead" features incorporated into the Designer client will not be available. Using this approach, the source code will be managed in a text editor such as Microsoft Notepad.

Warning

Be sure to back up and store the LotusScript source code in a secure place when exporting it from the database design. If it becomes lost or corrupt, you will have to rewrite it from scratch. Depending on the complexity of the source code, this could prove to be a virtually impossible task and may also prevent future support for the database design.


To implement this technique, complete the following steps.

Step 1.

Open the database in the Domino Designer client.

Step 2.

Locate and open the LotusScript library. Select the File > Export menu options. When prompted, provide the file name and include the .lss extensionsuch as LotusScriptWebLibrary.lss (see Figure 19.19). Click Export to continue with the process.

Figure 19.19. Export LotusScript library dialog


Step 3.

Select the scope of the exportsuch as All objectsand click OK to export the source code to an ASCII text file (see Figure 19.20).

Figure 19.20. LotusScript Export Options dialog


Step 4.

Confirm that the text file was created and that it contains the desired source code.

Step 5.

After you have confirmed that the library was exported and that the text file contains all source code, remove all LotusScript from the library, but do not delete it from the database design. Remove all functions, subroutines, and associated code from the Initialize, Declare, and other events. Although the code has been removed from the Designer client, you must retain the library for those design elements (forms, views, etc.) that reference the library through the Use Library directive.

Step 6.

Add the following statement to the Declare event in the LotusScript library. This should be the only statement in the section where PATH represents the directory location and FILENAME represents the name of the LotusScript export file from Step 2.

%Include "C:PATHFILENAME.LSS"


Step 7.

Select the Tools > Recompile All LotusScript menu options to compile the database and incorporate the source code back into the design.



An Introduction to the Lotus Domino Tool Suite

Getting Started with Designer

Navigating the Domino Designer Workspace

Domino Design Elements

An Introduction to Formula Language

An Introduction to LotusScript

Fundamentals of a Notes Application

Calendar Applications

Collaborative Applications

Reference Library Applications

Workflow Applications

Web Applications

Design Enhancements Using LotusScript

Design Enhancements Using Formula Language

View Enhancements

Sample Agents

Miscellaneous Enhancements and Tips for Domino Databases

Data Management

Security

Application Deployment and Maintenance

Troubleshooting

Appendix A. Online Project Files and Sample Applications

Appendix B. IBM® Lotus® Notes® and Domino®Whats Next?



Lotus Notes Developer's Toolbox(c) Tips for Rapid and Successful Deployment
Lotus Notes Developers Toolbox: Tips for Rapid and Successful Deployment
ISBN: 0132214482
EAN: 2147483647
Year: N/A
Pages: 293
Authors: Mark Elliott

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net