About Me

I am a web developer based in Bristol, England, with over 8 years of commercial experience. I specialise in building accessible websites using web standards, and integration with database driven Document and Content Management Systems. I have expertise in XHTML, CSS, Javascript, Plone, PHP, ASP, MySQL & XML.

Read More >>

mailplane - osx gui integration for gmail

April 28th, 2008

I’ve been using gmail almost exclusively for about 4 years now - I find the convenience of webmail essential as I work at lots of different machines, and it doesn’t make sense to set up desktop email on all of them. One thing I do miss about not using a desktop mail client is the integration with my address book and photo library, and the ability to drag and drop files, but I have so much mail in my account (I subscribe to a few high volume mailing lists, and never do any tidying), that most mail apps choke on the volume of mail they need to download. I mentioned this on twitter, and someone pointed out mailplane - a gui app that loads the normal gmail interface, but adds on integration with addressbook and iphoto, amongst other things. It’s not free, but i’m a couple of days into the 30 day evaluation and finding it very useful so far, so will probably buy it ($25).

zend framework and isapi rewrite on IIS (and why)

April 23rd, 2008

Recently I decided to standardise on php/zend framework for future ground-up development (where I have a choice/ influence). As some of you may have gathered, i’m a bit of a “jack of all trades” when it comes to web dev and I have a legacy of projects using different technologies. One of these is a sprawling classic ASP/ mysql app for a distribution company which is a (very successfully) working prototype of something I want to rebuild in a more generic, modular and industrial way, as a flagship product for Olivewood to develop and sell.

To be honest the classic asp works fine for most purposes, but is becoming increasingly obsolete, along with availability of developers, and I have been trying to move on from it for years. The obvious choice for migrating a classic ASP app would usually be ASP.NET, but frankly the idea of spending the rest of my working life tied into windows-only development, and the fighting with software licences and scarce availability (it seems, at least in this town) of contractors makes me want to give up try a different career altogether. So I decided on php a while back (mainly because I wanted something open source, with an abundance of developers - I think if you throw a coin randomly in the watershed in bristol, chances are you would hit a freelance php developer).

So with php decided on, I then spent time evaluating a few frameworks. They all look good - this was a difficult decision - but I decided on Zend because Olivewood will be primarily concerned with eCommerce and eProcurement, and with magento being built on zend, and the “big industry” partnerships, it seemed the right fit. It also seemed to be useful and provide structure without being overly prescriptive. Also by writing this here i’m hoping to commit myself to at least something!

So, I also wanted something that would work cross platform, even though the obvious choice is to run open source web apps on linux/ apache, it was important to me that it would also play nicely with IIS, as many businesses have already invested in windows servers and already run other apps on IIS and wouldn’t be happy supporting anything else. This gets an indignant response from many “purist” developers/ sysadmins, but i’m basing this on real-life situations, and I hate the idea of a potential client ruling out open source software because it won’t run on their IIS server.

The other factor here was that I wanted something that would coexist with my classic ASP app until such a time that I have rewritten everything I need to make it a pure zend framework/php app. The classic asp scripts will handshake with the php code by dumping session data to the database and passing credentials via a cookie, so the session data can be shared between the two. This is vital to the plan, as it is a long term project - and much of the investment in migrating this will be my own time and money.

Installing Apache on the same server and setting up some kind of proxying would be another option, but not on the live server that this app runs on. I also needed to prove that it would work on just IIS before betting my future business plans on it, even if the first thing I would do is suggest that it is run on Apache.

I wasted a monumental amount of time getting this working, although it turned out to be fairly trivial once I had cracked it. The red herring is that there are two versions of isapi rewrite - version 2 and version 3. All the zend related documentation I found (hardly any) seems to be for version 2 (although this wasn’t mentioned!), which I just couldn’t get to work at all for my setup, but eventually I gathered that version 3 has been almost completely rewritten to work with apache mod_rewrite rules. So now I have a classic asp app, with a single folder (caled “zend”) containing my front controller from where all the php will be served the application folder (with all the models, views, and controllers) is outside the site root.

My httpd.conf file looks like this:-

RewriteEngine on
RewriteBase /zend/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule !.(js|ico|gif|jpg|png|css|asp)$ /zend/index.php

Remember this is for version 3 of Isapi rewrite. All quite simple really, when you know how. It’s a pity it took me about 9 hours to work out how!

Drupal on a different port - access denied

April 21st, 2008

(This is just for my own reference as i’ve hit this twice now - and can never find anything on google). if you run Drupal on a non standard port (e.g. on my windows machine I run apache on port 6060 so it doesn’t clash with port 80 hog IIS), you may find that you can’t log into a drupal site. This may be because of the way cookies are set up for domains. You can get round it by going to settings.php and looking for the section that is preceded  by the comment:

/**
* We try to set the correct cookie domain. If you are experiencing problems
* try commenting out the code below or specifying the cookie domain by hand.
*/

New drupal based site - Green Infrastructure in the west of England

April 16th, 2008

Olivewood have recently launched a new drupal based site Green Infrastructure in the west of England.

Green Infrastructure in the West of England

This has actually been quietly live for a while now, but wanted to monitor how it coped with the fairly heavy load exerted by the AJAX based mapping tool, which bought our dev server to it’s knees during original user testing, before being moved to a server with a bit more RAM.
GI Mapping tool

