Lotus Domino and AJAX


Todd Weimer

 by Todd Weimer, Lotus Practice Area Manager

Most modern web applications are now required to implement Ajax in one form or another.  Whether it is to make the user experience better or just a way to retrieve data, Ajax has become a necessity.  Lotus Domino has generally made it easy to use Ajax technology since version 5 which brought the first version of ReadViewEntries.  There are a wide variety of approaches to using Ajax in your Lotus Web Applications so I created a quick summary list of options, recommendations, and potential issues.

  1. Use an AJAX toolkit, such as Dojo or JQuery, for basic client/server communication.  These frameworks are already multi-browser compliant which will save you time writing cross-browser javascript.  You can create a central template database on your Domino server that contains the toolkit code.  Lotus Domino 8.5 comes with the Dojo toolkit installed.
  2. When possible, use a Notes View to retrieve data with ‘?ReadViewEntries’ and ‘&OutputFormat=JSON’.  Using  Domino Agents to send data to the client should be used for more complex data retrievals.   JavaScript Object Notation (JSON) is more lightweight than Xml and is significantly easier to parse.  Whether you are using a view or agent, JSON is the recommended format.
  3. With Domino 8.5, XPages leverage the Dojo toolkit for some built-in Ajax features. You can enable some Ajax functionality with the click of a checkbox!
  4. Virtually all modern browsers do not allow you to make an Ajax request to a domain that differs from the domain of the current page.  This is for security reasons and most of the work-arounds for this are not possible anymore.  You may have to create a Domino agent that acts as a wrapper to retrieve data from other sources and then returns it to your Domino web page.
  5. Domino 7 allows you to provide web services and Domino 8/8.5 added functionality to consume web services.  You can leverage those web services in you Ajax calls but keep in mind that your client-side Javascript may be more complex .

———————————————————————————————–

This excerpt is from our monthly resource E-Newsletter. Did you miss our monthly newsletter? Click here for a full version (only live for 30 days prior to original date) and if you want to begin receiving our monthly newsletter write to rjarvis@davalen.com and request to be added to our E-Newsletter list!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s