Thursday, September 27, 2007

How to Get some Visitor Reporting from your Domino Web Server

This isn't intended to be the greatest method, but provides a quick method for setting up a means of reporting web site hits.

1. Copy the Domino Web Server Log Template so that you don't overwrite the original.

2. Create a new view (or better still copy/paste and rename the All Requests View).

3. Change the Selection Criteria to something like this...

REM {Normalize the adress: remove leading 'www.' and trailing ':'};

_server := @LowerCase(ServerAddress);

_hasPrefix := @If(@Left(_server; 4) = "www."; @True; @False);
_hasPort := @If(@Contains(_server; ":"); @True; @False);

_address := @If(_hasPrefix; @RightBack(_server; 4); _server);
_address := @If(_hasPort; @LeftBack(_address; ":"); _address);

SELECT _address = "mysite.com.au"


4. Leave the first column (Hits) as a Totals Column hiding detail rows.

5. The second column should be uncategorized ascending and hidden with a formula of @Year(@Created)

6. The third column should be uncategorized ascending and hidden with a formula of @Month(@Created)

7. The fourth column should display the date. It's best to make this ascending and categorised

Use this formula;

_list := "January" : "February" : "March" : "April" : "May" : "June" : "July" : "August" : "September" : "October" : "November" : "December";

_date := @Date(@Created);
_month := @Month(_date);
_name := _list[_month];

_name + " " + @Text(@Year(_date))

8. The fifth column should be a display values as icons column and should contain the following formula.

REM {the image resource names};
_user := "user";
_system := "system";

REM {check if we got an authenticated user};
_isAuth := @If(AuthenticatedUser != "-"; @True; @False);

REM {display the user icon if we got an authenticated user, else show system icon};
@If(_isAuth; _user; _system)

9. The last column will be the one where you make a lot of changes....
Here are some that I made in mine. You might want to search for specific URL strings and report them as something else or throw in a @replacesubstring to convert %20 to _ but ideally, the aim is to strip off all the leading and trailing junk to leave the unique page information in the URL.

URequest := @UpperCase(Request);

RQ1 := @Right(URequest ; "GET /");

RQ2 := @Left(RQ1 ; "HTTP");

RQ3 := @If(@Contains(RQ2 ; "$FILE"); @Right(RQ2; "$FILE");RQ2);

RQ4 := @If(@Contains(RQ3 ; "?OPENDOCUMENT"); @Left(RQ3; "?OPENDOCUMENT");RQ3);

RQ5 := @If(@Contains(RQ4 ; "WEBPAGEDISPLAY"); @Right(RQ4; "WEBPAGEDISPLAY");RQ4);

RQ6 := @If(@Contains(RQ5 ; "RESOURCELOOKUP"); @Right(RQ5; "RESOURCELOOKUP");RQ5);

RQ7 := @If(@Contains(RQ6 ; "/0/"); "PAGE PREVIEWS" ; RQ6);

RQ8 := @If(@Contains(RQ7 ; "/ALL/"); "SEARCH RESULTS" ; RQ7);

RQ9 := @If(@Contains(RQ8 ; "/SEARCHVIEW"); "SEARCH QUERIES" ; RQ8);

RQ10 := @If(@Contains(RQ9 ; ".GIF"); "GRAPHIC IMAGE" ; RQ9);

RQ11 := @If(@Contains(RQ10 ; ".JPG"); "GRAPHIC IMAGE" ; RQ10);

RQ12 := @If(@Contains(RQ11 ; ".JPEG"); "GRAPHIC IMAGE" ; RQ11);

RQ13 := @If(@Contains(RQ12 ; "?OPENELEMENT"); "GRAPHIC IMAGE" ; RQ12);

LastFix := @Trim(@ReplaceSubstring(RQ13 ; "/" ; ""));

@If(LastFix = ""; "INDEX"; LastFix)


10. Well, that's it really. You can now replace the design of your WebServerLogs and start reporting. To get some neat graphs, try selecting all the pages for the month (the categories, not the invidual pages and copying them as a table).

Paste the table into excel and you can highlight and draw some graphs from them.

Wednesday, September 19, 2007

How to Obtain and Install some decent free Games for the Blackberry

These notes come from some instructions I made for people today. I figured that they were worth sharing...

Blackberry applications, including games are generally loaded using either;
  • The Blackberry Browser (over the air)
  • The Blackberry Desktop Manager

The method you use will depend upon the particular game/application in question as some vendors use one method only. The "over the air" method is easiest.

