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 >>

Web Developers Conference 2008

November 13th, 2008

UWE Web Development Conference

Yesterday was the second Web Developers Conference at the Watershed, Bristol. The attendees are 50% UWE students and 50% industry professionals - some local and some from further afield. The idea is that the students - many of whom are looking for placements, or jobs to start when their couses finish - get some exposure to the industry. There were several excellent talks during the day and two panels - the second of which I was lucky enough to be participate in. A good day - all the speakers and panelists I spoke to enjoyed it, and hopefully the students got something out of it too - roll on next year!

Update: I mistakenly implied that this was a UWE event. In fact although the UWE help with this event it was thought of and run by organiser Alex Older - many thanks for all your hard work Alex!

World Plone Day - Bristol, UK

November 7th, 2008

Today is World Plone Day.

From the website:

“The World Plone Day (WPD) is a worldwide event. Our goal is to promote and educate the worldwide public about of the benefits of using Plone in education, government, ngos, and in business.”

We held an event in Bristol, which I streamed and recorded via ustream - available here. I did a lightning talk on how to use plone out-of-the-box as a small company intranet and searchable knowledge base, other talks included “big plone”, contributing code back to the community and KSS.

The video was streamed straight from the webcam and built in mic on my macbook, so the sound quality isn’t great, especially when the fan kicked in, but it was a bit of a last minute effort. Next time it will be camera, mic and tripod!

Maximum file upload size in Drupal

October 15th, 2008

In a Drupal (5.something) site, there is a section in the admin for specifying how file uploads should be handled. As well as specifying the maximum file size allowed for a single upload it reports what the current php settings are e.g:-

“Your PHP settings limit the maximum file size per upload to 4 MB.”

This can be confusing! I just set the max_file_upload in my php.ini to 20MB and drupal was still reporting 4MB. After a bit of fishing around I found out there are two factors to this. First look for max_file_upload in your php.ini and check that that is set to something sensible, then search for post_max_size (also in php.ini)  - it seems that drupal is reporting this value divided by 2

Review: Professional Plone Development part 1

September 18th, 2008

Firstly an apology: I was sent Martin Aspeli’s Professional Plone Development for review back in October last year, and I still haven’t got round to reviewing it - not out of laziness, but extreme time shortage due to going freelance/ starting a company last year. Hopefully I can make amends now by reviewing it section by section as I jump into Plone 3.

A bit of background about me and Plone: I have worked predominantly with Plone for about 4 years, coming from a background in classic asp and php. My area of Plone expertise is front end templating and skinning, which was my main area of usefulness at Netsight for a couple of years. I have also presented a couple of Plone based workshops at Bristol Skillswap, attended two Plone conferences and a Snow Sprint. Despite this involvement with Plone, I have had a love/hate relationship with it, at times thoroughly lost deep down in the software stack, and fighting my tendency to think purely in terms of scripts and relational databases, other times singing it’s praises to anyone who will listen. Since leaving Netsight I have only worked on one Plone (2) project, as i’ve gone back to my old ways, favouring php for most projects, but just got stuck into an inherited Plone 3 project, and started using a vanilla Plone 3 site as a knowledge base/document repository/intranet/extranet for my own company, olivewood. (Hosted on a mac mini in-house, which I thoroughly recommend, but that’s another post!).

I’m currently feeling a little lost, with the Plone 3, which is why I decided to finally start reading/ reviewing the book.
Ok, enough about me, lets talk about the book: I opened the book last night and read through the foreword by Alexander Limi, and the first chapter. It left me with a fantastic feeling about Plone and the future of Plone - it summarised what is different about Plone, and how important (and fun) it is to participate in the Plone community to get the best out of it - the polar opposite to working with a proprietary product, where the vendor tries to cultivate a community around it, but it’s not the same. It also made me feel slightly guilty for moaning about aspects of Plone in the past - who exactly was I complaining to? I resolved to make sure that the next time something frustrates me, that I actively participate in making the situation better, i.e. to at least actively become part of the problem, if not part of the solution!

