Status

Location
Arlington, VA
Subscribe to GeoRSS Subscribe to KML


Technology

Rails interfaces to Mac Applications

Published in Apple, Rails


The new version of Mac OS X, Leopard, came with a much anticipated feature - an officially supported set of Ruby bridges to Cocoa (the Mac OS X Framework) and AppleScript. Digging around I couldn’t find the pre-installed versions, but it was easy enough to gem install rb-appscript

I’ve been playing around with the very complete examples over the last couple of days and am really impressed with how easy it is to build Cocoa apps in just a few lines of Ruby code and using the new InterfaceBuilder. You get full-fledged support of all OS X’s goodness without having to worry about Objective-C.

However, I hadn’t fully considered some of the implications of this until I was stumbled across the open-source OmniFocus-UI. It is a Rails app written as an iPhone interface to the Productivity application (GTD) OmniFocus. It essentially provides a very lightweight web interface to the application by way of the AppleScript interface. rb-appscript and RubyOSA are two Ruby AppleScript bridges that make AppleScript actually really nice to work with.

The fact that it’s a Rails app is almost silly. There is no database connection to speak of. All storage and primary functionality is handled by the app itself. OmniFocus-UI could probably be rewritten as a Camping or Merb application very easily with a much smaller footprint.

The way the Rails app works is that the controllers just route commands via rb-appscript. So when you want a list of contexts (organization of todos), the Rails app just needs to do the following in Ruby:

require 'appscript'
doc = Appscript.app("OmniFocus").default_document
doc.contexts.get.length

Or to see how many Inbox items you have:

doc.inbox_tasks.count

If instead you want to use RubyOSA, it’s really just the Class name that changes (and some more underlying bits):

require 'rbosa'
doc = OSA.app("OmniFocus").default_document

What this means is, it’s very easy to build web interfaces on top of any AppleScript-able Mac application. The one difficulty, however, is configuring your Mac to make it easily externally accessible from anywhere on the Web. If you’re handy on IT, you can always setup port-forwarding on your router.