Ka-Glom, Medieval Chess, Circle Poppers, BlackJack, Spider Solitaire and Suduku
Note: Not all of these games will be available as Blackberry rotate them on their site.
You will also find some older games listed under Classic Games (Spider Solitaire is especially good).

  1. On your blackberry device, go to: http://mobile.blackberry.com/
  2. Scroll down to Fun and Games and click on Super Games
  3. Click on Free Games
  4. At the Terms and Conditions, click I accept
  5. Find the Game you're interested in and Click on the arrow next to Download
  6. At the next screen, click on Download
  7. You'll get a bar graph that should last less than a minute.
  8. Click Ok on the Successful Installation Dialog box.

If you look around the blackberry site, you'll also find a lot of free ringtones and backgrounds.
You can make your own background, but that's for another document.

There's a lot more places you can go for mobile phone games (which aren't necessarily perfect for blackberry) one such location is;
http://www.mobilerated.com/rim-blackberry-8800-games.html

Games and Applications in .ALX format
ALX is the Blackberry application format. Unlike Java, applications and Games in ALX are specifically designed for blackberry.

First you need to locate some .ALX files and save them somewhere (eg: your desktop). You can find ALX files via Blackberry Forums etc, and searching in Google.

Before doing this procedure, you must have already loaded the Blackberry Desktop Manager software on your PC.

  1. Connect your blackberry to your PC using the USB Cable.
  2. Run the Blackberry Desktop Manager software (start, all programs, blackberry, desktop manager)
  3. Enter your current Notes password (and rewew encryption keys if prompted).
  4. If your icons are greyed out, you need to go into options, then connections and make sure that you set it to USB and click OK.
  5. Double-click on Application Loader
  6. Click Next and wait for the bar graphs.
  7. If you see applications already here, you could remove them if you wanted to by deselecting their checkbox - that's just a handy hint though... we're here to add.
  8. Click the button marked ADD
  9. Browse to the file you want to install and click Open
  10. Click Next, then Finish and wait for the Bar Graphs again...
  11. Click Close and disconnect your blackberry to play your game.

Note: The best way to disconnect your blackberry is to
  1. Close the Blackberry Desktop Manager software
  2. Right-Click the "Safely Remove hardware" icon on the system tray (near the clock).
  3. In the "tree" look for the word blackberry on a lower branch then go to the top of that tree.
  4. Click on it then click Remove and Ok.
  5. After a few seconds you'll get a message saying that it's safe to unplug the blackberry. (remove the USB plug).

Java Games
There are lots of web sites out there telling you that you need the Blackberry Software development kit to run java applications on the blackberry. This is no longer the case, provided that your blackberry has operating system 4.2 or higher.

