Search DominoPower's 11,441 Lotus-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
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.


1  ·  2  ·  3  ·  4  ·  Next »
Other articles you might like
Home > Internet Technologies > Logging and analysis (8 articles)
   Boost your server performance with HTTrack
   Keeping user credentials in a frameset
   Using probes to monitor your Domino servers
Home > Lotus Technologies > Domino (77 articles)
   More about Domino log files
   Why your log.nsf might not be purging properly
   Sloppy analysis at the core of another Domino vs. SharePoint report
Home > Lotus Technologies > LotusScript (64 articles)
   When the debugger won't debug hidden code that isn't hidden
   What to do if the LotusScript debugger won't single-step over code
   Little known traps about Lotus Notes fields
Home > Lotus Technologies > Application Development (48 articles)
   An application for scanning physical mail and distributing it virtually
   How hide-whens in Rich Text can ruin your whole day (and what to do about it)
   Little known traps about Lotus Notes fields
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent DominoPower Articles
Application development, William Shatner, and the origin of the universe
Learn Domino Designer 8.5 for free
The (near) future of Sametime, Quickr, Connections, and Symphony
Inside the IBM Innovations lab
Lotusphere 2010: Hot fixes and cool news for Notes, Domino, and LotusLive
Lotusphere 2010: mobility and collaboration
2010: A Lotusphere of change
Latest Lotus Headlines
Xpages not loading? JVM errors? - Solution
How to implement an iCalendar feed into your Notes calendar with XPages
DWA Hotfixes for Domino 8.5.1FP1 - A Gotcha
IBM Adds DB2 to Lotus Foundations SMB Package
SNTT : XPages onclick Ghosts in the machine
Ports used by Lotus Sametime 8.5 servers
Exploring a Domino Date Bug
>> Read all the news
More from the ZATZ journals
Computing Unplugged: The iPad defenders have spoken
David Gewirtz Online: CNN commentary and analysis
OutlookPower: More about disappearing text
-- Advertisement --

Learn Notes and Domino 8 at your place and pace!
Learn Notes and Domino in your office and/or home! TLCC's highly acclaimed distance learning courses for users, developers, and admins will enhance your career and your resume.

The many included activities and demos will make you a pro! Expert instructor help is a click away.

Click here to try a FREE demo course!!

-- Advertisement --

Teamstudio Edition 25 has shipped
It's finally here! Now that Teamstudio Edition 25 has shipped, listen to our latest Tool Time audio program to find out what's changed. Updates to all your favorite Teamstudio tools will be discussed.

Plus, you'll get an introduction to Teamstudio Undo (formerly known as Teamstudio Snapper).

Tap here to get started!

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login