boogdesign blog

Web design, web development, standards compliance, Linux, events I went to related to that, and random things I found on the internet.

Rob Crowther, London, UK based Blogger, Web Developer, Web Designer and System Administrator - read my Curriculum Vitae

Buy my book!

Book CoverHello! HTML5 and CSS3 available now

Buy my other book!

Book CoverEarly access to HTML5 in Action available now

01/09/08

11:27:18 pm Permalink Mozilla Ubiquity

Categories: Usability & Accessibility, Front End Web Development

Mozilla announced a new labs project, Ubiquity, last week. It's intended to be a keyboard driven interface to advanced functionality in the web browser, similar to Gnome Do, which I've been using a lot recently, and the Mac application Quicksilver.

I decided to have a quick play by re-implementing part of my Use the new microformats API in your Firefox 3.0 Extensions tip as a Ubiquity command. Following the tutorial I was able to directly transplant the code, replacing only content.document with CmdUtils.getDocumentInsecure():

CmdUtils.CreateCommand({
  name: "grab-hcard",
  homepage: "http://www.boogdesign.com/",
  author: { name: "Rob Crowther", email: "robertc@boogdesign.com"},
  license: "MPL",

  execute: function() {
    Components.utils.import("resource://gre/modules/Microformats.js");
    var uFcount = Microformats.count('hCard', CmdUtils.getDocumentInsecure(), {recurseExternalFrames: true});
    if (uFcount > 0) {
        var uFlist = Microformats.get('hCard', CmdUtils.getDocumentInsecure(), {recurseExternalFrames: true});
        displayMessage(uFlist[0].url[0]);
    } else {
        displayMessage('None found');
    }
  }
})

Download grab-hcard.js Note: This command does not work in the current version of Ubiquity, a 'is not a function' error, not worked out what the problem is yet.


Tweet this!
Send feedback »PermalinkPermalink

31/08/08

10:01:24 pm Permalink IE8 Beta 2

Categories: General, Product Reviews

I previously did a review of the first IE8 beta, the second one came out a few days ago so I thought it would be worth a follow up post. Here are the main things I noticed:

  • Activities are now called 'Accelerators' though otherwise seem to be largely the same, so the main difference might be the renaming of the Firefox Add-on.
  • Suggested sites - which looks like a less interactive StumbleUpon.
  • Search suggestions - a more useful search auto-complete which looks quite cool, I've not come across any documentation on how to implement providers, however.
  • 'Compatibility' mode - the IE team have followed my (ha!) suggestion and enabling IE7 compatibility no longer requires a restart of the browser, simply click a toolbar button and the page reloads. By default it will render in standards mode on the general internet and in compatibility mode on intranets. This has not been a completely popular decision, but I'm not sure why. We all knew the main argument against 'standards mode by default' is that it would break thousands of intranets, and this seems to me like a practical solution to that problem.

Tweet this!
Send feedback »PermalinkPermalink

21/08/08

07:59:10 pm Permalink Wordle

Categories: Amusements

I was reading an article on text visualisation and came across this site. Very cool B)

I've not completed a real blog post in a while - there are plenty sitting both in draft status and in my head, I'm sure I'll get to them eventually.


Tweet this!
Send feedback »PermalinkPermalink

02/07/08

06:16:09 pm Permalink Google Adds Better SWF Indexing Support

Categories: Web

This week Google announced improvements to it's indexing of Flash files. It seems Adobe did most of the work with the actual Flash files for them, and it all sounds quite clever:

We've developed an algorithm that explores Flash files in the same way that a person would, by clicking buttons, entering input, and so on. Our algorithm remembers all of the text that it encounters along the way, and that content is then available to be indexed. We can't tell you all of the proprietary details, but we can tell you that the algorithm's effectiveness was improved by utilizing Adobe's new Searchable SWF library.

The downside of this, for those of us who prefer the web with more substance than Flash, is that one of the easy arguments for persuading non-technical folk not to do a website all in Flash now has less weight - "this will merely encourage those who think that every Web site needs to be a multimedia extravaganza" as one reddit commentator eloquently put it.


Tweet this!
Send feedback »PermalinkPermalink

27/06/08

03:12:01 pm Permalink SearchMonkey Developer Event

Categories: Web Develop, Server Side Web Development, Semantic Web and Microformats

Review: SearchMonkey Developer Event at Wallacespace, 2 Dryden Street, Covent Garden, London, England. WC2E 9NA. 18:30 to 20:00

I'd heard quite a lot about SearchMonkey, Yahoo!'s new search platform but not got around to checking it out, so I was hoping this event would be a useful introduction. The evening involved a couple of presentations from Yahoo! developers coupled with free drinks and food - a promising combination!

