Wednesday, January 21, 2009

Playing around with Google's AJAX APIs



For me, documentation isn't always enough to learn about APIs; I need examples that I can play with. That's why I started a fun project recently--a tool for teaching developers how to use Google's JavaScript APIs: the AJAX API Playground. I have been working on this in my 20% time and today I am proud to announce that we are launching the AJAX API Playground as the official way that Google will show JavaScript samples!
The AJAX API Playground is currently loaded with over 170 samples for 8 Google JavaScript APIs (Maps, Search, Feeds, Calendar, Visualization, Language, Blogger, Libraries and Earth) that you can edit and run to help you explore what Google's APIs have to offer. There are also save and export features. The save feature allows you to hold onto an edited sample so you can continue working on it later, while export lets you modify a sample and publish the code to a permanent url.

As the AJAX API Playground is built on App Engine, you can create your own App Engine instance to show off your code samples. The code is open sourced under an Apache 2.0 license and uses several open source libraries and tools, including jQueryjQuery UIYUI Compressor, and CodeMirror. You can find the code on Google Project Hosting and learn about adding samples on the project wiki.

Stay tuned for more samples for more APIs. Enjoy!

13 comments:

  1. Hi,
    a very good project!
    Please, add more and more Samples (Google Docs, Spreadsheet-API, Tabbed-Ajax-Feed-Reader etc.)

    Thank you!

    ReplyDelete
  2. Congratulations for shipping it Ben, this will be useful for many APIs and projects.
    Very much in the same spirit as Paul Buchheit's post http://paulbuchheit.blogspot.com/2009/01/communicating-with-code.html

    ReplyDelete
  3. Just added a link to the AJAX APIs Playground to my post about Using Google's Ajax APIs.

    Thanks guys, this seems like a pretty awesome tool!

    ReplyDelete
  4. This is such an awesome tool! I've been wanting something like this for a while!

    ReplyDelete
  5. This is an amazing addition. I've been self-learning Javascript and Ajax from a book, this makes it so much easier.

    ReplyDelete
  6. This feature is AMAZING!!!
    thanks a lot!:)

    ReplyDelete
  7. As they rightly say, examples is not the best way to explain things but it is the ONLY way.

    ReplyDelete
  8. Right direction, add more.

    ReplyDelete
  9. This comment has been removed by a blog administrator.

    ReplyDelete
  10. I can't find where the actual playground code lives. The link seems to be to the examples, not the actual code that I could run on app engine. Please confirm.

    -Chris

    ReplyDelete
  11. Cool project. I like the edit/experiment side of it.

    Chris: I think you are looking for the Playground's project page at http://code.google.com/p/google-ajax-examples/. Which is cool. Now other sites can set up interactive samples of their code too.

    ReplyDelete
  12. Love it. Thank you!

    ReplyDelete
  13. I really like this to learn to code. One thing I would love to see Google do is a website/application where geared toward children to learn HTML/API/coding etc. I think in this day and age, children should be learning webcode along with Grammar, Math and History

    ReplyDelete