358 Lotus blogs updated hourly. Who will post next? Home | Downloads | Events | Pods | Blogs | Search | myPL | About 
 
Latest 7 Posts
Adding Load Balancing to the nginx Setup
Sat, Sep 20th 2014 22
Generating JSON in XPages Applications
Thu, Sep 18th 2014 120
Setting up nginx in Front of a Domino Server
Thu, Sep 18th 2014 179
Designer Experiment and Feature Request: JSF Tools in Designer
Wed, Sep 17th 2014 107
Quick Tip: A View-Filtering Search Box
Tue, Sep 16th 2014 97
The Basic Xots Tasklet in the Blog
Sat, Sep 6th 2014 146
How I'm Handling URLs for the Blog
Fri, Sep 5th 2014 265
Top 10
The Trouble With Developing on Domino
Tue, Jul 8th 2014 411
Delving Into NSF Raw Item Data
Tue, Jul 29th 2014 277
"Build Automatically", "Refresh automatically", and "Team Development"
Thu, Jan 23rd 2014 270
Things I Rarely Use: sessionScope
Thu, Jul 3rd 2014 269
How I'm Handling URLs for the Blog
Fri, Sep 5th 2014 265
Domino SSL and Reverse Proxies
Mon, Aug 18th 2014 243
The Industry's Vileness
Tue, Jul 22nd 2014 237
Platform Defensiveness
Fri, Jul 18th 2014 224
XPages Data Caching and a Dive Into Java
Wed, Jul 2nd 2014 216
My Black Magic for the Day
Fri, Jul 4th 2014 212


Moving From Ruby-in-XPages to Polyglot
Jesse Gallagher    

