Email:   
Home
In This Issue
EasyPrint
Click here for the RSS feed's XML code. This is not a browser URL.
ADVANCED DOMINO TECHNIQUES
Build your own Domino hit counter
By Jeffrey R. Burrows

One of the first things many webmasters will want to add to his or her site is a neat graphical page counter. Traditionally, a Perl script, using the CGI calling convention, has accomplished this.

Apart from the distaste that a Domino webmaster may have for using non-Domino solutions, Perl has its problems. Every time a Perl script is called, the Web server must load the Perl interpreter and execute the code, and since making programs resident is a relatively time-consuming process on a server, performance takes a hit. Moreover, unless you learn Perl (Perl routines are usually worse than bad C code for legibility), there's nothing you can do to amend or update the code. Often, there is usually no easy way of accessing the statistics.

As an example of advanced Web development techniques, this article provides a way to do graphical traffic counting that is completely implemented in LotusScript and is free to download and use as you wish. It runs on any Domino server platform, and will maintain a single count for pages, whether accessed from Web browsers or Notes clients.

Unlike some Notes-based solutions, the reader of the page doesn't need write access to the page itself, only to the counter database. Unlike a Perl script, it requires no new process to be loaded into memory since Domino and its agent manager are always already running. And best of all, the statistics are kept in a Notes database, where you can easily monitor not only page usage, but what type of Web clients and what version of Notes client are accessing your server. Figure A shows some examples of the graphical counters you can create.

FIGURE A

Some examples of the graphical counters you can create.

Getting LotusScript to decode and encode GIF images and serve them up to the Web efficiently requires working around some of the limitations of Domino. You'll also need to use some optimization techniques.

Byte-serving 101
The simplest problem with such an agent is the inability of Domino Web agents to byte-serve. What does that mean? Simply put, it means sending binary data directly to the Web browser rather than the usual HTML. This is what the Web server itself does when you request a GIF image or PDF document -- it simply sends out a stream of binary data to the browser.

There are two reasons why Domino can't byte-serve. One is that the only way of outputting from an agent to a browser is to use the Print statement, and this will output most but not all binary codes (and when you're serving up binary, it has to be either all or nothing). The other reason is that there is no single-byte class in R4 Domino -- an oversight to be fixed in R5. Yes, you can output single characters--but only as Unicode, that is as 16 bit values.





[ Next ]

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
-- Advertisement --

PistolSTAR: the de facto standard for Lotus authentication
PistolStar's Password Power integrates with Microsoft Active Directory to enable single sign-on to Lotus applications and automatic recovery of the Notes ID password via self-service reset of the Active Directory password.

  • A single set of credentials to remember - one set of password policies to manage.
  • Cost-effective plug-ins integrate smoothly with your environment.
  • Proven, ground-breaking technology deployed to millions of users.


Learn more.
-- Advertisement --

Whitepaper - Integrating SharePoint with Lotus Notes: Strategic Coexistence
Notes users who use SharePoint for collaboration and document sharing struggle to integrate team document libraries into their day-to-day work. Read about IT options for dealing with these two partially-compatible infrastructures, including migration, doing nothing, and strategic coexistence based on Mainsoft SharePoint Integrator for Lotus Notes.

Download the whitepaper today.
Copyright © 1998-2008, ZATZ Publishing. All rights reserved worldwide.