I am taking my “Separating REST Facts from Fallacies” on the road next week:
NxtGenUG at Microsoft Research Cambridge
Tuesday 17th February 2009 (map)
LondonDotNet User Group at Conchango
Thursday 19th February 2009 (map)
I am taking my “Separating REST Facts from Fallacies” on the road next week:
Tuesday 17th February 2009 (map)
Thursday 19th February 2009 (map)
After the Open Space Coding Day last Saturday there were a number of discussions about how the event format might be improved. One of those discussions got me thinking about how you might combine the extreme programming practice of Code Spiking along with the collaborative style of Open Spaces.
So I decided that I would try out another experimental format, which I am going to call “Community Code Spike”. The recipe is as follows:
I was inspired by a conversation with Jamie Thomson to propose “working out what is the best way to abstract the DAL in a web application to make the business logic agnostic to being self-hosted or Azure hosted.” as the first spike topic – to be held at the MoveMe.com offices on 14th March at Buckingham Gate, London.
All notes and code will be checked-in to Google Code under the MIT license in order that the community has access to the output of the spike.
At the moment, I have 6 developers lined up:
I suspect that 6 will be a good number for the event – I also think that it is the appropriate number for our offices (any more and we would need to find a bigger place to host it).
Like the Open Space Coding Day, this will not be a one-off event. On the other hand, it is a format that suits ad-hoc arrangements so I won’t be hosting it on a schedule. Instead, I will put together groups of people according to the topic ‘at hand’ based on what I know of their interest and work out what is the right date for that group.
If you like the idea – why not try it out yourself?
You just gotta love twitter.
During yesterday, there was a chat with Mendelt Siebenga and Kees Dijk who liked the sound of what we did in London from reading the twitterstream. They may put together an Open Space Coding Day of their own in Amsterdam. If this turns out to be a viral meme, then I will be a happy man :-) the more, the merrier!
I felt that the first Open Space Coding Day on Saturday validated my belief that if you get a group of geeks together who care enough, great things happen.
Some of the attendees have already posted about their experience:
People were twittering during the event as well:
The morning sessions that the attendees voted for were:
The afternoon sessions were:
The concept for Open Space Coding is “all about doing, not about talking”. So, no PowerPoint slide decks and no speakers. People really seemed to take this emphasis on board and the atmosphere was totally different to other events that I have attended – it felt very ‘studious’ to me. Someone else described it to me as ‘collegiate’.
I took on the role of being ‘host-at-large’ during the day, checking in on the different rooms to see if things were running smoothly. This wasn’t onerous, but it did allow me to pass on effective practices that were being used in one room to other rooms. One takeaway is that next time, we need to have instructions beforehand on setting up access to the repository so that less time is lost wheel-spinning in the first 30 minutes.
The event repository is http://code.google.com/p/openspacecode/
Thank you to EMC Conchango for kindly hosting us for the day – it really makes a difference having a company who is so open to engagement with the community. Thanks also to Michelle Flynn for all her help. Conchango have a Microsoft Surface table, so at lunch there was a chance to play with this cool technology:
Of course, no geek event is complete without the social element and we adjourned to The George on Borough High Street after the event for a well-deserved drink.
I will be posting over the next few days about the feedback from the Retrospective and about other ideas that I would like to take community feedback about.
Nothing very exciting, to be sure, but the first Coding Day is now up on http://openspacecode.com/
In November, I gave my “Separating REST Facts from Fallacies” presentation at DDD7 and I now have the video. Please be aware that the flash stream is 178MB, so please be a little patient whilst it downloads:
The embedded video works fine in both Firefox and Chrome but my IE7 isn’t playing ball, so there is also a WMV version (290MB) available for download.
I have been dealing with the problems of internationalization (i18N) in order to make applications world-ready for over a decade now. In fact, many years ago, my first community presentation was “Internationalisation and Globalisation in Visual Basic 6”.
There has recently been a discussion on the [rest-discuss] list titled “Conneg for language selection: Just Say No”. I wrote a lengthy response on the thread and thought that there was value converting that into a blog entry.
Translation is the conversion of source text in one language to target text in another language.
Localization (l10N), whilst typically involving translation, is the process of cultural adaptation.
Imagine that you are book publisher responsible for publishing a work of Leo Tolstoy. In Russia, you would not translate the text (the original being written in Russian). But you would still localize by, for example, putting a price on the cover in roubles. You might then order a translation to French and the imprint would be localized by having a price in euros. Depending on your marketing, the localization may also involve changing the jacket image and will certainly require the book title to be translated as well. However, it seems that there is a section of the market for Tolstoy in France that reads in Russian. In which case, you may decide to have an additional imprint that has no translation but still requires localisation of both jacket image and prices.
In REST, it important to distinguish between different resources and different representations. When using HTTP, you can content negotiate (conneg) between alternate representations, but you should not do so between different resources. Instead, you should provide the user with links to follow to view the different resources.
Localization conneg can be either language-driven from the Accept-Language HTTP header and/or country-driven from the Request-IP address. Both are valid localizations and both can be used in concert. For example, the price of goods and services are country-specific localizations rather then language-specific (both in terms of the currency used and the tax regime to be applied).
Before I go into more detail with my examples, I want to make it clear that what URIs look like is, prima facie, unimportant to REST. This is sometimes referred to as URI opacity or opaqueness. Nonetheless, there are good patterns we can employ for URI structure and human-readable URIs are considered to be ‘a good thing’.
Carrying on with the Tolstoy example, here is how I would personally approach the structure and content negotiation of his book “Anna Karenina”
http://www.example.com/book/leo-tolstoy/anna-karenina
In this example, I have used the English translations of both names but any language would be acceptable. It is worth noting, however, that regardless of how much we may dislike the fact, American English is the de facto default language of the Web. I would argue that you need a good reason to depart from American English for ‘canonical’ URIs. This is not to say that you cannot have localized URIs as well. In the example below, you can see “book” being translated into “livre” on the URI.
Content negotiate based upon Accept (for media types) and Accept-Language to a list of the various translations of Anna Karenina using the following URI structure:
{canonical-baseURI}.{language-token}.{media-type-token}
| URI | Language | Media Type |
|---|---|---|
http://www.example.com/book/leo-tolstoy/anna-karenina | No representation | |
http://www.example.com/book/leo-tolstoy/anna-karenina.en.html | Generic English | HTML |
http://www.example.com/livre/leo-tolstoy/anna-karenina.fr.html | Generic French | HTML |
http://www.example.com/livre/leo-tolstoy/anna-karenina.fr-fr.html | French, as spoken in France | HTML |
http://www.example.com/livre/leo-tolstoy/anna-karenina.fr-ca.html | French, as spoken in Canada | HTML |
http://www.example.com/book/leo-tolstoy/anna-karenina.en.atom | Generic English | Atom |
http://www.example.com/livre/leo-tolstoy/anna-karenina.fr.atom | Generic French | Atom |
http://www.example.com/livre/leo-tolstoy/anna-karenina.fr-fr.atom | French, as spoken in France | Atom |
http://www.example.com/livre/leo-tolstoy/anna-karenina.fr-ca.atom | French, as spoken in Canada | Atom |
Each of these pages should contain a list of links of the available translations and the countries in which they are available for purchase.
There are a number of different ways of hosting country specific URIs:
http://www.example.co.uk or http://www.example.fr http://uk.example.com or http://fr.example.com http://www.example.com/uk/ or http://www.example.com/fr/ For my example purposes, I will simply use ccTLDs. If we look at the way in which we have set up our content negotiation for the canonical example above, we see that we can use the same pattern. In many cases, language negotiation isn’t provided for ccTLD domains unless there are multiple official languages. So for http://www.example.fr there might only be localization to French but for http://www.example.ca there would likely be localization to both English and French:
| URI | Language | Media Type |
|---|---|---|
http://www.example.ca/book/leo-tolstoy/anna-karenina | No representation | |
http://www.example.ca/book/leo-tolstoy/anna-karenina.en-ca.html | English, as spoken in Canada | HTML |
http://www.example.ca/livre/leo-tolstoy/anna-karenina.fr-ca.html | French, as spoken in Canada | HTML |
http://www.example.ca/book/leo-tolstoy/anna-karenina.en-ca.atom | English, as spoken in Canada | Atom |
http://www.example.ca/livre/leo-tolstoy/anna-karenina.fr-ca.atom | French, as spoken in Canada | Atom |
In some cases, such as Google, the canonical URI step is skipped by sniffing the Request-IP address and then redirecting straight to the ccTLD. Google has the good manners to also provide a link back to the .com domain when it does this.
The Call for Speakers has been put out for DDD Belfast on April 4th.
I have submitted a double session on REST. The first session is a reprise of the session I gave at DDD7 and the second session is a new presentation about Azure:
My Christmas present to myself this year was a Android developer phone and it arrived earlier this week. Previously, I was using the Nokia N95 which I liked a great deal but it was time to upgrade. What phone to choose though? I could have followed the well-trodden route and buy an iPhone. Certainly, the iPhone seems very nice. At the PDC I watched others using the iPhone around me and I was impressed by the ease-of-use, so it was a strong option. However, it would mean changing my phone provider to O2, who have exclusivity for the UK and I left O2 a while back because of the poor reception quality I was getting. What is more, I couldn’t help but feel that was rather me-too and I am not really that much of a fan of Apple.
So the Android G1 seemed like it was worth a try-out. The developer phone is totally unlocked, although a little pricey at $520 including tax and shipping, so I don’t need to leave Orange to use the new phone. You also need to be registered as a developer on the Android Market to be able to buy the phone, which costs $25 (presumably to discourage timewasters).
You will need to buy a US to UK Plug Adapter to charge the phone from the mains. You can also charge it from a PC or laptop via the USB cable which is important because the phone burns through battery life fast when in use. I estimate that it has a standby battery life of about 24 hours but only about 2 to 3 hours of active use.
The phone does not come with a manual, or at least mine didn’t.
When you first power-up the phone, you need to configure the APN for your operator. There is a note in the box which tells you to visit Quick IM for instructions on how to do this. I found the whole thing very confusing. Turns out, to set it up for Orange, all you need to do is type "
orangeinternet" into the APN textbox. I wasted a lot of time figuring out that simple thing out. Also, don’t be fooled by the GPRS in the page title – there is just one setting for GPRS, 3G and 3G+ (the phone negotiates to the highest available connectivity type).
After setting up the connectivity, you are next required to either sign in to an existing Google Account or set up a new one. So far as I know, there is no way to run the phone without a Google Account.
Even better, you can use your Google Apps for Domain account. This is perfect for me as I have set up all my email accounts and calendars to forward or synchronize onto my Google App Domain, so that I have a single place to go.
I have been very impressed with the seamlessness of the integration between the Google account and the Android. All of your Gmail contacts are synchronized across. The phone is very tolerant of the formatting you use for phone numbers and if your contact has an address, the phone contacts allows you to go straight to the integrated Google Maps application to view the address location.
The email interface is clean and easy to use. Touch really works well for scrolling through lists and items. Unlike the iPhone, the Android G1 screen flips out to expose a keyboard:
Not all of the Google stable of applications have integrated applications. Google Docs and Google Reader have to be accessed via the browser, but have nice clean interfaces which I assume are similar to the iPhone versions.
Thought has clearly been given to the nature of intermittent connectivity when mobile. The integrated apps such as Contacts and Mail synchronize so you can work offline and the browser versions are tolerant of connection dropouts. For example Google Reader will gracefully retry without intervention until a new connection is established. This is very unlike Reader on the N95 browser which spits out errors when the connection drops out.
The phone desktop has three panes which you can flick between. The right-hand one has a search entry form which has an intelligent dropdown, which often saves you typing everything completely and also fixes up your spelling when you make a mistake on the keyboard (a feature I like a lot).
All-in-all, I think that this is a wonderful phone that I am very glad to have bought. Better battery life would be nice. You can replace the battery, which allows you to carry a spare, but the procedure for doing that is rather fiddly (unlike the Nokia 95, which makes swapping a battery very easy indeed). The level of usability is on an entirely higher level than any other phone I have used and is good enough for me to productively use the time on the train into work to clear down my email backlog from overnight, catch up on Reader and so on. It will see heavy use from me!