A Look Inside the Think Tank...
JRON - From JSON to RDF by Sandro Hawke
Created on Friday, June 04, 2010 at 15:53:19 and categorized as Technical
JRON - From JSON to RDF by Sandro Hawke
@mamund pointed to @sandhawke's proposition to convert RDF to JSON. Read his piece From JSON to RDF in Six Easy Steps with JRON first. Below, co-posting my comment I made there also on my blog:
Hi Sandro,
Interesting concept! I quite like it and I'm currently struggling with a relatively similar issue of embedding RDF in XML (Media RSS more specifically). Couple of remarks: you mix foaf_name and foaf.name in your examples, you probably meant to write '_' consistently, but in the end the choice is random. I tried to model the very simple concept below, taken from one of your presentations:
In Notation 3 (I abused FOAF for the concept of nickname of a state here):
@prefix foaf: <http://xmlns.com/foaf/spec/> .
<http://dbpedia.org/resource/Massachusetts> foaf:nick "Bay State" .
I tried to convert this to JRON:
{
"dbpedia-owl_AdministrativeRegion" : "http://dbpedia.org/resource/Massachusetts",
"foaf_nick" : "Bay State",
"__prefixes": {
"foaf_" : "http://xmlns.com/foaf/0.1/",
"dbpedia-owl_" : "http://dbpedia.org/resource/"
}
}I think it is necessary to assign <http://dbpedia.org/resource/Massachusetts> a type (dbpedia-owl:AdministrativeRegion), as I believe with JRON it is not possible to express the simple concept in Notation 3 syntax above, or in RDF/XML syntax below:
<?xml version="1.0"?>
<rdf:Description
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:foaf="http://xmlns.com/foaf/spec/"
rdf:about="http://dbpedia.org/resource/Massachusetts">
<foaf:nick>Bay State</foaf:nick>
</rdf:Description>
Probably I'm just missing something obvious, though. Anyway, assuming my additional typed interpretation of JRON was correct, then hopefully I applied your xml:lang JRON transformation correctly?! See below:
{
"dbpedia-owl_AdministrativeRegion" : "http://dbpedia.org/resource/Massachusetts",
"foaf_nick" : [
{
"__text" : "Bay State",
"__lang" : "en"
},
{
"__text" : "État de la Baie",
"__lang" : "fr"
}
] ,
"__prefixes": {
"foaf_" : "http://xmlns.com/foaf/0.1/",
"dbpedia-owl_" : "http://dbpedia.org/resource/"
}
}Is there a better way to express any of this in JRON? Looking forward to your response. Thanks!
Cheers,
Tom
Show/Hide Comment Form | Show/Hide Comments | Permalink | JRON - From JSON to RDF by Sandro Hawke
New Job: Switching From Part-Time Customer Solutions Engineer to Full-Time Research
Created on Monday, May 17, 2010 at 17:54:08 and categorized as Work
New Job: Switching From Part-Time Customer Solutions Engineer to Full-Time Research
- Personal announcement no. 1: as of May 15 back to a full-time contract. Doing 100% research as a day job for Google now.
- Personal announcement no. 2: focus of #TomsPhD (Twitter lingo for Tom's PhD) still is REST, HATEOAS, API description,... but for the ISEARCH EU FP7 project.
- Personal announcement no. 3: new job title: Research Scientist. Good that I printed generic business cards last time.
Update: added personal announcement no. 3.
Show/Hide Comment Form | Show/Hide Comments | Permalink | New Job: Switching From Part-Time Customer Solutions Engineer to Full-Time Research
Regarding mca's "The Cure for URI Construction in your Web API is URI-Templates"
Created on Wednesday, May 05, 2010 at 12:29:23 and categorized as Technical
Regarding mca's "The Cure for URI Construction in your Web API is URI-Templates"
I saw this pattern recently where a blogger would write up a half-hour-long comment on someone else's blog, but not update his own blog for years, and then wondering why she wouldn't have time to work on her own blog... Recognizing myself here (oh, if you remember where you saw this pattern, too, please ping me so that I can give proper credits). Anyways, I follow Mike Amundsen (@mamund on Twitter) and came across his tweet where he announces his blog post The Cure for URI Construction in your Web API is URI-Templates (Mike, hope you forgive the upper case). First, please read his blog post, then second, if you're still here (or even came back after reading his post), you can read my comment (reposted here, slightly reformatted, corrected the unavoidable typos, and probably introduced some new ones):
Hi Mike,
A note from pedant's corner: in the example:
===you probably meant to write
http://www.example.org/messages?d2={date-start}&d2={date-start}&c={category}&o={owner-user-id}&t={title-text}....." rel="query" />
===
===Note the query parameter names/values and the <link> boilerplate.
<link-template href="http://www.example.org/messages?d1={date-start}&d2={date-end}&c={category}&o={owner-user-id}&t={title-text}....." rel="query" />
===
Nice write-up besides this. From a REST theorist's point of view I'd say we don't need URI templates at all, because APIs should just have one entry point (and no documented end point[s]). From a REST practicioner's point of view I agree that sometimes you might want to provide a little more guidance...
With regards to query languages honestly I have not yet made my mind entirely up. As long as it is e.g. (sticking to the YQL example):
===I'm probably OK with it, however, as soon as we see things like:
GET http://www.example.org/users?q={encoded-yql-SELECT-statement}
===
===we are back in the ugly land of tunneling RPC... As I said, I have no final opinion yet, but I'm happy to learn from other commenters here.
GET http://www.example.org/users?q={encoded-yql-UPDATE-statement}
===
Thanks,
Tom
Disclaimer: I'm @tomayac on Twitter and currently work on my PhD. You can track my progress via #TomsPhD.
Show/Hide Comment Form | Show/Hide Comments | Permalink | Regarding mca's "The Cure for URI Construction in your Web API is URI-Templates"
BTstack Keyboard & BTstack Mouse Live Demo on an iPhone 3G
Created on Friday, April 09, 2010 at 11:34:49 and categorized as Technical
BTstack Keyboard & BTstack Mouse Live Demo on an iPhone 3G
This video shows Matthias Ringwald's BTstack, BTstack Mouse & BTstack Keyboard (all available at http://code.google.com/p/btstack/) in action on an iPhone 3G. It's amazing how far you can go with a phone that actually is a computer. The iPhone hardware is awesome, so is the UI and the sometimes almost anal love for the details Apple has put into getting things right. Unfortunately they seem to have lost grounds a bit with their latest Terms & Conditions (see http://fuckclause331.com/ for details).
Hardware used in the video:Thank God there's the Jailbreak community that opens up the iPhone OS. Oh, and obviously, thank God even more that there are alternatives:
Show/Hide Comment Form | Show/Hide Comments | Permalink | BTstack Keyboard & BTstack Mouse Live Demo on an iPhone 3G
Attending Mobile World Congress (MWC) 2010
Created on Wednesday, March 10, 2010 at 00:03:46 and categorized as Technical
Attending Mobile World Congress (MWC) 2010
Disclaimer: I work for Google, but currently not on Android, and attended MWC out of private interest during my vacation
Thanks to my employer I got a complimentary pass for Mobile World Congress in Barcelona, Spain, along with admission to the Android Developer World Tour (yes, the series of events where people got free Droids/Nexus Ones so far). The Android event was to take place on Wednesday, so for the other days I focussed on the exposition itself, the App Planet, the developer labs of other vendors, and the conference. MWC is clearly a B2B event where vendor folks, hardware folks, and carrier folks gather, short, suit and tie people. Developer folks like me, short, jeans and whatever t-shirt people could be rarely spotted, and obviously spend most of their time at the developer labs, or have a booth for themselves at the App Planet.
Developer labs of other vendors
I mainly attended the Vodafone 360 lab that had a strong focus on W3C widgets. The technology was presented by Wolfram Kriesing from Uxebu. We had a short chat after his talk and agreed that many native apps don't necessarily have to be native apps, however that the lack of payment systems (both the initial app purchase and later on in-app purchase) for widgets/Web apps is the main reason for absurdities like a native app consisting of just a WebKit wrapper and all the logic sitting in a remote "Web app".
On Tuesday I attended the BlackBerry Developer Day with a couple of interesting technical sessions, the main take-aways being first that besides their spot in enterprise BlackBerry also wants to be a gaming platform with full Open GL ES support, and second that layout managers seem to require a lot of DIY (do it yourself) in order to actually be useful. In the evening they took all developers out to the FC Barcelona stadium for a Camp Nou inside tour which was pretty amazing.
What I (and probably many others) seem to forget with all the Android and iPhone hype: BlackBerry is a still the growing number 1 platform (BlackBerry market share on Google News) with a huge foot in enterprise, but with a recent strong focus on end-consumers. This makes in-between development solutions like PhoneGap and Appcelerator Titanium even more attractive, at least in my opinion.
The conference
While in theory open to silver/gold/platinum pass holders only, I could sneak into the conference on Monday with a regular exhibition visitor pass. To be honest, panel discussions as seen many times before (e.g. do you think that fragmentation into different app stores hurts the platforms?). Eric Schmidt's keynote on Tuesday was live-streamed to the venue, so no need to attend in person. Eric's main message was mobile first which was received with applause. The second announcement was that Flash will come to Android, Adobe also demonstrated this before on several devices the day before at their booth.
The exhibition
As said before, MWC is a B2B event, so there was a strong focus on doing business with many companies offering closed meeting areas or so-called hospitality suites. I did not care about the lower stack (antennas and the like), but more the device stack and the software stack. Many new promising Android devices were shown, and Samsung was proud of the new Samsung Wave, but finally I saw nothing really ground-breaking which is probably due to the fact of me being spoiled by the Nexus One expectation-wise. On the software side I was "wow-ed" by what The Astonishing Tribe (TAT) from Sweden showed off. Make sure to check out the TAT demos on YouTube. One of the highlights of course was Steve Ballmer announcing Windows 7 Phone. I found out about this just hours before via Twitter (#mwc OR #mwc10). It felt a little bit like witnessing history when Steve shouted out the news.
Android Developer Labs 2010
To many the highlight of this year's MWC, obviously due to the fact of Google giving out free Droids/Nexus Ones to developers. There were two sessions, one on game development and the other a general introduction to the Android platform. I did not attend the prior because it was sold out, and the latter was by design very basic. My main interest was to get to know the Android Developer Relations team a little better. Definitively one of the most fascinating teams at present within Google.
Summary
MWC was a great event where I have learnt a lot. I am mainly an Android and iPhone guy, so getting a broader vision on what BlackBerry and the W3C widget guys at Vodafone are up to was for sure a great side effect of attending the event. If I'd go again probably two well-chosen days would do (well-chosen because of the different developer labs on each day). Three days at least for me was too much. I could have saved some time by not attending the conference part.
Finally thanks BlackBerry and Vodafone for the great developer days, the Israel Mobile & Communications Association for the sandwiches and Skype for the coffee... Thanks to Google for hosting the Android Developer Labs and of course for the exhibition visitor pass.
Oh, and as a side note: it was raining in Barcelona... This was the second big news after the announcement of Windows 7 Phone.
Show/Hide Comment Form | Show/Hide Comments | Permalink | Attending Mobile World Congress (MWC) 2010

}
Thomas Steiner wrote:
Comment created on Monday, June 07, 2010 at 14:45:31Sandro has sent me the response to my question:
{ "__iri": "db_Massachusetts",
"__foaf_nick": "Bay State",
"__prefixes": {
"foaf_" : "http://xmlns.com/foaf/0.1/",
"db_" : "http://dbpedia.org/resource/"
}
}
So basically the "type" of db_Massachusetts is "IRI". This was easy... Thanks for clearing this up.