Search this blog for:

Wednesday, December 05, 2007

PHP questionnaire application part 2

It was quite a busy day yesterday... obviously I didn't get this completed, or I'd have a link here and would be inviting you all to come along and fill it in! But I think I've made some good progress...

The basic idea I'm building on, is I'll have a questionnaire file and an administrative function that will create database tables and a php page based on that file - an install phase. Hopefully I'll be able to extend this to allow versioning of the questionnaire, so we can make changes on the fly and not lose survey data! But thats is something someone else can do in the future.

Once the php page is created and the database tables created, then the form will be open for business. The same fields (a PHP class I've created for each data type) will be used to validate the incoming data... with the validation parameters written into the generated php file.

Since the tables are generated (one table per question), the database is custom built to the specification of the questionnaire... which means the data validation can occur on the user form, in the php data acceptance layer and in the database. Making it less likely garbage will make it through.

This is similar to a Java Swing form I built a while ago, except this time I am building the form once, and then I built the form at runtime.

I was slowed down, as I had to get a CVS server operational somewhere. Luckily CVS comes pre-installed on our current host: hostmonster! Once we had SSH set up, we could connect to CVS via SSH. It isn't as fast as my previous solution (hosting CVS at home), but it is more available to the other developers on the team!

I also got a wiki for the team online at whizzoo.com/wiki. whizzoo.com is our primary domain at hostmonster, which is fun as we didn't really have any idea what we would do with it! So now it looks like it will be debated for a while and host our primary tools.

Unfortunately, setting up a defect management tool is not as easy... I failed to get both Trac (my preferred solution) and Bugzilla running. Obviously Trac requires more software than I am willing or able to install on our hostmonster plan.

A reader suggested using Lighthouse, but it seems to require I use SVN. Also the interface of Lighthouse is very pretty... but to me it doesn't look like much more than a community message board... I can add milestones and tickets, but I can't assign a severity? I'd like to be using SVN, but CVS it was I've got - for now.

Lighthouse do give an example Beacon file for integration with SVN, it is in Ruby. I don't really understand Ruby. But most languages are very similar - those little features of Ruby are likely to confuse me if I change too much of this Beacon file! So I might be able to get it to work with CVS... but why bother?

I've created a lighthouse project - but discovered its free account is limited to 2 users! ridiculous! So a waste of time using it. We could pay for it... but we'd probably have to buy the top end package to get the number of users we want on it... and looking at the functionality - I think I could build it in a week anyway... then Belle could make it look pretty.

No comments: