Four Pillars of Web Development

Author: Tripp W Black

Created: 01/13/2000 at 03:21 PM

 

Category:
Notes Developer Tips
General

The following is from the Lotus Developer Web Site.

The Four Pillars of Web Development

You want to start developing Web application using Domino? In eCommerce terms - a good move, and it's relatively simple. All Notes applications are inherently web applications, after all that's why Domino is so powerful, so getting started is no challenge. Bear in mind though, the more complex the functionality we require, the more we'll need to deepen our understanding of how Domino works. So here's some hints and tips, stuff which you might not already know about, but which is certainly useful for developing cool Web-based Domino applications.

For a complex Domino Web application, it is important to separate Notes forms for the Web from Notes forms for the Notes client. The forms operate as the user interface to the application for the different clients, and in the same way that a Linux application has a different interface from an NT application, the same should be true for Notes and the Web. It may seem obvious, but it is important to realize that we need to create two distinct user interfaces. Each interface should be designed to take advantage of the properties of each client.

    • Use Separate Forms for Web Applications - separating the forms is simple. Create the two versions of the forms as required, give each a separate name, but alias them to the same name. That way, Web users will get access to the Web version, and Notes users will get access to the Notes version. You also have to hide the Notes form from Web users, and the Web form from Notes users. To do this, select the properties for each form in the designer, and select the design tab, and then check the appropriate box.
    • Use Separate Views for Web Applications - Along with special forms for Web users, you might want to consider creating special Views for the Web. This involves writing HTML tables for each row in a View. The HTML is entered directly into the Formula area for each column. The advantage of this technique is that the Web Views are completely customized to exact specifications. The disadvantage is that this technique requires a lot of effort to make it work, as Domino is effectively doing none of the work for you at this point.
    • Use CGI Variables to Maintain State Across Web Pages - CGI variables give a huge amount of flexibility to Domino Web applications. HTTP_Cookie, and Query_String can be used to maintain state across many pages as the user browses the site. This functionality is useful for implementing a virtual 'shopping cart' in an eCommerce application. Another useful variable is HTTP_Referer. This variable can be used to effectively block access to site content from an external source, so content is only available from within the site.
    • Customize Agents for Web Applications - As agents are complex programs in their own right, it is important to understand what an agent can and cannot do. Agents which work when tested from a Notes client may not work at all when executed from a Web client. As a Notes client opens a session with Domino, an agent will have access to more information than the equivalent agent initialized from a Web client. The agent has to be able to cope with the limited information and functionality that the Web client can provide.
When creating agents for a Web environment, we need to remember that running the agent on WebQueryOpen and running it on WebQuerySave may have completely different results. This is because agents running from WebQueryOpen execute before the page is displayed to the user. So if the agent relies on information being entered by the user, then it would probably work best from WebQuerySave, unless the agent has access to that information using some other technique (i.e. by storing it in a CGI variable).

It's also worth remembering that agents initiated by Web users always run on the server, with the access rights of the ID file which you used when you last edited the agent. Agents triggered by Notes clients tend to run locally (unless specified otherwise), with the local user access privileges.

One more thing. Security is always an issue when designing a database which can be viewed over the Web. Sticking to the standard Notes security model is simple and effective method of securing the Web application. We should give all Web users much less access to the data than a verified Notes user would have. Combine this with some form of Web-based registration, and the data in the database should be secure. Using the maximum Web access setting is a good way of preventing Web users from having access to confidential areas of the database.

Why not check out the
Lotus Developer Network Web Authoring Zone where there's loads more useful stuff to give your site building efforts a real boost.


previous page