Beware moving vmware fusion machines to the free version of vmware server - you can’t

April 16th, 2008

Hopefully someone will correct me on this, UPDATE: some one has corrected me on this, although I haven’t tried what they suggest - see comments below) but I was disappointed to find I couldn’t move a server I set up on VMware fusion on my macbook to vmware server (free version) running on win xp (only temporarily, don’t panic). However, I understand it will run on the paid version and in vmware player. I’m also assuming that I won’t be able to move VMware fusion machines to the free version of vmware server on linux, but haven’t tried (send comments if you know otherwise!).
I actually moved from parallels to VMware fusion on the basis that I would be able to simply move VMs from my mac to a production server, but it looks like unless I cough up for the paid version of VMware server, this isn’t going to happen - very frustrating. Time to investigate KVM

Apache as Proxy to IIS

April 9th, 2008

Been meaning to get this working for ages - using apache 2.0 on my ubuntu dev server to proxy requests to an IIS server on the local network - to avoid having IIS facing the internet directly and to be able to have a central place to configure virtualhosts. Finally got it working with a bit of help from the helpful people on underscore. First enable mod_proxy, and then set up a virtual host something like the following:-

(note this is just to enable access to dev servers for testing etc. - not a production environment)

<VirtualHost *>
ServerName myvirtualhost.whatever

ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>

ProxyPreserveHost On
ProxyPass / http://myiisserver/
ProxyPassReverse / http://myiisserver/
</VirtualHost>

More books to review

February 21st, 2008

PHP books to review

I’ve been sent a couple more books to review from Packt publishing - Codeigniter for Rapid PHP Development, and Object Oriented Programming with PHP5. I have immediate use for these as I am currently working on a few PHP5 projects and was looking around for a PHP framework to use for part of one of them, so expect reviews next month.

I’m also feeling a bit guilty as I still haven’t had time to review the Plone 3 book they sent me a while back - I need a nice Plone 3 project to get stuck into before I can do that justice, but will try to at least give it a read next month too, and report back my initial impressions.

installing php5 and mysql on windows

February 13th, 2008

I was having some real headaches getting mysql to work with a fresh install of php5 and IIS on a windows XP machine earlier. I was eventually put out of my misery by this excellent how-to.

The trick is: do not use the installer - it comes without mysql support by default. Use the zip package and follow the relevant instaructions in the article mentioned above, to configure it for mysql support. In addition to the steps described, I also found I had to move my php.ini file to the windows directory for to be picked up.

How to resize a Bootcamp partition on Leopard

February 8th, 2008

I recently got a mac mini and decided to give bootcamp a try as I needed a native windows machine from time to time. I initially created a 10GB bootcamp partition, thinking that would be enough, but after installing Visual Studio and a load of other stuff I was soon down to about 200mb. I had been fooled by the bootcamp setup into thinking that it would allow me to resize the partition later, but it doesn’t - the only choice you have is to delete the partition and start again. I didn’t want to install windows yet again, so after googling around I found an excellent bit of free software called WinClone. This allowed me to create an image of the bootcamp partition from within OSX, then delete the bootcamp partition, create a new one - (20gb this time) and restore the windows image. The added bonus is that I now have a backup of the windows install, should I ever stuff it up.

Silverenlightenment

January 11th, 2008

I’ve just returned from a Silverlight seminar/ workshop run by Mason Zimbler, where I was lucky enough to be one of a few Bristol freelancers invited to attend. This wasn’t a Silverlight evangelism seminar, but rather a practical hands on seminar that introduced the Expression suite of software (Design, Blend and Encoder) and some basic tasks using each piece of software. Having said that, we were able to discuss the all important question that always crops up for Silverlight - why would you use it rather than Flash?

I haven’t done a recent side by side comparison, and I don’t want to risk inviting a flame war from MS averse developers and fans of Flash, but Silverlight certainly has a few nice features, that weren’t in flash last time I looked. Notably it has excellent HD video streaming and handling, including a really nice video fill feature where multiple movies can be efficiently rendered at runtime into other (skewed, flipped, animated, reflected) containers from a single source movie, and I love the uncompiled nature and the fact that it uses XML (XAML) and javascript for scripting, and can integrate seamlessly with the DOM.

Downsides of course - the development tools are MS only, and even with Microsoft’s pervasiveness it is going to take a while for the critical mass to install the browser plugin - currently available for a handful of browsers for PC and Mac, not yet (ever?) for linux.

I was hoping to see a few more components provided in the box for common functionality such as form fields. I was under the impression that Microsoft would try to take advantage of silverlight’s .net underpinnings and sell Silverlight to hordes of Visual Studio developers by creating a library of form elements like you would find in a typical visual studio project. Third party components do exist, but I was surprised not to see it built into Blend.

Overall impression: it’s actually pretty good. If it wasn’t for the MS-only tools (and .net hosting to take full advantage of the features?) i’d be pretty enthusiastic about it. Being platform agnostic, I will certainly install the Expression suite trial (180 days), and experiment with it further. The “Design” program alone may make a decent cheap alternative to photoshop/ fireworks, but that’s not such a big deal - i’m more interested in the DOM interaction aspect, and the fact that I can use my JavaScript knowledge to create rich media interaction.