Protecting your XPages Application
One of the hallmarks and success factors of IBM Notes was the openness of the design of all Notes applications. Since lots of people put blood, sweat and tears into their applications, Lotus added the possibility to hide the design of an application to protect it from spying eyes. While I don't like hidden designs I can understand the rationale.
Others keep their design open, but compile the LotusScript libraries with references to lss files outside, so the core business logic is protected.
Hiding the design doesn't work for XPages, you can poke around and get back to the source. So what are your options?
So how would a typical workflow look like? There seem to be quite some moving parts involved:
Others keep their design open, but compile the LotusScript libraries with references to lss files outside, so the core business logic is protected.
Hiding the design doesn't work for XPages, you can poke around and get back to the source. So what are your options?
- Keep your business logic in Java classes (Pojo, Beans, Managed Beans) and develop them outside of the NSF and transfer them as jar file only
- Deliver your custom controls as Extension Library (which can be deployed using an NSF) - which obviously requires advanced Skills
- Keep your XPages lean and handle the delicate parts in custom controls that you hide (see below)
So how would a typical workflow look like? There seem to be quite some moving parts involved:
- Develop and test your application as per normal. Keep items you want to protect in custom controls and Java classes
- Make sure you have your project build before doing the next steps
- Link your database to an On Disk Project for version control (but you do that anyway don't you?). Let's call that project "OnDisk Open"
- Have your target database (the one that you will deliver to your customer) setup in a similar way. Let's call that project "OnDisk Closed"
- Copy all elements you want to keep open (Forms, Views, XPages, CSS etc.) from OnDisk Open to OnDisk Closed
- Copy your Java source files and the generated Java source files for your custom controls (found in the Local directory, actually outside the NSF) in OnDisk Open to a src structure. Custom controls live in the xsp package. Your code lives in your packages
- Compile your Java
- Put all the compiled classes into a jar
- Copy that jar into the
/WebContent/WEB-INF/lib
folder of the OnDisk Closed project. At the first time: add this jar to the classpath of your closed.nsf after sync with the OnDisk Closed project - Copy the
.xsp-config
files of the custom controls you processed in the previous 4 steps into the/WebContent/WEB-INF/
directory (the same directory yourfaces-config.xml
is living in) - Sync the OnDisk Closed project with closed.nsf
- Build your closed.nsf - done
Read more
Posted by Stephan H Wissel on 24 July 2013 | Comments (4) | categories: XPages