mark jourdain using ajax with domino web applications
DESCRIPTION
TRANSCRIPT
®
IBM Software Group
© 2006 IBM Corporation
Using AJAX with Domino Web Applications
September 28, 2006
Mark Jourdain, Product Manager, Lotus Notes/Domino Application Development
IBM Software Group | Lotus software
2 2
Web Applications
� AJAX - Asynchronous JavaScript and XML
�Provides options to update parts of the web page asynchronously or synchronously
�Better browser experience as user need not wait for server response
� AJAX is a methodology to create cross browser web applications that can include:
�JavaScript code run in the browser
�Data exchange via XML and the XMLHttpRequest object
�XHTML and CSS for standards based presentation
�Interaction with the current page through the DOM
IBM Software Group | Lotus software
3 3
XMLHttpRequest
� Object that can be instantiated and manipulated through JavaScript code run in browser
� Can interact with HTTP server synchronously or asynchronously
� Use methods, including GET and POST to access URLs
� Use properties, such as onreadystate, responseXML and responseText
IBM Software Group | Lotus software
4 4
Customer and Application Requirements
� Customer�JDK Residential Services provides residential maintenance and
emergency services for subscribed apartment buildings and condominiums
� Application Requirements
�browser accessible
�intuitive interface
�input new service requests received via telephone
�view logged requests for customer unit or building
IBM Software Group | Lotus software
5 5
IBM Software Group | Lotus software
6 6
IBM Software Group | Lotus software
7 7
IBM Software Group | Lotus software
8 8
IBM Software Group | Lotus software
9 9
IBM Software Group | Lotus software
10 10
IBM Software Group | Lotus software
11 11
Application Elements
� Forms�Customer Issue Report �Customer Information�WebInterface�$$ViewTemplateDefault
� Agents�getCustInfo
� Views
�Customer Info by Phone
�XmlView
� Script Libraries
�String Utilities
IBM Software Group | Lotus software
12 12
Customer Information Form
� Form Alias = CI
� Fields
�Telephone
�FirstName
�LastName
�Unit
�StAddress
IBM Software Group | Lotus software
13 13
Customer Issue Report Form
� Form Alias = Issue
� Fields
�Issue
�Unit
�StAddress
IBM Software Group | Lotus software
14 14
WebInterface Form
� Fields
�TeleNum
�FirstName
�LastName
�Unit
�StAddress
�IssueReported
� JavaScript functions
� Links to trigger functions
� Div block to display logged issues
IBM Software Group | Lotus software
15 15
getUserInfo() function
� Uses XMLHTTPRequest object
� Calls Domino ?OpenAgent that build XML document
IBM Software Group | Lotus software
16 16
Agent slide
� Agent called by getUserInfo()
� Returns XML document with elements:
�FirstName
�LastName
�Unit
�StAddress
IBM Software Group | Lotus software
17 17
� Called by getUserInfo()
� Determines request state
� If request successful calls writeDetails()
IBM Software Group | Lotus software
18 18
writeDetails() function
� Called by processCallRequest()
� Writes XML element values to web document
IBM Software Group | Lotus software
19 19
submitIssue() function
� Creates new document through XMLHTTPRequest
� Includes value of IssueReported,Unit and StAddress fields
IBM Software Group | Lotus software
20 20
doReset() function
� Provides user option to clear all content
IBM Software Group | Lotus software
21 21
listdata element to display logged customer issues
IBM Software Group | Lotus software
22 22
refreshIssueListbyUnit() and refreshIssueListbyAddress() functions
IBM Software Group | Lotus software
23 23
refreshIssueList() function
� Reads XML document from Notes view
� Dynamically writes element values to table in listdata element
IBM Software Group | Lotus software
24 24
XmlView and $$ViewTemplateDefault
� Displays logged issues as XML document
� Ready by refreshIssueList()
IBM Software Group | Lotus software
25 25
Resources
� Using AJAX in Domino Web Applications!�Presentation and sample NSF by Shyam Purshottam
�http://www.stldominotes.org/usergroup/stldominotes.nsf
�Navigate to ‘Past Meetings’ view
� Using Ajax to manipulate Lotus Notes documents�Article and sample NSF by Joachim Dagerot
�http://www-128.ibm.com/developerworks/lotus/library/domino-ajax/index.html
� Ajax: A New Approach to Web Applications�Article and Q&A by Jesse James Garrett
�http://www.adaptivepath.com/publications/essays/archives/000385.php
IBM Software Group | Lotus software
26 26
Thank you
Mark Jourdain, Product Manager, Lotus Note and Domino Application Development
IBM Software Group | Lotus software
27 27
Additional Resources
� Web Architecture zone on developerWorks
� Tutorial: Build apps using AJAXhttp://www-128.ibm.com/developerworks/edu/wa-dw-wa-ajax-
i.html?S_TACT=105AGX08&S_CMP=HP
� developerWorks articles
�Using Ajax to manipulate Lotus Notes documentshttp://www.ibm.com/developerworks/lotus/library/domino-ajax/
�Master Ajax article series (six-part series)http://www.ibm.com/developerworks/views/web/libraryview.jsp?search_by=Ma
stering+Ajax�Build apps using Asynchronous JavaScript with XML (AJAX)
http://www.ibm.com/developerworks/edu/wa-dw-wa-ajax-i.html
IBM Software Group | Lotus software
28 28
Additional developerWorks Resources
IBM developerWorks Tutorials and Training
� Tutorials and training
� over 36 titles for IBM software and more titles being added all the time: ibm.com/developerworks/training
Downloads
� Easy access to IBM trial software ibm.com/developerworks/downloads/
� 2006 developerWorks Software Evaluation Kit
� Over 14GB of the latest trial software DVD and available to you at no charge! ibm.com/developerWorks/offers/sek
IBM Software Group | Lotus software
29 29
EventsIBM Rational Software Development Platform 2006 webcast series
� More than 50 new webcasts in 2006 – all available to you at no cost.
�Enriching the User Experience Through XML Intelligent Documents
�IBM WebSphere Portal, IBM WebSphere Portlet Factory, and SOA Composite Applications
�Using the Sametime Client Integration Guide for customization and plugin development
� All webcasts are available on demand (24x7) following their original broadcasts.
� Bookmark our webcast web page: ibm.com/developerworks/offers/lp/wc
� IBM developerWorks Live! Technical Briefings�Live, worldwide events available at no cost
�11 titles including
� Effective Team Collaboration In An On Demand Workplace
�For a list of cities and dates, visit:ibm.com/developerWorks/offers/techbriefings