The first presenter (sorry, didn't make a note of the name - a Yahoo! developer from the US) talked about the motivations behind SearchMonkey and some of the technical features. One of the main obstacles to more semantic data appearing on the web is that there's a chicken and egg problem. It's not worth having features supporting semantic standards like RDF and Microformats on search engines until there's content available, and it's not worth making content available until you get benefits on things like search results. SearchMonkey cuts through that whole issue by allowing users to add features to the search engine to make use of the semantic data they've added to their website. It allows you to modify the presentation of search results from particular sites (not just your own) using semantic data taken either directly from the page (if there are Microformats or RDFa available) or through an XSLT transformation which you can provide.

Next we had Neil Crosby walk us through building a couple of example SearchMonkey applications. It really is fairly straightforward - you pick a URL pattern for your application to apply to and then it's more or less point and click (especially if you have standard Microformats or RDFa available). A couple of noteworthy points came up:

  • You can ask SearchMonkey to automatically generate ten sample URLs as you go through the process, but it's best to pick the first one by hand as that's the one used in all the previews once your monkey is done
  • You can use XSLT to extract data if your target page doesn't have pre-parsed Microformats or RDFa available, but that will be slower (though it will at least get cached for 15 minutes after the first call)
  • The presentation part of the monkey is entirely separate from the data source, multiple monkeys can use the one data source, and you can use data sources provided by other developers in your monkey

At present all SearchMonkeys are opt-in on the part of the user, which means if you're not targeting a big site it's unlikely your finished application will see a lot of use. However, we were promised that 'within a month' there would be options to set a default SearchMonkey for a website if you're the registered owner of the site (ie. you've registered yourself on site explorer) - so I have that long to think of something clever to do with my search results :)

The evening ended with free pizza, hand prepared in the kitchen behind us, and there were free drinks throughout. We also got a nice SearchMonkey hat, a sticker and a rather weird USB stick (Grolsch style opening mechanism). All in all an excellent evening, 5 out of 5. It has taken me nearly two weeks to get the review finished off, but some folk were a bit quicker off the mark if you'd like an alternative perspective.

Technorati tags for this review:    

Tweet this!
Send feedback »PermalinkPermalink

17/06/08

11:47:34 pm Permalink London Geek Nights: Ajax

Categories: Web Develop, Front End Web Development

Review: London Geek Nights: Ajax at London offices of ThoughtWorks UK. 18:30 to 20:30

First up was a talk by Remy Sharp on jQuery. I got the impression there were a fair few folk there who didn't have much experience with Javascript so it was quite introductory, but it was still useful to see things in a coherent context and, of course, as my jQuery experience is limited there were several things that were new to me. The talk started with some general introduction to the 'grab some nodes and do stuff to them' approach of jQuery, first discussing the CSS selection approach and then some of the filter methods you could chain things together with. One thing to bear in mind, filter works with a set of siblings (ie. horizontally in the DOM tree) whereas find searches child nodes (down the tree). We then moved on to event handling and resolving the this reference in your handler functions - unfortunately I paid too much attention to this part to write much in the way of coherent notes, and although it was claimed the presentation would be made available online I'm unable to find it. This blog post seems to cover the majority of the same ground if you're interested, and the follow up post covers event namespacing which I was struggling to see the point of at the time but which I now see may be useful. Finally we were shown some Ajax - the load method lets you specify CSS selectors to specify a fragment of the document you've requested with the Ajax call and insert that in the document which is a neat shortcut I wasn't aware of.

After a short break we had a somewhat ad hoc presentation from a developer at (I think - sorry, didn't make any notes) the Guardian who showed us the unit testing framework they were using for their Javascript. It was interesting to see the approach, a strict adherence to the MVC pattern within their framework coupled with extensive mocking, but the code he showed us was a bit jarring after the elegance of jQuery. He said he wanted to make his Java developers comfortable with the code, so there were whole sentences for function names left, right and center.

Overall a fairly interesting night, even if I had to sit on the floor because I was late (nothing unusual there then). A bit disappointing the slides don't seem to have been made available, and we were a talk short because one of the scheduled speakers had to pull out before the event, but I'll probably go to some more Geek Nights, so 3 out of 5.

Technorati tags for this review:    

Tweet this!
1 feedback »PermalinkPermalink

10/06/08

07:41:02 pm Permalink Fixing WackoWiki for PHP 5

Categories: Web Develop, Server Side Web Development

For a long time now, I've had a WackoWiki implementation on my (not so technical) personal site. It was upgraded from a WikkaWiki which was installed back in March 2003, which makes it about four months older than this blog :)

Anyway, the point is it's a legacy app, which has never been a problem for a little used website until I discovered (last night) that the hosting company was doing an upgrade on all the servers which would remove PHP 4 to leave only PHP 5. A quick check indicated Wacko R4.2 was supposed to be PHP 5 compatible, so I didn't worry too much about it and went to bed. Of course, when I checked this morning, it was broken, just a blank page...

I downloaded the error log and found a few entries like this:

[error] [client www.xxx.yyy.zzz] PHP Catchable fatal error: Object of class Wacko could not be converted to string in wakka/wakka.php on line 254

A quick Google revealed a number of other WackoWiki installs with a similar problem, but also this more useful result which explained the change in PHP 5.2 which was causing the problem:

Changed __toString() to be called wherever applicable. The magic method __toString() will now be called in a string context, that is, anywhere an object is used as a string. The fallback of returning a string that contains the object identifier was dropped in PHP 5.2.0. It became problematic because an object identifier cannot be considered unique. This change will mean that your application is flawed if you have relied on the object identifier as a return value. An attempt to use that value as a string will now result in a catchable fatal error.

Line 254 of wakka.php is:

$cache->Log("Before Run wacko=".$wacko);

I'm not sure what it's supposed to be doing, but it didn't seem too critical, so I just removed the object reference:

$cache->Log("Before Run wacko=");

Seems to work for me!


Tweet this!
6 feedbacks »PermalinkPermalink