Just a reminder that this blog has been moved.  The new URL is http://www.troyforster.com.  You can subscribe to the Atom feed at http://feeds.feedburner.com/tforster.

I didn’t even think about it when I first started exploring my new iPhone but in hindsight it makes perfect sense.  The browser is Safari after all.

Unfortunately the only way I have found so far to get bookmarklets on my iPhone is to install Safari on my desktop, delete all pre-installed bookmarks, add my favourite bookmarklets and synchronize.  It’s pretty straightforward but it would be much nicer if I could synch directly with FireFox, my default browser.

After an hour or two of sleuthing I’ve discovered that jQuery 1.2.6 does not set the Content-Type header for HTTP GETs even if you explicitly use the contentType parameter. My understanding of the jQuery rationale is that GETs don’t contain data and therefore a Content-Type header is not required. Unfortunately, Microsoft reckons that GETs returning JSON provide a security risk and that a Content-Type header must be specified. Scott Guthrie explains it here http://weblogs.asp.net/scottgu/archive/2007/04/04/json-hijacking-and-how-asp-net-ajax-1-0-mitigates-these-attacks.aspx.  

After reading documentation from both camps I can fully understand their opposing views.  Ultimately it is yet another indicator that the responsibility of user protection lies in the browser is blatantly wrong!  If the browser raised a message asking the user if they are ok with a cross domain request and acted according to the response it would render both jQuery’s and Microsoft’s approaches obsolete.

So now I am caught between a rock and a hard place.  I love jQuery and I love Microsoft ASP.NET webservices and I am going to use both in my current projects.  But, if I can not explicitly set the Content-Type header for an .ajax() GET then I have just one choice and that is to use POSTs instead.  Unfortunately this contradicts the notion of using the correct HTTP verbs and removes the possibility of a RESTful API. 

It’s always about compromise.

On March 22 Kate gave birth to Bjorn Thomas Eidsvik.  I’m going to check with Bruce about cross posting some of the images here.  Everyone is doing very well and Bruce seems to have some idea that Bjorn will be competing in the 2034 Winter Olympics.  If little Bjorn is even slightly like his parents I’d say that is a very likely prospect 🙂


The Calais Web Service

The Calais web service automatically attaches rich semantic metadata to the content you submit – in well under a second. Using natural language processing, machine learning and other methods, Calais categorizes and links your document with entities (people, places, organizations, etc.), facts (person ‘x’ works for company ‘y’), and events (person ‘z’ was appointed chairman of company ‘y’ on date ‘x’). The metadata results are stored centrally and returned to you as industry-standard RDF constructs accompanied by a Globally Unique Identifier (GUID). Using the Calais GUID, any downstream consumer is able to retrieve this metadata via a simple call to Calais.

This metadata gives you the ability to build maps (or graphs or networks) linking documents to people to companies to places to products to events to geographies to … whatever. You can use those maps to improve site navigation, provide contextual syndication, tag and organize your content, create structured folksonomies, filter and de-duplicate news feeds or analyze content to see if it contains what you care about. And, you can share those maps with anyone else in the content ecosystem.

Yep, I can’t wait…