Chapter 1 covers Zope and Plone history, Plone as application vs Plone as framework, considerations for when deciding if Plone is the right tool for the job, and the importance of the community.
A couple of other things I learned from the foreword and chapter 1:-

  • The original release of Plone was built (predominantly*) by just two people, Alexander Limi and Alan Runyan who didn’t meet until Europython 2002 just after the first release
  • The Goldegg initiative is a sponsored effort to improve Plone’s framework stack, not a type of python egg!

Ok, I will try to deliver another installment as soon as possible, but i won’t necessarily be doing it in order - i’ll be skipping straight to chapter 8 (skinning)
* Building on top of Zope/ CMF - the work of many people!

slow response from mysql database on another server

September 18th, 2008

I set up a mysql database earlier and was getting a very slow response (about 4 seconds to connect) from a php script on another server. Both servers were windows (yeah I know, not my choice!). After a bit of googling I found the cause of this is DNS checking that occurs for incoming requests from seperate servers. The solution is to put skip-name-resolve into the mysqld section of my.ini (mysql config file)

Plone bulk update of default values for new attribute

September 16th, 2008

Scenario: I added a new attribute “orderPriority” to a few different archetypes based content types. These attributes had default values. As this is an existing site, there were 400 or so existing objects that had not picked up these default values - i.e. they would only pick up the value after they had been re-saved. To make sure these objects picked up the default value I created a skin script, which I proxied as manager (watch out for indentation here, really must find a better way to display preformatted code):-

catalog = context.portal_catalog
# objects are all in folder /directory/listing/
listing_folder = getattr(context.directory, 'listing')

for brain in catalog(portal_type = ['NameOfMyContentType']):
print brain.portal_type + ' ' + brain.id + ' ' + brain.Title

listing = getattr(listing_folder, brain.id)
#this gets the default vakue from the schema
order = listing.getOrderPriority()   #this sets it
listing.setOrderPriority(order)

return printed

I needed to be able to sort by this field in a catalog query/ Topic/SmartFolder/Collection so, so I then added the field as a fielindex in the portal catalog, reindexed the catalog (ZMI) and used the collection edit options in site setup to add it as a field

Back from BathCamp 08

September 15th, 2008

I attended BathCamp at the weekend and it was great fun. I met some lovely people, talked geek and gave a short talk on (”the gurgitator”) a python script I have been writing, which I use to generate boiler plate code for web projects in different technologies (i’ll write about this when it is further down the line). I haven’t got time to do a full write-up, but wanted to thank the people who made it happen. Check out the photos on flickr: mine all

Dexterity

August 28th, 2008

“Dexterity is a system to create content types in Plone based on Zope 3 schema interfaces and simple content classes, with z3c.form add/edit forms. It aims to explicitly supports both through-the-web type creation with a well-defined path to filesystem code (and back).”

I’m excited about this, cant wait to see it arrive in Plone.
http://martinaspeli.net/articles/dexterity-meet-grok
http://www.openplans.org/projects/plone-conference-2008-dc/dexterity

now running on a low energy intel atom powered server

August 19th, 2008

I recently upgraded my bytemark VM to one of their low energy intel atom powered dedicated servers. Because of an AJAX based mapping tool on one of the sites I host, my VM struggled with only 400mb of RAM (mainly because of lots of simultaneous mysql connections under heavy use), but CPU bottlenecks were never an issue. The 2GB of RAM as well as dedicated RAID1 disks (therefore not competing with other servers for disk I/O like with a VM) has made the site perform much better under “pressure”. I’m saying this cautiously as the site hasn’t exactly been slashdotted yet, and I don’t want people to see it as a challenge!

IE6 gotcha - transparent pngs as links - only the non-transparent bits clickable

August 14th, 2008

IE6 doesn’t display transparent png images properley - by default the parts that are supposed to be transparent display as grey instead. Fortunately an excellent workaround exists in the form of PNGFix by Twin Helix. However this doesn’t completely solve the problem: if you are using transparent PNG’s as links - only the non-transparent parts of the image are clickable, which can be a significant usability issue. So far I haven’t found an elegant workaround for this, but would be interested to hear of any.