How can I hide the lotusscript code contained in an nsf database

Dear All,

I have implemented a Lotusscript application in a database (in an .nsf file).

This database is going to be delivered to my customers.

However, I would like to hide my code which is contained in the database.

Is it possible to encrypt/encode an entire .nsf file? Do you have any suggestions for this purpose?

Thanks a lot for your support.

Mikaël Donini, Arkadin France.

Subject: How can I hide the lotusscript code contained in an nsf database

You should be doing your development in a Template file (.ntf) and then Replacing the design on the version you deliver to the customer (.nsf).

As part of the Replace process, you can select to Hide the design, which will strip out all formulas and lotus script source code - it’s an option at the bottom of the Template Selection dialog.

Make sure you have backups. If you accidentally do this to your template, it cannot be undone.

Subject: RE: How can I hide the lotusscript code contained in an nsf database

Thanks a lot Graham.I am going to put in place it !!

Regards,

Mikaël.

Subject: RE: How can I hide the lotusscript code contained in an nsf database

You should be aware of the side effects, though. Hidden design and refreshing applications from templates don’t play nicely with each other.

Subject: RE: How can I hide the lotusscript code contained in an nsf database

Don’t they? Why not?

Subject: RE: How can I hide the lotusscript code contained in an nsf database

The problem I see is, that a template itself cannot have a hidden design. As soon as you replace the design of an ntf file with the option to hide formulas and script enabled, this ntf file will lose its template status.

Therefore, you cannot send your customer a template for a future design update. If the template had a hidden design, it would no longer be a template, thus any refresh/replace action was impossible. If the template had an open design, the customer could replace the design and check the box to hide formulas and script, but obviously, they already have a template with an open design then.

For me this qualifies for the label “don’t play nicely with each other”, unless I missed something.

Subject: RE: How can I hide the lotusscript code contained in an nsf database

Of course a template can have a hidden design.

Subject: RE: How can I hide the lotusscript code contained in an nsf database

Fine.

Subject: RE: How can I hide the lotusscript code contained in an nsf database

But I still don’t see how to do it.

An ntf file can have a hidden design and it can be used to replace the design of any given nsf file. O.K. But I still think that it cannot be a master template (having a template name). But well, replace will be probably be as good as refresh, if you need to roll out a new version to the customer.

Which leaves us with this issue:

http://www-1.ibm.com/support/docview.wss?uid=swg21087252

Still trying to bend my brain around how to “manually remove” a view from a database after its design has been hidden …

Subject: RE: How can I hide the lotusscript code contained in an nsf database

You create a “working template” with exposed code, then create a “distribution template” from the working template. You are right in assuming that there needs to be at least one database somewhere that contains exposed, editable code, but that database doesn’t need to be the template you’d distribute to customers.

Subject: RE: How can I hide the lotusscript code contained in an nsf database

Again: Maybe I’m just picky (or wrong) about wording, but the “distribution template” with hidden will never have a master template name. Right or wrong?

Of course, you cannot see that from the design tab of the properties dialog, since it will be grayed out, but any attempt to refresh the target database from the distribution template will fail.

Subject: RE: How can I hide the lotusscript code contained in an nsf database

Sure it can – you can add a template name to ANY database to make it a master template using the database properties. The usual procedure is to create a database with a blank template and an NTF extension to start, then replace the design, deselecting “inherit future changes” and selecting “hide formulas and LotusScript”.

Subject: RE: How can I hide the lotusscript code contained in an nsf database

No, the distribution template can have a master template name. The field is not disabled.

Subject: RE: How can I hide the lotusscript code contained in an nsf database

Stan and André,

shoot me, but as soon as I hide the design of any database, be it an nsf or ntf file, I can no longer access the Design tab of this file’s database properties. It’s grayed out completely and consequentially I can not assign a master template name through the UI.

I create dev.ntf as the working template and assign it a master template name.

Next I create dist.ntf from the standard “-Blank- template”, then replace its design from dev.ntf, choosing to not inherit future design changes and to hide scripts and formulas.

I end up with an ntf file which I cannot assign a master template name.

Now, sure enough, I can create prod.nsf, base on dist.ntf. dist.ntf will show up in the New Database dialog (because the file name ends in .ntf) but with the blue book icon, not with the green template icon (indicating, that the file does not have a master template name). I can not refresh the design of prod.nsf. If I try to, the pop-up message says “Design refresh failed” and the status bar adds to that “Cannot Refresh design of the Database ‘Production’ - Design Template is not specified”.

Is this any different from what you see? I can’t imagine that, this is soooo basic.

I admit, that it is possible to refresh the design of a production database from an ntf file with hidden design. So, taking aside the problem of how to remove design elements, my initial concern was probably not appropriate and somewhat influenced from problems I had in the past (could have been caused by my own mistake or some issue in one specific release). But still, I - no matter what I do - can NOT add a master template name to a database with hidden design.

Subject: RE: How can I hide the lotusscript code contained in an nsf database

You need to give your dist.ntf a Master Template Name BEFORE you do the first replace design from dev.ntf; i.e. the one that hides the design.

Cheers,

  • Mike