Faster Ajax with Domino and JSON: Update

By: Viktor Krantz on May 21st, 2007

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 Flippr for Lotus Quickr 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.

Enjoy



Print This Post Print This Post
Thank you for reading this post. You can now Read Comments (6) or Leave A Trackback.

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

  • 1
    benoît FRANCE
    February 26th, 2008 11:48

    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
    Viktor
    February 26th, 2008 17:19

    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
    benoît FRANCE
    February 27th, 2008 04:27

    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){
    oObj.items.push(obj[a][0]);
    }else{
    for(var i=0; i

  • 4
    coreoak CHINA
    May 12th, 2009 07:52

    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 coreoak#gmail.com, or can you tell me the site where to download it

  • 5
    William FRANCE
    September 30th, 2009 03:28

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

  • 6
    Viktor Krantz
    October 1st, 2009 09:55

    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

Note: Any comments are permitted only because the site owner is letting you post, and any comments will be removed for any reason at the absolute discretion of the site owner.