William Hill implements Open Search

Tuesday, March 24th, 2009 | Uncategorized | No Comments

Who says you can’t teach old dogs new tricks. Today William Hill implemented Open Search on its CMS enabled pages.

The implementation involved two steps, added an additional link tag to each pages header.

<link
  rel="search" 
  type="application/opensearchdescription+xml"
  title="William Hill Online"
  href="http://www.williamhill.com/opensearch/">

This references the OpenSearchDescription document. Now any compatiable browser (Firefox) can add this search engine as a content source. Excellent.

As far as I can see William Hill is the only bookmarker to offer a search feature.

Grails documentation

Sunday, November 16th, 2008 | grails | No Comments

Open source projects don’t just require contributions to code, a lot of work goes into creating relevant and timely documentation. The fast pace that many open source projects work at mean that frequent releases can leave documentation frustratingly out of date.

There are a few things I like about how the Grails project manages it documentation. Firstly their website Grails.org has an own edit (Wiki) style. Meaning that pages regarding the many tutorials, plugins, new features can be updated by the community. This open style means that the project leads have more time to focus on more complex tasks.

Secondly I really like the Sun javadoc style Grails Framework Reference Documentation which are now being produced. The documentation includes descriptions and examples of the various aspects of the Grails framework.

Lastly, if any of the documentation is out of date for any reason, the community is invited to report problems to the project’s issue tracker to be recorded. Other members of the community can then look into any alterations which need to be made.

Grails natural names - GRAILS-564

Saturday, November 15th, 2008 | grails | No Comments

True to my pledge I’ve dived straight into the Grails source code, and the project’s issue tracker.

To start with I picked an improvement classed as ‘Trivial’ which I thought just about matched my level of Grails source code knowledge.

GRAILS-564 - “Have scaffolding display friendly names instead of camel case class names”

With my own use of Grails I’d seen that class properties were now being displayed with ‘friendly names’.

For example a domain class such as:

  1. class ManyWords {
  2.   String LotsOfWords
  3. }

The property LotsOfWords is defaultly displayed in the scaffolding as “Lots Of Words”, however the class name was still being displayed as the short code “ManyWords” instead of “Many Words”.

So to the fix.

I traced the scaffolding creation to the class DefaultGrailsTemplateGenerator. This class is responsible for the creation of the default scaffolding views and controllers. Its in this class where a map of values is passed to the templates in “src/grails/templates/scaffolding/” when you call a command like “grails generate-all <classname>”. Here is where I was going to make my change.

  1. def binding = [packageName: packageName,
  2.                 domainClass: domainClass,
  3.                 multiPart: multiPart,
  4.                 naturalClassName:domainClass.naturalName,
  5.                 shortClassName:domainClass.shortName,
  6.                 propertyName:  getPropertyName(domainClass),
  7.                 renderEditor: renderEditor,
  8.                 comparator: org.codehaus.groovy.grails.scaffolding.DomainClassPropertyComparator.class]
  9.  
  10. t.make(binding).writeTo(out)

I passed in a new property naturalClassName, to the view templates and replaced it with the
previous place holder where it was appropriate. The natural name is created using the method:

  1. GrailsClassUtils.getNaturalName(string)

My Pledge to Open Source

Saturday, November 15th, 2008 | open source | 1 Comment

I’ve been the gratful consumer of the products of the open source community for years now and I really appreciate all the hard work that is put in by so many people around the world.

So I’ve now decided to get involved in any way in can, and I’m giving myself a year to do it. I’ve picked a couple of Java projects which I really enjoy using as my starting spot.

Groovy + Grails

Spring Framework

As a side note, if anyone else wants to join me and get involved at the same time, drop me an email.

Tags: ,

American ‘Intelligent Design’ text book published

Saturday, September 27th, 2008 | Uncategorized | No Comments

Every time I read about the nonsense in American about trying to force out Evolution from the science class it makes me cringe.

Ars Technica has a great review of the text book being put forward by the ID movement. They find it to be without evidence or basic logically arguments.

Monitoring and measuring bandwidth

Saturday, August 16th, 2008 | debian | No Comments

managing and measuring bandwidth - Moved to a new home

Tags: , ,

Debian SSH Security

Saturday, August 16th, 2008 | debian | No Comments

Debian SSH Security - Moved to a new home

Tags: , , ,

Migration - Dedicated Server

Saturday, August 16th, 2008 | migration | No Comments

I’m now doing more Java programming and less Php. Which is a good thing since I’m a terrible Php programmer.

It soon became apparent that to host my own Java applications and web sites I needed a new host. Fasthost.com is not a good organisation and I really wanted to cut all links with them. This was all the encouragement I needed to move to my own dedicated server.

I choose to jump into bed with a local (York) company called Bytemark.

A dedicated host gave me the chance to make my own decisions, my choice of web server and its configuation. Also the ability to run my own increasingly demanding Java applications since I had my own deadicated ram to play with.

However this came with the downside that I had to manage said server. I have basic knowledge of HP-UX and bits and pieces from various Linux distros. But I’ve always liked a challenge and I look forward to running the show for a change.

For the nosey people, I’ve got 2GB of Ram, mirrored hard drives running Debian Etch. I’m planning on installing Apache, php, mysql for various WordPress sites I run and Tomcat for Java.

Tags: , , ,

Apologies

Saturday, August 16th, 2008 | Uncategorized | No Comments

Apologies if you are reading this after being redirected from missing content.

My previous content management system was just getting me down and not up to the job. I’ll may move some of the content over in time, meanwhile if you need to know anything specific contact me on mark at sailes dot co dot uk.

Regretfully

Mark,

Tags:

Search