Monthly Archives: July 2008

OpenSearch

One really useful thing I came across at IWMW 2008 was the ability to put your own site’s search into the browser’s list of search tools. You know, that little google box in Firefox where you can in fact bring down a list of other search engines. That can have your site’s search tool in there too.

This makes use of OpenSearch, a collection of simple XML formats for sharing search results.

Basically achieving your super-cool goal is a very easy three step process. Make a small web-accessible XML file on your web server with the right magic in it, then put a link to that file in your html header, much like you would if you wanted your RSS feed to appear as a button in a browser.

Step 1: work out your own search url

OpenSearch uses a special syntax for the search url, of the form:

http://example.com/search?q={searchTerms}

So for my blog, the search url is http://matthewbull.net/?s={searchTerms}

Step 2: make your xml file

<?xml version=”1.0″ encoding=”UTF-8″?>
<OpenSearchDescription xmlns=”http://a9.com/-/spec/opensearch/1.1/”>
<ShortName>matthewbull</ShortName>
<Description>my blog search</Description>
<Url template=”http://www.matthewbull.net/?s={searchTerms}” type=”text/html” method=”GET” />
<Image height=”16″ width=”16″ type=”image/vnd.microsoft.icon”>http://www.matthewbull.net/favicon.ico</Image> <OutputEncoding>UTF-8</OutputEncoding>
<InputEncoding>UTF-8</InputEncoding>
</OpenSearchDescription>

where the ShortName and Description are up to you, and Url was the url you made in step 1.

Save this as an xml file to your server.

Step 3: tell the browser about your xml file

Now just put a link in your html to tell your browser where your xml file lives:

<link title="matthewbull.net" href="http://matthewbull.net/opensearch.xml"
 type="application/opensearchdescription+xml" rel="search">

And that’s it! Happy searching.

IWMW 2008 – day 2

So, we’re into day 2 of the IWMW 2008 conference at Aberdeen. Day 1 passed with much alcohol, dancing, Aberdonian ‘furry boots’, oh and some web stuff too.

I think the highlight was an excellent opening talk by Derrick McClure from the Centre for Linguistic Research at Aberdeen. It was a novel idea to have an opening talk by a linguist about the Aberdonian dialect (doric). But it worked, and to be honest this talk was more engaging than any of the other web-related talks that followed yesterday. I can’t even really remember any of the other talks, in fact.

Another highlight was a parallel session by Michael Nolan of Edge Hill University. They seem to be doing a lot of good healthy web 2.0 stuff there, and seem to have been given a lot of freedom in what they do. Edge Hill is a very new university, where student recruitment is king, and the website is viewed as a crucial tool in achieving that goal.

Edge Hill are using the symfony framework as a kind of php glue to bind together tools such as wordpress mu for blogging and bbpress for forums. They also developed their own google-style portal with php and jquery.

So now it’s day 2, I’m sitting in a boring talk feeling a little hungover. Oh well, it’s going to be a long day…

symfony 1.1 and 1.2

symfony 1.1 went live just a month or so ago, and in the relatively short history of symfony is somewhat of a revolution. In fact, the shift in a minor version number belies the effort and heartache that seems to have gone into the newer version, and one wonders at the implied major revamp that symfony 2.0 would someday involve. It saw the departure of a key member of the core team, as well as some major changes to the architecture of the framework as outlined in the diagram below.

symfony 1.1 architecture

 

The great thing about the platform is that being decoupled the classes can be used in isolation, so you can use some features of symfony and not have to use the whole system. In other words, you can build your own custom framework which uses just the bits of symfony that you want.

All this is great stuff, and should help symfony establish a place as the leading PHP MVC framework.

symfony 1.2 is released

But no sooner had 1.1 gone live than we heard that 1.2 is not just in development, but is actually imminent. The current release date is October, which is not very far off. According to the symfony blog, the main (and absolute must-have) feature of 1.2 is a completely revised admin generator system. Other features include bundling Doctrine with the framework and supporting it fully in the same way that Propel currently is. I’m sure a lot of people like using Doctrine, but for me Propel is just fine, and the differences in performance (at least where Propel 1.3 is concerned) are moot (see this blog for a good comparison

Worth upgrading to 1.1?

So should I wait for 1.2? I have a couple of live apps running under 1.0. They work just fine as they are, and I see no reason to update those to 1.1 just yet, only to go through the same process again in October. I think I’ll start using 1.1 in a dev environment for getting used to the new architecture, new command line system, etc. Upgrading to Propel 1.3 is also going to be a good idea for the performance gains.

I’m left wondering when symfony 1.3 will be out. Christmas?! Actually, my guess is that now that some of the major architectural changes have been made, things should start to settle down a little. Anyway, it’s great to see such activity in the symfony core development team: evidence that symfony is not just alive and well, but maturing very fast.