|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- 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 --
Want The Top Lotus Experts By Your Side Without Paying Hefty Consulting Fees? Look No Further.
Like having a team of consultants by your side -- ones who have all the answers and never make mistakes -- THE VIEW gives you immediate access to field-tested instruction, guidance, and best practices from the brightest Lotus professionals around.
Join your peers who realize their Lotus technology is too important to let people from blogs and forums tell them how they should implement it, run it, and use it. THE VIEW is where only the world's top Lotus experts provide validated support to you on a weekly basis to ensure you work more efficiently, get more out of your Lotus technology, and stay clear of costly mistakes.
Check out the new instruction, tips, and best practices added to THE VIEW this week. |
|
|
|
|
|
|
|
|
|
|