Bob Balaban's Blog

     
    alt

    Bob Balaban

     

    Wiring JavaScript libraries Into the Domino Server

    Bob Balaban  December 6 2007 11:52:35 AM
    Greetings, Geeks!

    I have mentioned Dojo in this blog a couple of times. Nononono, not that Dojo, this Dojo. For example, here, and here.

    The many, many responses (a LOT of responses) were all interesting, and a few patterns emerged, such as (I am paraphrasing here):
    • Dojo is great
    • Dojo sucks
    • My favorite JavaScript framework is [insert name here]
    • Watch out for browser dependencies
    • Handhelds don't support Javascript, so what are you going to do?

    And so on. One principle I came away with was the following: no matter what JavaScript framework/libraries we ship with some as-yet-undisclosed version of Domino (what I've been referring to as NMFR - Next Major Feature Release), we better be really sure that we don't force our beloved Developer community to use it -- we MUST leave the door open for people (Developers are people too, you know) to be able to plug their own favorite JavaScript stuff in, even if it requires more typing for them than if they used our selection. This seems eminently fair and sensible to me.

    We've had a number of design discussions within the WebApps team back at Domino HQ, during which a couple of major points relating to this dual-headed objective became apparent:
    • We should probably create a new sub-directory in the ...\data\domino tree for JavaScript code, such as Dojo (as one example)
    • We should create a short-cut URL that the Web Server will understand to that directory (it would also be nice if that short-cut location were admin-configurable)
    • Since all of the JS code simply sits on the server's disk in a designated location, it would therefore be easy for people to add their own fave raves. They have to figure out how to do that on all of their servers, of course.
    • We should make it as easy as possible for a Developer to add a reference to the main "entry point" in their preferred JavaScript lib on each page of their Web app. The "main" entry point is generally the one that bootstraps the loading of the JS lib into the browser. This would normally be done in Domino Designer.
    • Once that reference is inserted, the Developer needs to be able to easily enter whatever other references (to widgets, for example) are needed, also done in the Designer environment
    • If Developers just so happen to be using the JS stuff that we select as our "default", Designer would do a bit more of the work for them. Otherwise, Developers will still be able to use "pass-through HTML" to do what they need to do.

    This seems reasonable to me. Well, of COURSE it does, I was in on all the discussions! But YOU weren't. So, fellow Geeks, please tell me what you think of this idea.

    Thanks! (in advance)

    (Need expert application development architecture/coding help? Contact me at: bbalaban, gmail.com)
    This article ┬ęCopyright 2009 by Looseleaf Software LLC, all rights reserved. You may link to this page, but may not copy without prior approval.