May 212007

Many of you have requested that I publish the sample database I used for the Faster Ajax with Domino and JSON speed test. I posted the article back in March and I should have done this a long time ago.

All documents/notes has been deleted from the Domino database to save some space and bandwidth on my server. If you want to run the tests yourself on your server you need Firebug so it can calculate the time it took for the XHR (XMLHttpRequest) to run. If you just want to check out the code, feel free to do so.

All code are in two Domino Pages: TestJSON and TestXML

  • Download [download#4#nohits] and put it on your server.
  • Open it up in Notes.
  • Create a few dummy documents by selecting Create/TestForm.
  • Copy & Paste the dummy documents many times so that you have a lot of them.
  • Browse to: your_server_and_directory/XML_JSON.nsf/TestXML?OpenPage for the XML version.
  • Browse to: your_server_and_directory/XML_JSON.nsf/TestJSON?OpenPage for the JSON version.


  6 Responses to “Faster Ajax with Domino and JSON: Update”

  1. Hi,

    great tutorial on how to optimize web applications.

    I have a question about the datetime used when outputting view with xml or json.

    all of my datetime are like this: 20080226T182151,63+01 and i do not understand how to change the format for something more readeable…

  2. benoit,
    I created this function a long time ago and I use it in all my code:

    function returnDateTime(dominoDateString){
    var comps = dominoDateString.split('T');
    var xDate = comps[0];
    var sYear = xDate.substring(0,4);
    var sMonth = xDate.substring(4,6);
    var sDay = xDate.substring(6,8);
    var sDate = sMonth + '/' + sDay + '/' + sYear;
    var sTime = '';
    var sTimezone = '';
    if(comps.length == 2){
    var compsTime = comps[1].split(',');
    var xTime = compsTime[0];
    var sHour = xTime.substring(0,2);
    var sMinute = xTime.substring(2,4);
    var sSecond = xTime.substring(4,6);
    sTime = ' ' + sHour + ':' + sMinute + ':' + sSecond;
    var xTimeZone = compsTime[1];
    var utcHours = xTimeZone.substring(2,5);
    var utcMinutes = '00';
    if(xTimeZone.length > 5){
    utcMinutes = xTimeZone.substring(5,7);
    sTimezone = ' UTC' + utcHours + utcMinutes;
    return new Date(sDate + sTime + sTimezone);

  3. Hi, thanks a lot for sharing this code.

    i will look how to implement it in the function ReturnJSONValue(obj).

    maybe i have to put it in the case “datetime”:

    case “text”:
    case “number”:
    case “datetime”:
    oObj.type = a;
    oObj.items = [];
    if(obj[a].constructor.toString().indexOf(“Array”) == -1){
    for(var i=0; i

  4. hi , where can i download the sample database , i am sorry i can not find it , can you give me a email :
    my email is, or can you tell me the site where to download it

  5. Hello, i would like to learn about your work to optimize web app, is your database still available ?
    thanks for all, regards,

    • You really don’t need my DB to optimize your web app. JSON is just faster because of less data over the wire. If you need info on how to write JS for JSON, download a good JS library and start there. If you work with Domino or any other Lotus technology I recommend the Dojo Toolkit.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>