Saturday, August 8, 2009

I added Google Analytics to the project site as well as this blog. While I don't expect a lot of attention on this project, it would motivate me to keep posting progress if someone was actually looking at it (or waiting for a beta version to be compiled).

Thursday, August 6, 2009

Finally entering Implentation Phase (first round)

I've already started flushing out the domain classes (Patch, Patch Bank, etc.). I quickly realized a need for error management, so I wrote a class that provides static methods for writing to the Application log called EventLogHelper.

The EventLogHelper (ELH) class provides static methods to write to the Application event log. It creates an Event Source to match the name of the calling assembly using reflection.

The ELH can also be instantiated multiple times. The Log and Source values are passed in the constructor to 'assign' the instance of ELH to a specific log. Methods are available for writing messages to the specified event log using one of the three types (Information, Warning, and Error).

It works well with admin rights (specifically, permission to add Event Sources and Event Logs to the local system). On Vista machines or those without admin rights a security exception is thrown when the ELH attempts to create a new log file and/or add a new Event Source.
If a security exception occurs, the ELH writes the message to the Application log using the Application source. It also writes a message indicating what could not be created because of insufficient privileges. No matter what, something is written somewhere in the event logs

This description of the ELH is from memory; I wrote it a week or so ago and some of the details may be fuzzy. It definitely needs improvement, and I would love to find out how to 'assert' or 'demand' security permissions for this assembly and not rely on thread security for the calling assembly.

I may pick this apart this weekend, clean it up, document it better, and add methods for file-system logging. I think this would work around the security issues and make it OS-independent. It will simply write to a log file within its application data folder.

Lunch is almost over - will work on this more later...

Done with Documentation!

I moved the 'current status' portion of the Main Wiki into it's own page and fixed a couple links.
I had already updated the database diagram and put in some specifics.

Now that the NyMPH project has all of the existing documentation online and things look good, I can finally spend some time actually working on the project instead of writing about it.