However, if you just want setup & forget, you should check out Prism (http://goprism.com) - which creates secure, private web accessible connections to your home computer.



Verizon opens the windows, catches a breeze

Published in Mobile


Cell Tower Antennasvia adoyle on #geo Verizon is opening its network to allow any device that passes ‘qualifications’ to be allowed on the Verizon cellular network. The concept was best summarized by Dick Lynch, Verizon Wireless’ CTO:

“If someone has the technical capability of building something in their basement on a breadboard … have at it,”

This is really exciting, and smart for Verizon to go the way of, well, the internet. You don’t have to be using “approved” hardware to go onto the ‘net. You just have to match certain protocols. Albeit Verizon will probably be a little more strict, but then again they are just the first. They build the network, you bring the concepts.

Of course, you have to wonder how they’ll charge when devices show up that don’t have a concept of “minutes of talk time”. From the PC World article: “Officials declined to discuss pricing details, only saying prices would be “competitive.” More pricing details should be available after a developers conference early next year, they said.”

Now I’ll have a much better justification to pick up that Cellular Quad Band Module with GPS and onboard Python interpreter.


Amazon’s Kindle - finally the eBook revolution?

Published in Gadgets


Current Reading  MaterialsAmazon released their digital book reader today, Kindle. It’s an ebook reader built using the same eInk technology found in Sony’s eReader - and also sports SD memory slot, EV-DO data access, and a keyboard.

I, like many others, have wanted the ubiquitousness of digital books in the same way that the iPod ‘revolutionized’ the music industry and made it easy and common to carry your entire audio collection in your pocket. Digital books aren’t new, I’ve read entire series of books on my old iPaq using Microsoft’s Digital Library and really enjoyed the experience.

It seems rather humorous that Amazon named a “book replacement” after something you burn. Are they implying a Fahrenheit 451 future? To its credit, Amazon used Neal Stephenson’s “Diamond Age” in the initial screenshots of Kindle - implying a utopic vision of digital literature access.

Another funny comment was the beginning of Amazon press release:

“Why are books the last bastion of analog?” Amazon CEO Jeff Bezos asked an audience at New York’s W Hotel in Union Square as he unveiled Amazon Kindle, the online-retail giant’s new electronic book reader.

Probably because so far, book publishers have felt justified charging full, hardback pricing for what is an entirely ephemeral medium. Why should anyone want to pay $20 for a digital book? Apple was one of the first to identify, and more importantly strong-arm the labels, into the pricing sweet-point of $0.99 for a song. Cheap enough for consumers to find it a better value than scouring music sharing applications and services.

Books are priced at $9.99, still more expensive than a mass-market book, but perhaps an expected pricing, commensurate with the price of an audio Album. Newspapers are about $9.99 / month, and magazines a reasonable $1.99 / month. However the licensing isn’t clear (can I resell my digital books when I’ve finished them?) iTunes tracks aren’t, so I would assume books aren’t either.

The demo video says Kindle has access to “hundreds of blogs”. Aren’t there actually millions of blogs? Assumedly they are only providing access to a select number of blogs with quality content. Also surprising is that you have to pay a monthly fee of approximately $1.99 each (some more, some less) to access these blogs. Are they sharing that revenue back to the blog owners?

It does have built-in access to Wikipedia. But will I be able to add access to my own portals, perhaps via an API? You can send PRC, Mobi, Word or Text documents, but what about PDF’s? Also, there is a small fee, 10ยข, for “converting” these documents.

A couple of really additional good looking things about the Kindle. The screen refresh looks quicker than the first generation Sony eReader. The wireless EV-DO access if free, assumedly covered as a percentage of your purchases, but you don’t have to directly pay for it.

Overall, Amazon’s Kindle does look rather compelling. Wireless access is especially powerful for accessing online information and easily downloading information from wherever you are. Perhaps a death-toll to Airport book stores? The price of books is probably reasonable and cheaper than the physical version.

Surprisingly, Amazon didn’t play up the environmental benefits of buying digital books instead of large amounts of paper and glossy magazines or newspapers. This could have a huge impact on consumer paper usage and waste and should probably get some more attention. Of course, it does mean “yet another device” to add to your bag.


Mapstraction adds support for OpenLayers

Published in Mapstraction, Technology


OpenLayers MapstractionMapstraction, the mapping abstraction library (write once, use any map provider) recently added increased support for OpenLayers, the very powerful, open-source Javascript mapping library. With this support Mapstraction users can now easily use the open-source OpenLayers API that is free from potentially restricting terms of service, or even use in offline and intranet applications.

You can see a demo of OpenLayers here or grab the latest revision here (r163 as of this posting).

This effort was headed up by Henri Bergius (aka Bergie), of Midgard fame, and now Mapstraction-OpenLayers will be supported in the Midgard CMS. Read more on Bergie’s blog.

In addition, by default the Mapstraction-OpenLayers creation uses the OpenStreetMap tiles, therefore no longer requiring a Google Maps API key just to use OSM in Mapstraction.

Why wrap one wrapper in another?

At conferences and get togethers, the devs and users of Mapstraction and OpenLayers frequently ask the question “What’s the difference between Mapstraction and OpenLayers?”

The primary distinction between the libraries is a difference in objective. Mapstraction seeks to provide a simple wrapper to meet the primary needs of a mapping user. The purpose being to make it easy for a user to read a single API and then easily switch to any of the major providers. By contrast, OpenLayers provides a very powerful, but potentially complex, interface that allows for bringing in content from OGC services, data feeds, overlays, and tile servers.

With Mapstraction generally targeting the ‘lowest-common denominator’ of all the API’s there isn’t built-in support for the additional capabilities of OpenLayers for layers, drawing, and services. However, Mapstraction goes provide a simple mechanism for gaining access to the underlying mapping provider such that a developer can utilize Mapstraction for the 80% of their development, and then access the remaining 20% provider specific capabilities directly.

All you need to do is call getMap() on the Mapstraction object to get the underlying OpenLayers object and go to town.

With this new support, it now brings Mapstraction up to 9 supported map interfaces (Yahoo, Google, Microsoft, Map24, MultiMap, MapQuest, FreeEarth, OpenLayers, OpenStreetMap). If you are a map provider and would like to find out how to be the 10th provider feel free to email the dev team - mapstraction@lists.mapstraction.com.