I've tweeted about this a couple times, but in some of my spare time lately I've put together a new, cleaner implementation of the generic-scripting-language support I first created back when I did my original work with Ruby. I named the new project "Polyglot" and it has two facets: The aforementioned generic-scripting-language support, done more cleanly and with better capabilities. A method for storing standalone page-generating scripts as documents in the database that are executed in the context of an XPage. Generic Scripting Languages With the usual when-I-get-around-to-it caveat, I plan to use Polyglot to entirely supplant Ruby-in-XPages, since its JSR-223-based features cover JRuby as well. The main thing I need to check on is proper memory usage - the embedding mechanism I originally used provides clear control over the lifetime of the scripting runtime, while JSR 223 does not. That may be fine, since it may properly manage itself, but it makes me a bit nervous. I'll also have to work out proper context variable access (e.g. "database", "currentDocument", etc.). Some languages (Ruby, namely) seem to have gained a magic power since last I checked to access those variables without having to add special support, but I need to figure out if others work the same way or if I need to try an idea for an adapter I had. In addition to the JSR 223 languages, I also just today added support for formula language via #{formula: ... } bindings, since I realized that that was exceedingly easy to do. For that one, I didn't bother binding it to the contextual variables, but instead just have it look for "currentDocument" - if it's present, it passes the lotus.domino.Document from that to the session.evaluate(...) call; if it's not, it forgoes the second parameter. I don't expect I'll use that binding much, but it was fun to add. Standalone Scripts The standalone script support is a little different - the idea is that, rather than working another language into an XPage, you write a script entirely in the other language, much like you might do with, say, PHP (don't use PHP). You can write a script using a basic editor, it's stored in a document in the database, and then you can execute it in the context of a ScriptRunner XPage, meaning you have the same Java environment as usual (with the same caveat as above that I need to sort out variable access). Besides the usual suite of JSR 223 languages, I've also started working on integrating the XSP parser from the XPages Bazaar, both as a way to familiarize myself with the Bazaar and to see if there's any use in a setup where your XSP markup is stored in documents and evaluated at runtime rather than design elements compiled in Designer. Maybe, maybe not, but it's a fun test.   For now, it's still in an "experimental" state, but eventually I hope to cobble it into a proper releasable state and have it supersede Ruby-in-XPages entirely.

---------------------
http://frostillic.us/f.nsf/posts/7BBB53FE9AA1613285257AD2006CB78C
Dec 12, 2012
50 hits



Recent Blog Posts
22


Adding Load Balancing to the nginx Setup
Sat, Sep 20th 2014 8:16a   Jesse Gallagher
In an earlier post, I went over the basic setup of installing nginx on a single Domino server to get the basic benefits (largely SSL). Next, it's time to expand the setup to have one nginx server in front of two Domino servers. The concept is relatively straightforward: when an HTTP request comes in, nginx will pick one of the back-end servers it knows about and pass the request along to that. That allows for balancing the load between the two (since the act of processing the request is m [read] Keywords: domino xpages network server ubuntu
120


Generating JSON in XPages Applications
Thu, Sep 18th 2014 3:13p   Jesse Gallagher
This topic is fairly well-trodden ground, but there's no harm in trodding it some more: methods of producing JSON in the XPages environment. Specifically, this will be primarily about the IBM Commons JSON classes, found in com.ibm.commons.util.io.json. The reason for that choice is just that they ship with Domino - other tools (like Gson) are great too, and in some ways better. Before I go further, I'd like to reiterate a point I made before: Never, ever, ever generate code without prope [read] Keywords: domino formula language ibm xpages applications java xml
179


Setting up nginx in Front of a Domino Server
Thu, Sep 18th 2014 10:18a   Jesse Gallagher
As I've mentioned before and now presented on, I'm a big proponent of using a reverse proxy in front of Domino. There are numerous benefits to be gained, particularly when you expand your infrastructure to include multiple back-end servers. But even in the case of a single server, I've found it very worthwhile to set up, and not overly complicated. This example uses nginx and Domino on Ubuntu Linux, but the ideas and some configuration apply much the same way on other OSes and with othe [read] Keywords: domino notes linux server websphere ubuntu
107


Designer Experiment and Feature Request: JSF Tools in Designer
Wed, Sep 17th 2014 4:12p   Jesse Gallagher
TL;DR: You can install JSF tools in Designer to help out quite a bit with faces-config.xml editing, but there are bugs that may require changes in Designer's code to fix. I was having a discussion about Andrew Magerman's recent on-point jeremiad about SSJS and the topic got to the difficulty of using Java in XPages if you don't already know the ropes - creating classes, managed beans, etc.. I looked around a bit for examples of how other tools do it, and I found this page on using the [read] Keywords: domino notes xpages application applications development eclipse java properties workspace xml
97


Quick Tip: A View-Filtering Search Box
Tue, Sep 16th 2014 7:11p   Jesse Gallagher
One of the problems that crops up in some situations in XPages is the one described here: executing Ajax queries in too rapid a succession can cause the browser to cap them out until a full refresh. Depending on how you're encountering the problem, there may be a built-in solution: XSP controls that execute Ajax requests often have a throttling or latency parameter, and the same applies for "manual" JS widgets like Select2 (called "quietMillis" there). Another such situation is the to [read] Keywords: ibm xpages ajax javascript properties widgets xml
146


The Basic Xots Tasklet in the Blog
Sat, Sep 6th 2014 7:12a   Jesse Gallagher
Continuing in my two-day spat of blog posts shamelessly containing "blog" in the title, I figured I'd mention how I'm using Xots for new-comment notifications. If you're not familiar with it, Xots is a recent addition to the OpenNTF Domino API (added in the recently-released M5 RC1 build), intended to replace both agents and DOTS. There's still more work to be done on the scheduling portion, but Xots is perfectly capable of running manually-created tasks in a similar manner to Threa [read] Keywords: agent domino database openntf server
265


How I'm Handling URLs for the Blog
Fri, Sep 5th 2014 6:13p   Jesse Gallagher
As I mentioned in the introductory post for the blog, I'm putting my investigation into RequestCustomizerFactory classes to work in the blog. At its core, the point of what I'm doing is to allow me to write code like this: ...and have the generated link be something like: whatever The core of this is the ability of a RequestCustomizerFactory to specify a UrlProcessor that is used by basically every URL-generation routine in XPages to map the XSP-side URLs to their final HTML version. [read] Keywords: xpages database java server
149


New Blog Structure
Fri, Sep 5th 2014 3:13p   Jesse Gallagher
So I finally got around to re-doing my blog app after letting the previous one wither on the vine for years. The main things this new template has over the previous one are: A properly responsive design care of WrapBootstrap. Conveniently, it's the same design I use for our internal task-tracking app, so I had most of the renderers ready. Along those lines, the XSP structure is heavily based on standard/ExtLib components when at all possible, rather than putting the Bootstrap structure i [read] Keywords: development




160


(Not) My Slide Decks From MWLUG
Tue, Sep 2nd 2014 6:14p   Jesse Gallagher
At this year's MWLUG, I presented two sessions: one on using nginx as a reverse proxy and load balancer, and one on structured XPages development. Normally, the next step would be to post the slides, but my decks aren't particularly useful on their own - they were small 8-slide affairs that mostly served as a memory assistance to me, one sight gag, and then a "Demo" slide where I switched to the normal screen for the actual code. So my plan instead is to blog with the details. The latter s [read] Keywords: xpages development twitter
111


A Centralized Bean for Translation
Mon, Sep 1st 2014 2:12p   Jesse Gallagher
The normal method for doing translation in XPages is by using the built-in Designer tooling, which creates properties files for each language for each XPage in your app. This is okay, though it requires using Designer to update the properties (since apparently the translation happens as part of the build process). For the refresh of my blog I'm working on, I'm taking a different tack, inspired by the way a client does it and similar to how I do it in the Framework. Specifically, I have a cent [read] Keywords: domino ibm xpages application java javascript properties




Created and Maintained by Yancy Lent - About - Blog Submission - Suggestions - Change Log - Blog Widget - Advertising - Mobile Edition