5:00, Friday August 13th, 2004 • feeling webmasterly • no comments
I've been hacking heavily on InfoCMS and I'm really starting to create cool stuff now:
I created a form representation system which describes a form spec in XML and then provides methods to allow generation of an HTML form with notes and hints and things, validate data entered into that form, redraw the form with friendly field-specific error messages and more.
I created a metadata system that allows forms to be concatenated and the metadata bits reduced to XML. Once you add a metadata field (with rich type options) to a form, the system takes care of gathering and letting users edit that data through all the usual web controls. This allows me to have a very simple layout for my user table, for example, but for hackers to be able to add as many fields as they like just by editing the metadata XML definition. A user's metadata can then be queried by creating an object from the stored representation. Because I'm using DB_DataObject which supports overloading, hackers can add get and set functions to the DataObject class, and have those allow manipulation of the metadata fields exactly as if they were real columns.
I created a simple system for paging lists of records, built on top of a previous hack I made for Hype to integrate DB_Pager with DB_DataObject. It creates everything including the back and forward navigation.
And then, the crowning glory, I pulled it all together to create a class called ManagerView. This uses forms, metadata, database classes and InfoCMS's view hierarchy to allow hackers to create database table management interfaces with a minimum of no code, but by overloading methods in ManagerView, they can control the flow of data as it is created and edited down to the smallest detail. The code for the interface for managing user roles in InfoCMS is now 15 lines. This includes paged listing, adding, editing and removing of records. The interfaces created by ManagerView are rich and friendly and are only going to get better as I distill more of my experience as a web hacker into the class and it's friends.
2:47, Wednesday August 4th, 2004 • feeling resigned • no comments
Had an interesting couple of hours today when Gradwell installed PHP 5 on a box they thought wasn't in the web cluster, but was. Hypothetical2 and InfoCMS emulate exceptions, so they have throw and catch functions and an Exception class. PHP 5 has real exceptions, so these words are sacred, the former being keywords and the latter being a built-in class. Needless to say some amount of chaos ensued. I rapidly updated all my live sites but in such way that I can be pretty sure I've introduced bugs.
Then later on this evening I was trying to do some stuff with the smtplib Python module and couldn't get any mail to come through. After poking about for a bit I found that it was all jamming up in my MTA queue because my Mum's ISP, Tiscali, wouldn't return anything in reponse to an MX query. I guess this is their clever way of stopping worms from running riot, but it pissed me off, so now I'm using Zen's servers instead :-).
15:41, Monday July 26th, 2004 • feeling relaxed • no comments
We've been trying to set up a company for months now. We chose our name, Cohack, got our domain, email and web site all set up in a matter of moments. We got some leads and we're beginning to get towards making some sales. But to do this we need a company. We'd filed our forms as soon as we could, but there was a mistake. They got sent back to us, but unbeknown to us they went to our accountant, so we waited for two weeks hearing nothing. We finally ring them and they're all shirty and treat us like morons.
OK, we'll reapply. We're three people based in two cities, so getting the necessary signatures and witnessing done is a bit of effort, getting us all into one place and then seeing a solicitor so we can swear we're honest. We send the forms off again and don't hear anything for another two weeks. I ring Companies House and they tell me they haven't received the letter. We sent it special delivery on the 16th. I ring the Royal Mail. They didn't deliver it until the 24th! We paid good money for that delivery, we should really demand a refund. I ring Companies House again and they say, well, if we received it on the 24th it will take four to five days until the company is set up. Fair enough, but they can't even confirm that they did receive it!
So now we wait again. This is just shit though. Here we are trying to do our bit for the nation's economy by being all entrepreneurial and these two massive agencies basically don't have time for us, despite our paying hard cash to both of them for their services.
The postal service in this country has fallen apart, they regular fail to deliver letters for weeks at a time. This used to be something you heard about, now it happens to everybody. They can't even get special delivery right when you produce four quid hard cash. This is at a time when the workers in the service are being pushed so hard that strikes are a constant threat. It's a management catastrophe. They've completely destroyed the trust relationship they had with the nation. It stinks.