Manipulating Lotus Notes documents with Ajax

Source: Internet
Author: User
Tags contains json object model

With Ajax, you can easily provide feedback instantly to users without having to spend a lot of time loading the pages that users use. This article will lead you to discover how views and agents can help you build Ajax-driven applications and teach you how to define an API that enables clients and Domino servers to collaborate.

Everyone has ever used a certain type of to Do List system. Such systems typically contain small pieces of data that must be fast and easy to use. The To Do list is also a perfect example of asynchronous JavaScript and XML (Ajax) technology and Lotus Domino, and this article will show you how to use Ajax design patterns to build a lotus No named Todo-list TES application, which provides immediate feedback and updates to users about their tasks.

This article introduces you to the creation of the entire Todo-list application and also provides a download of the sample application to help you step through the article. Applications use Domino proxies to handle Ajax requests sent by Web browsers, such as creating and updating Notes documents, and using a Domino view to build the XML used in the application. The target audience for this article is Notes/domino application developers who have the knowledge of JavaScript and XML and have some experience.

For more information on Ajax, see the "Resources" section of this article for an introductory article.

The Todo-list application maintains a record of the To do project that contains the Subject and Status fields. The Subject field holds information about what each item is (as shown in Figure 1), the Status field contains a 0 or 1,0 that represents an unfinished activity, and 1 indicates that the activity has been completed.

Figure 1. Ajax-driven todo-list applications

The power of Ajax-driven applications

Ajax-driven applications can add to the usefulness of any web-based application, and because of its additional security and categorized views, Lotus Domino servers provide an excellent repository for rich client applications.

The design elements that Lotus Domino provides make it extremely easy to develop Ajax solutions on a Domino platform. You can easily build a Domino agent that supports sessions (for security and personalization considerations) to handle your Ajax submissions. In addition, you can configure a Domino view to provide HTML, XML, and even JavaScript serialized Object notation (JSON). All that is needed for a successful Ajax implementation.

Modern Web browsers and sophisticated Document Object Model (DOM) make it easier to create rich applications for users than ever before. For example, we typically include a forward type or suggested field in a project, where users can receive suggestions when they type to make it easier to find names. In another project, we loaded a portal page with a small dialog box (that is, <DIV>). Each <DIV> uses Ajax calls to populate the back end. Part of the dialog is automatically updated every 30 seconds, providing the manager with new information from the Enterprise Resource Planning (ERP) system.

The third example is another portal project with a small "Add to my Page" icon in the title bar of each dialog box. When the user clicks the icon, a request is sent to the server in the background with information about the dialog box that the user wants to subscribe to. The server responds with one of the following two messages: "The box is now on your personal page" or "You have that box already!".

In all of these applications, we must start with the specified API. Specifying an improper API destroys the entire project.

Api

Before you begin coding for an todo-list application, you must determine the format of the information that is transmitted between the client and the server. Your system architecture can choose any interchange format that it needs, but these days this format is usually XML, JSON, or simple text.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.