Saturday 30 April 2016

Coming Soon: iLog 1.0

Taking a brief break from ongoing development of MC-H, I've lately been working on another project, which I've dubbed (for now) iLog.


iLog is another project in my favourite language, Pascal (implemented in a modernized, OOP-oriented form, complete with IDE, by Lazarus).


In a nutshell, iLog is meant to be a personal logging system, mostly as a demonstration project to show my programming know-how. It keeps track, for each entry, of Date+Time, what you're doing, where you're doing it, and your current status.


For now, output has been implemented in the same way as with MCH; through a data-output language (hereinafter called DOL) disguised as HTML tags.  <@TL>, for example, displays the current time in 'long' format (i.e. with a colon superposed between the first and last digit-pairs). <@PB> positions the pointer to the most-recent entry and updates the records. <@LMR> will display it.


iLog generates pages from templates with embedded tags. Note that with iLog, directives may return empty; i.e. the tag is replaced with nothing and simply disappears.


Data output directly replaces the tags in a page template. Queries to the database are generated with an eye to a tabular format. To this end, a config file stores snippets of text to include both before and after both single-line elements (i.e. a single entry), and bulk entries according to their position on a 3x3 grid.

iLog takes in information by way of the cgi-bin interface (specifically, a POST call). The input can either be a log entry, or a query or query-string. A query is a direct enquiry into the internal workings of the program, whereas a query-string is a string with embedded DOL tags. Output is returned directly, as a long string. That said, for each query, there is a corresponding tag implemented to achieve roughly the same effect. It may be that, when all is said and done, embeddable query tags accomplish the same effect as queries. Easy to delete the section, in that case; my code is quite modular.


I've got about 75% of the planned command set implemented. The server is already stable enough simply to require a reboot weekly. A multi-level logging system has been invaluable in debugging the code; in fact, it hasn't yet been necessary to launch the debugger. I'll write about it soon; it deserves a post of its own.


iLog is loosely password-protected for now.


A note about the database. It's home-rolled. I prefer my applications to 'roll their own' database support and not have to depend upon a third-party product. Nothing against third-party databases; I've worked extensively with dBASE III/IV/V, Access, Oracle and other SQL databases. I just hate depending on them being installed on the host system. As it is, my system is very simple and involves CSV files with a dead-easy format (making it simple to view and repair in the text editor--another personal requirement of my programs' data files). It's working really well.


iLog already accepts a number of directives from a terminal session:

- Regenerate a user's web pages
- Reload system parameters from an INI file
- Reload styles information for generating bulk output
- Shut down

Once I get the server finished, in probably a couple of weeks, I'll build some kind of site for it and experiment a bit. At the moment, there's only a test page, at http://mizar64.dyndns-home.com:64180/iLog/test.html.


Then I'll turn my attention to making a mobile app for iLog (again, simply to demonstrate my programming acumen). The program will have to take and store (and transmit when possible), multiple log entries. It will update things like drop-downs for status and locations by live-querying the database when possible. It will be simple to use and won't beg for access to things it doesn't need in order to do what it does.


Well, that's about it, for now.

-Bill