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 XML_JSON Database 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
Thank you for reading this post. You can now Read Comments (3) or Leave A Trackback.
Post Info
This entry was posted on Monday, May 21st, 2007 by Viktor Krantz and is filed under Ajax, JSON, JavaScript, Tutorial.Tagged with: ajax, domino, json, tutorial, xhr
You can follow any responses to this entry through the Comments Feed. You can Leave A Comment, or A Trackback.
Previous Post: Dojo Calendar: Update »
Next Post: Viktr.com »
Read More
Related Reading:
Latest Posts:

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…
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);
}
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