357 Lotus blogs updated hourly. Who will post next? Home | Downloads | Events | Pods | Blogs | Search | myPL | About 
 
Latest 7 Posts
Building an App with the frostillic.us Framework, Part 6
Wed, Jul 23rd 2014 75
The Industry's Vileness
Tue, Jul 22nd 2014 147
Generating Toaster, dGrowl, etc. Notifications From Server Code
Tue, Jul 22nd 2014 81
Value and Method Bindings in XPages
Mon, Jul 21st 2014 115
Building an App with the frostillic.us Framework, Part 5
Mon, Jul 21st 2014 74
Meandering Musing About Views
Sun, Jul 20th 2014 122
How I Deal With Collections in the Framework
Sun, Jul 20th 2014 107
Top 10
"Build Automatically", "Refresh automatically", and "Team Development"
Thu, Jan 23rd 2014 431
Domino the Identity Server
Tue, Feb 11th 2014 427
Couchbase StateManager for XPages, Part 1
Wed, Jan 29th 2014 404
So it goes.
Mon, May 12th 2014 377
An XPage As A Tree: Implications
Wed, Apr 16th 2014 352
SNTT: Reconstructing DateRanges
Thu, Feb 27th 2014 344
The Trouble With Developing on Domino
Tue, Jul 8th 2014 340
My Current Model Framework, Part 2: An Example
Fri, Feb 21st 2014 318
Better Living Through Reverse Proxies
Thu, May 30th 2013 317
Couchbase StateManager for XPages, Part 2
Fri, Feb 21st 2014 311


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
93 hits



Recent Blog Posts
75


Building an App with the frostillic.us Framework, Part 6
Wed, Jul 23rd 2014 12:12p   Jesse Gallagher
Define the data model Create the view and add it to an XPage Create the editing page Add validation and translation to the model Add notification to the model Add sorting to the view Basic servlet REST with Angular.js Add sorting to the view This step in the framework example is very similar to the second in that there's nothing particularly Framework-y about it. Technically, the work in the title of this step is already done: I had already enabled click-to-sort and set sortable="true" i [read] Keywords: notes xpages java
147


The Industry's Vileness
Tue, Jul 22nd 2014 9:13p   Jesse Gallagher
Fair warning: this post isn't technical. It's also full of sweeping generalities. When I attended middle and high school, it was as part of the last group of geeks and nerds that should face systemic ostracization. Naturally, high school will still be terrible for most people, just because it's full of high schoolers, but the world at large has seen a near-complete triumph for geeks and nerds generally. And this has had some very positive side effects: because we had to deal with exclu [read] Keywords: community development
81


Generating Toaster, dGrowl, etc. Notifications From Server Code
Tue, Jul 22nd 2014 10:12a   Jesse Gallagher
In yesterday's Framework-series post, I offhandedly mentioned that the "flashMessage" routine I use could easily be paired with or replaced by "toaster"-style notifications. This turned out to be very coincidental, as just today a NotesIn9 episode went up featuring Brad Balassaitis talking about using dGrowl for this purpose, along with an accompanying blog post. Whenever I've used something like this, I've run into situations where I want to generate the message from the server, sa [read] Keywords: formula language ibm xpages dojo java javascript properties server xml
115


Value and Method Bindings in XPages
Mon, Jul 21st 2014 3:12p   Jesse Gallagher
When you use any binding in XPages - anything with "#{...}" or "${...}", regardless of whether it's EL, SSJS, or other - you're creating what is called in JSF-land either a ValueBinding or a MethodBinding, and the distinction is important but can be subtle, particularly when dealing with SSJS. Value Bindings The simplest case of value bindings are sprinkled throughout even the most basic XPage app, created when you bind a control to a document's field: The meaning is clear: "thi [read] Keywords: notes xpages interface java javascript
74


Building an App with the frostillic.us Framework, Part 5
Mon, Jul 21st 2014 1:12p   Jesse Gallagher
Define the data model Create the view and add it to an XPage Create the editing page Add validation and translation to the model Add notification to the model Add sorting to the view Basic servlet REST with Angular.js Add notification to the model The next step in building our Framework app is a simple one: adding some basic visual notification when user saves a note. We'll leave the navigation rule to send the user to the home page in place and use flashScope (included in the Framework) a [read] Keywords: email java
122


Meandering Musing About Views
Sun, Jul 20th 2014 9:15p   Jesse Gallagher
As happens periodically, I've been thinking about Domino views lately. When I get into one of these moods, I find it helps to take a step back to look at what an NSF is. An NSF is, in its heart of hearts, a key/value store. Each entry has several keys of which the useful ones are Note ID and the UNID, which are 32-bit and 128-bit integers, respectively, and where the Note ID is fixed and the UNID is mutable. Each entry's value is a multimap with string keys and values that are either ef [read] Keywords: agent domino formula language ibm database java javascript openntf server sql
107


How I Deal With Collections in the Framework
Sun, Jul 20th 2014 8:13a   Jesse Gallagher
A post on Christian Güdemann's blog and a followup on Nathan Freeman's made me figure it could be useful to discuss how I deal with the job of working with document collections in the frostillic.us Framework. First of all: I am not solving the same original problem Christian had. His post discussed strategies for actually opening and processing every document and secondarily building a collection using inadvisable selection formulas for views (namely, @Today). I don't generally do that [read] Keywords: domino ibm rich text xpages bug database java openntf
168


Platform Defensiveness
Fri, Jul 18th 2014 6:12p   Jesse Gallagher
If you were a Mac user in the 90s and early 2000s, life could be tough. Though you loved your platform of choice and could see its advantages plain as day, you were in a distinct minority. The world was full of people ready to line up to explain why you're an idiot on a sinking ship. And the part that stung was that they weren't always wrong: for every person talking out of their ass about how great having a menu bar in every window was or the joys of running ancient line-of-business DOS [read] Keywords: domino ibm notes notes client xpages apple community desktop exchange exchange google mac microsoft server
89


Building an App with the frostillic.us Framework, Part 4
Thu, Jul 17th 2014 1:12p   Jesse Gallagher
Define the data model Create the view and add it to an XPage Create the editing page Add validation and translation to the model Add notification to the model Add sorting to the view Basic servlet REST with Angular.js Add validation and translation to the model Now that we have a page to edit the model objects, it's time to spruce them up a bit by adding some type information, an additional field, and some basic translation. When we first set up the Note model, it didn't contain any infor [read] Keywords: domino xpages java properties sql
74


Building an App with the frostillic.us Framework, Part 3
Thu, Jul 17th 2014 12:12p   Jesse Gallagher
Define the data model Create the view and add it to an XPage Create the editing page Add validation and translation to the model Add notification to the model Add sorting to the view Basic servlet REST with Angular.js On the scale of "bog-standard" to "weird", the next phase of writing a frostillic.us Framework app sits in the middle: the basic steps of creating a model-editing page are pretty standard, but you can use unique aspects of the Framework to save a bunch of coding and add som [read] Keywords: domino ibm notes xpages dojo properties xml




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