JSON Quickly Quietly Become Defacto Standard?

I have long been a fan of JSON. At RideCharge we still work with xml and soap, and they are fine (still better than FTP drops). The truth is when you have to do B2B work you usually agree to almost anything to get your work done.

But when you release a web service for public consumption, you really need to think about in what format you want to expose your data. We expose most of our APIs in JSON, XML, and YAML. We only get this luxury because it takes almost no effort to do all three. I mean, come on, who would expose something in YAML otherwise J.

That is why it was semi surprising when Google quietly announced their new server-side AJAX API would be JSON only. At first it made very little sense to me, but after some thought, it makes reasonable sense. I declared that 2007 was going to be the year of JavaScript Only APIs (I am a tech blogger not a futurist), because Google released their AJAX Search API as JavaScript only. But now I see it is much more about supporting only one output format, JSON. Whether it is consumed by you, me, Google or Google AJAX JS API. They realize their data is valuable enough, if you want it, you will write:


JSON.parse(response.body)

Danger Day!

I too love, Ze Frank. That’s why I was pretty excited when I got my invite to Fire Eagle. Also I am, not so secretly, a location based nerd (LBN).

Fire Eagle is a new location service from Yahoo. You tell Fire Eagle where you are, then you authorize other applications to use that information on your behalf. It uses a new standard OAuth, which is awesome. The possibilities are endless. Unfortunately, I can’t think of anything interesting to do with it.

It is probably the fact that my company shares a floor with a marketing company, but the only cool thing I can think of, is coupons for (very) local restaurants and other businesses. But that is lame, and pretty close to spam, even if you ask for it.

Another idea I had was to make a site where people identify themselves as something, like a ruby programmer. Then map the density of groups of people. It would be cool, but not more than a social experiment. If you struck quickly enough, people would be into it. But, in the end it would be just a social experiment and people would get bored after Railsconf (see you there).

Someone will come up with something cool, but I think that the crux of Fire Eagle is getting your location automatically updated. Probably by an application running on your cell phone or laptop. If it isn’t automatic, it is impossible to remember to update it.

I hope someday soon I will be able to Ride the Fire Eagle. Until then, you can find right here.

Five cool things about the iPhone SDK

iPhone SDK logo

  1. Rich - not as in you’re gunna be - but as in you have access to everything.

  2. Core Location - being able to tap into the same “find me” functionality as Google Maps is gunna be killer.

  3. Gestures for Web Apps - it is difficult to say how easy it will be to work with these, but it is exciting.

  4. Fullscreen mode in web apps - make your web app feel like a native app.

  5. It’s Finally Here!

Google Charting API

As you have most likely seen by now. Google put out a [charting api](http://code.google.com/apis/chart/ “Developer's Guide - Google Chart API - Google Code”)! It is crazy simple to use. There are two factors that will make this api an instant success.

1. It is entirely url based.
2. It has no api key.

These factors are important and work in conjunction with one another. It comes down to the fact that there is *almost* no risk for a web developer integrate with google charts. You never have to worry about your site getting too successful, there is a limit of **50,000** charts per day per IP. Since the IP that generates the chart belongs to your end user, your site’s IP won’t even generate 1 chart, thus no risk.

I messed around with the api for about an hour last night and found it easiest to make pie charts. But, I really like the fact that I can include a chart in my blog post without any plugins and very little effort.

![chart](http://chart.apis.google.com/chart?cht=p3&chd=t:45,22,18,2,8,5&chs=400×200&chl=Google|Ruby|JavaScript|SQL|HTML|CSS&chtt=Nicholas’s+Language+Usage&chco=ff0000,000000,00ff00,0000ff “Nicholas’s Language Usage”)

And Here is the url broken up by data parts:

http://chart.apis.google.com/chart?cht=p3&
chd=t:45,22,18,2,8,5&
chs=400×200&
chl=Google|Ruby|JavaScript|SQL|HTML|CSS&
chtt=Nicholas’s+Language+Usage&
chco=ff0000,000000,00ff00,0000ff

Google “AJAX” Feed API

I am not a developer who is easily worried. But when you have a company who is consistently lowering the barriers to entry into the world of web development, maybe I should. I am of course talking about the juggernaut that is named google. Despite their obvious, [to me](http://www.simpltry.com/2007/01/17/google-ajax-search-api-in-theory/), naming debacle, they have once again knocked an [API](http://code.google.com/apis/ajaxfeeds/) out of the park.

They took something fairly straight forward, rss feeds, and made them stupid simple. If a site is using rss .94, 2.0 or one of those crazy atom people (we know it is superior, get over it), the API cares not. You pick any public feed, it says here are your well are your well formatted JSON objects. If you are super masochistic you could use xml, but then you would spend all your time cursing IE for not supporting [e4x](http://en.wikipedia.org/wiki/E4X).

Since [Simpltry](http://www.simpltry.com/ “Simpltry”) is a blog, it has an [rss feed](http://www.simpltry.com/?feed=rss2). Using this rss feed you could, my adoring fan, include a list of titles for my last 3 blog posts.

function initialize() {
google.load(”feeds”, “1″);
var feed = new google.feeds.Feed(”http://www.simpltry.com/?feed=rss2″);
feed.load(function(result) {
if (!result.error) {
var container = $(”feed”);
result.feed.entries.each(function(entry, i){
var div = document.createElement(”div”);
div.appendChild(document.createTextNode(entry.title));
container.appendChild(div);
if(i > 2) {
throw $break;
}
});
}
});
}
window.observe(”load”, initialize);

I updated google’s hello world example to make it a little more [Prototypical](http://prototypejs.org). It is beyond the scope of this article to explain what each line does, but suffice to say it gets simpltry’s rss feed and prints the first 3 titles into the **#feed** container.

Referring back to the first sentence of this article. Why am I worried? Is the question I find myself asking. Well coming from a server-side world I have always enjoyed a certain comfort that I have abilities and resources my client-side counterparts do not. But, as more and more companies add APIs similar to this, I may not enjoy that luxury forever. This API really gives me no new functionality, I could always write up a quick script to slurp an RSS file and display it on a web page. But now so can anybody, and not to mention they can do this all by hitting a super fast cached google server, instead of slow personal blog servers.

I really think this is going to produce some cool mash ups, there are some very creative people out there who haven’t had the opportunity to access this data from a programatic point of view.

Feeds/Syndication