09.20.2018

How a SmartNSF custom route can be used to create a redirector, in my case to open the corresponding Notes-document

Tags: SmartNSF Java
0

I am – to nobody’s surprise – a big fan of SmartNSF. Here the other day I had to come up with a solution to make a web-URL redirect to a Notes-URL (you know, notes://…) and thus open a document in the Notes client. Why? A modernized Notes application surface it’s data on the web, but the users still needs to be able to see the real document in the Notes client. There are several ways to do this with traditional Notes development. However, I wanted to see how I can do this with a simple java class, all controlled by a SmartNSF custom rule.

For example, the URL http://someserver.com/DocumentDatabase.nsf/xsp/.xrest/doc_v1/5921-A4 will grab the document ID “5921-A4” and lookup the document behind the scenes, and grab the NotesURL such as Notes://SomeDominoServerName/C12573EF007A4D9D/B3612539371CB37AC125830D002A4BF9/67FD0734318B98A4C12582B900208F1F. The latter URL will normally open the specified document UNID in the Notes client, at least after you have confirmed security warnings like these;

image

How is it done?

03.06.2018

How SmartNSF came to rescue in a heavily surveilled little (bird) house

Tags: Lotus Domino SmartNSF
0

One small hobby project of mine is a birdbox with an wifi enabled IP Camera. Much more fun to watch those small house sparrows build their nest and see how hard they work to bring up new kiddo-birds Smile

image

The images from the web camera surfaces on an web page, and everything worked fine last year.

IMG_8805

However, firing up the camera this year, nothing showed up! After a quick look at the Chrome console, I quickly realized that the old and trusty IFRAME no longer worked as it used to. First and foremost I have enabled SSL on the site (with Let's Encrypt, using Windows ACME Simple (WACS), I'll create a blog post on that too in the near future) and it turns out that HTTPS won't allow IFRAMEs to use HTTP-based content at all. The concept is called "Mixed Active Content", read more about that here if interested. The built in web server on the web camera can't use anything else but plain old http …

While there probably are many other solutions to this challenge (feel free to chime in if you know!), this article describes how I used SmartNSF to call a small java-class, wrapping the whole HTTP-call nice and easy. A side effect was that I also could hide the inner workings of the IP camera completely! No more user name and password exposed in HTML Smile.

If you don't know SmartNSF, it is very briefly an extension to both your Domino server and to your Designer client, enabling you to create powerful REST Services supporting full CRUD in minutes! While you of course can do much of the same with the built-in Domino Access Services (DAS), you have much better control with SmartNSF. In my opinion, one of the most important things to happen with Notes/Domino in years.

Read more to see how I enabled SmartNSF to solve this challenge!

10.31.2017

Wow! SmartNSF (BETA-5) can now call java directly, and work with the parameters with ease!

Tags: Lotus Domino Java SmartNSF
0

This evening it was time to test the latest and greatest version of SmartNSF – BETA 5. When you have installed it (via an updatesite database for the server) and via a local update site in your Designer, you get some cool new features. First of all, intellisense seems to work very good so now it is much easier to get the available methods etc.

But, the really cool feature in this version is the support for CUSTOM strategies. This means that you can define a route like this (the example below is directly from the discussion.nsf sample database enclosed in the SmartNSF zip);

SNAGHTML2c2833ab

The URI infos will call the Info-class in the package org.opennrf.smartnsf. This means that an URL like  http://www.vcode.no/test/discussion.nsf/xsp/.xrest/infos (note; URL is shown just for illustration purposes, and is not active) will call the java code shown below;

image

(Click on image to enlarge)

Tags

Calendar