The instructions for Java games installation are tricky, so I'll use someone else's instructions with some modifications;
(For citation reasons, I got these instructions from: http://blackberryforums.pinstack.com/)

  1. Download the jad/jar file onto your computer's desktop.
  2. Check it has the right extension by right click and check properties on the file. The download might need unziping. (ie: JAR not ZIP)
  3. Connect your blackberry to Desktop Manager
  4. Open your Media Manager application in Desktop Manager
  5. In the right hand window, make a new folder in My Blackberry/Device Memory/Games
  6. Using the right side of your media manager copy your JAD/JAR files into the folder.
  7. You must follow these instructions Exactly, otherwise you won't see your file.
  8. Open the Media application on the blackberry
  9. Press the right button next to the trackball
  10. Click explore
  11. Track down to Device Memory
  12. press the right button next to the trackball
  13. Click Open
  14. Track down to your /Games Folder
  15. press the right button next to the trackball
  16. Click Open
  17. Select the JAR file
  18. Select "Download"

The Application will load on to your blackberry and is now available in your application menu.

You can also use this method to access HTML files/Text files/PDF Files etc on your media card and read them but you must the EXPLORE,OPEN menus to see them otherwise you can see the folders but not the files.

Tuesday, September 18, 2007

Using Domino as a Normal Web Server

One of our recent projects involves the publication of an online annual report. As with most of these corporate things, the marketing people approach non-domino, non-windows designers and ask for what they want completely oblivious to the technical ramifications of what they have just requested. This isn't to say that we have bad marketing people, in fact ours are rather good. It's just that this is normal marketing behaviour and is typical of all of the organisations I've worked in.

So, we were suddenly faced with a very short deadline and a whole heap of html, css and other web files.

We could probably have put all of these files into a domino database and changed a lot of code, but the keyword here was "deadline".

The answer: Simply dump all of the files into the html directory on the domino server...

D:\Lotus\Domino\Data\domino\html

This path is correct... for our server at least. The word Domino does appear twice.

We also have a D:\Lotus\Domino\html folder on our server. Putting the files there doesn't work. I'm not sure if that directory is a standard one or if it is just on our server.

At any rate, once you put a file eg: myfile.html into the right place, you can reference it simply by using the following URL format.

http://www.myserver.com.au/myfile.html

You can even nest your files in folders (eg: http://www.myserver.com.au/myfolder/myfile.html) and can reference sub-folders in the usual manner for html. This is useful if you want to have several discrete items (eg: annual reports for different years) or if you want to keep your data and images separate.

Of course, hosting data in this way bypasses a lot of the security advantages of domino but it does serve to demonstrate the versatility of the domino system.

Thursday, September 13, 2007

Remote Access and APEC

Due to the Apec conference taking place in Sydney a couple of weeks ago, management suddenly felt the urge to move all of our employees of the site and have them use remote access.

As this was done at very short notice, a couple of days at the most, we were concerned that most of our users would find the task impossible. Most of them had never used our remote access facilities before. Luckily we were wrong, with only one morning of constant calls.

We tried a number of different methods with the aim of fully proving our remote access DRP.

These methods included;
  1. Complete Web based access (Web mail and notes databases via the Web)
  2. Lotus Notes clients via the Internet
  3. Lotus Notes clients on a memory sticks (Nomad)
  4. Files (from our File Servers) on the memory stick or CD-ROM
  5. Drive mapping to the domain using a VPN
  6. VPN followed by remote Desktop
  7. Offsite server access for Lotus Notes Domino
  8. Replication of files from our file servers to an offsite server and access via Web based VPN using a remote desktop and OpenOffice.

All of these methods work to some extent however some were obviously better than others.

Web based mail was considered to be the easiest method of accessing our systems and I expect that many of our employees will use this in the future now that that they've experienced it. Unfortunately, it doesn't provide file server access or access to many of the important notes client features.

Remote Desktop is easily the best, fastest and most reliable method of accessing our complete systems. The main problems we had with remote desktop were;
  • The complexity of multiple logons (Logon to Internet, then Logon to VPN, then Logon to Desktop) was overwhelming for some staff.
  • The windows drivers were a bit flaky (we need to look for an entirely web-based vpn solution).
  • Users with laptops only had no desktops to connect to.
The file replication was done using some software called double-take which was fantastic and seemed very easy to setup. The connection to the offsite server was done using Terminal Services, with OpenOffice loaded to get around any MS Office licensing issues.

In future, I expect that we will not only avail ourselves of these services but that we will also set up some in-house terminal servers for laptops to remote desktop to.

We also redirected phones (remotely) and remotely accessed voicemail with great success, though we didn't have time to setup our photocopier/faxes to internally distribute inbound faxes (something we will do in the very near future).

Overall, the exercise was very worthwhile and went a long way towards testing our disaster recovery and business continuity plans.

Monday, September 10, 2007

Benchmarks and Speed tips for preparing Lotus Notes Nomad USB Sticks

Last week, with the APEC conference looming in Sydney, I was suddenly called upon to provide a number of Nomad sticks to staff members.

Now, I haven't used Nomad beyond my initial testing when Notes 7.0.2 came out because I'm simply not traveling much these days and my home setup is too good to need it.

I dug out my old instructions and started installing using my work computer, which admittedly is an older model (2GHz P4) and I started the installation routines and it said that time to complete was 260 minutes.

I assumed that these were "microsoft minutes" (ie: ones unrelated to reality) but when, after a lunch break ,the install was still going - I decided to cancel.

I then tried installing to a directory on my PC. There were some good instructions from IBM and the procedure took under 5 minutes. Then I tried copying the installed files to the memory stick using Windows copy, but it was going to take 181 minutes.

I tried to cheat by ZIPPing the files (3 minutes), copying the ZIP file to the memory stick (under 1 minute) and then exploding the ZIP on the stick (6 hours).

Eventually I used the command prompt version of XCOPY. At 50 minutes, it was still a long procedure, but seemed to be the best of the lot.

The problem may have been slow memory sticks or slow ports but at least now I know the fastest way to do multiple installs. I've burned the directory to a CD so that from now on (at least until I change notes versions) I can just XCopy from the CD to the stick.