If you’re coming to XPages from traditional Domino development, it’s a bit of a steep learning curve. But once you’ve got comfortable with SSJS and the partial refresh lifecycle, you should be looking to move to Java.

Even though the Java compile-time validation is much tighter and avoids a lot of inadvertent errors from SSJS (forgetting to add “var”, for example), there are some challenges and some gotchas. The OpenNTF Domino API was designed to overcome some of the Notes-specific ones. But there are also a bit of a learning curve with things like string comparisons, number handling, and date handling. StackOverflow and Google answers a lot of queries, but you can still make coding errors that aren’t captured.

But there is a solution.

We’ve been using FindBugs for a little while now with the OpenNTF Domino API, but Domino Designer isn’t based on the latest version of Eclipse. Also, the NSF can’t be queried in the same way a normal Eclipse-based Java project can.

But Christian Güdemann has done an excellent job making the necessary tweaks to get FindBugs working for NSFs. If you’re starting out on Java or don’t yet consider yourself an expert, you need to use it. It won’t check SSJS – SSJS is just text strings parsed at runtime by the XSP Command Manager – only Java. So just go to the OpenNTF project and install it into Domino Designer. Christian has done a great job in providing a link to drag and drop into the sidebar to install it. Then just open (and compile) your database, go to the Package Explorer, right-click the NSF and choose Find Bugs > Find Bugs. Once it’s run, switch to the Find Bugs perspective and review the findings.

I can’t speak highly enough of the project.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.