« August 2006 | Main | October 2006 »

Time for a little break

Sep 26 by Andre in Misc »
I'm taking the rest of the week off to do a trip I've wanted to do for a while -- San Francisco to Portland on the Suzuki. The route is Hwy 101 up through Northern California, Klamath and the Redwood National Park, then cutting over to Interstate 5 the rest of the way up through Oregon. I may or may not hit Crater Lake on the way back, depending on time, weather, etc.

Is there a better way to interact with your web app?

Sep 24 by Andre in Usability »
I have been thinking lately about ways to interact with web applications outside of the web browser. While I was at my last company (which built an intranet/KM solution for law firms), I built a proof-of-concept app to provide as-you-type search across the Knowledge Base right from the windows task bar. The contents of the intranet became more useful because they were more accessible. It was an interesting app for several reasons: 1) it blurred the line between desktop and web app, 2) it provided users with a much shorter "mental route" to the information they wanted, whether it was a document in the DMS or a contact in their address book.

I think lots of web apps can benefit from asking the question: is there better way to interact with the app? Does the browser provide the best UI to get users what they need? Here are some other options I've come across:

  • Google Earth: If you have any geo-based data, it's easier than you might realize to expose your data on Google earth. I tried it with my Wifi cafes site, just because it's a convenient source of geocoded data. At the easiest level, all you have to do is produce an XML representation of your data in the KML namespace. You can easily get a proof of concept up and going within an hour, and you'll have fun with different kinds of markers, making your markers float into space, etc. If you have real-time geo-spatial data (which I don't), you can implement a kind of auto-updating live feed into Google Earth as well.
  • Desktop presence:  Yahoo Widgets, Google desktop sidebars,etc. Got something so useful that you think users want to dedicate some desktop real estate so you can be all front and center? I would recommend Yahoo widgets first if you are Javascript savvy, since Y! Widgets are written in Javascript. I think there are a lot of possibilities here for small-business dashboard kinds of applications. What are the really important notifications and real-time metrics for a small business? Push them to the desktop with a Widget.
  • Windows taskbar: bubbles.  I found this one through Richard White's slimtimer. When Richard first released slimtimer, I didn't use it because the extra browser window cluttered my task bar and kept popping up in alt-tab. Bubbles provides a dedicated browser-like wrapper for web pages, but lives unobtrusively in the task bar. It's less work to bubble-ize your app than to widget-ize it, since Bubbles reuses lots of the UI you created to display in a browser.
  • SMS: Do you have data which 1) people would like to access on the go; 2) can be presented as text with relative brevity; 3) is useful spontaneously? Think about building an SMS query mechanism -- users send you an SMS with a query, you send results back via return SMS. The problem is that while it's easy and cheap to send SMS's, it's neither easy nor cheap to receive them: A CSC (the number users punch into their phones to text your system) will set you back $500 - $1000 a month, in addition to a $250 setup fee. Think about it though, because SMS interaction is only going to get bigger.
  • WAP / Cellphone browser: Increasingly a viable option as cell phone browsers get better. Through my extremely non-scientific assessment, I think a lot more people use SMS than their cell phone browsers. Go ahead and check out your site through your phone -- it will make you rethink all that nifty Ajax you did.
  • Information exposed via microformats:  microformats are the un-API. If you want to expose your data for remixing by others, Microformats are the hip new way to do it. Microformats facilitate access to your data by 3rd parties; if your looking to expose your data to clients or interoperating systems, you're probably better off with traditional web services.
  • Firefox sidebars: I haven't tried this, and don't have a read on the level of difficulty. Judging by the quality of FF sidebars I've used, I am lead to believe that there's something fundamentally hard about writing firefox sidebars. Nonetheless, they could be an interesting middle-ground between a pure web interface and a Widgit- or Bubble-based interface.
  • Hybrid command-line / web app: Chris Wanstrath created cheat, which is a wiki with very specific content (cheat-sheets for Ruby and Rails development), combined with a command-line script for retrieving cheats when you need them. It's a great example of a hybrid app: it uses the web as a centralized, collaborative datastore, and provides an intuitive, non-web way to retrieve the info when it’s needed most.

Cross-domain messaging via iFrame

Sep 22 by Andre in Ajax »
Julien Couvreur posts on capabilities provided by both Dojo and the Windows Live toolkit to enable cross-domain interaction via Javascript: http://blog.monstuff.com/archives/000304.html

Microsoft's example app to demonstrate the technique is here: http://dev.live.com/mashups/partystart/ . Dojo's documentation is here: http://manual.dojotoolkit.org/WikiHome/DojoDotBook/Book75

In both cases, the methodology involves a behind-the-scenes iFrame to do your dirty work of message passing between domains. Obviously there are other ways of accomplishing this (i.e., Flash integration and a server proxy). Still, there are clearly advantages to having a browser-only solution.

Tools and Resources for Mapping on Rails

Sep 05 by Andre in Google Maps » , Ruby on Rails »
So you're up and running with some Google Map action on Rails? You went through the basic Google Maps API tutorial, and checked out my own Google Maps/Geocoding with Rails post. Now, you're probably wondering what other Rails-based resources are out there for this kind of work.

I've come across two projects which aim to simplify the map creation process for us Rails users: Cartographer and YM4R. Cartographer has been around longer (according to Rubyforge), but YM4R is more mature and full-featured. YM4R is also under more active use and development; it's currently ranked #264 in Rubyforge.

Cartographer

Cartographer gives you helpers to easily create Google Maps and add markers to it. The project recently went through a major revision for compatability with the Google Maps API version 2, and unfortunately the documentation hasn't been updated in step. The project includes code for geocoding via both Geocoder.us and Ontok (a geocoder which I haven't encountered before). Something which looks good in the code is an abstraction layer for the Google Maps key -- it will let you specify different GMaps keys for different combinations of hosts/controllers/actions.

YM4R

Next up is YM4R. YM4R packs a lot of functionality for both Google Maps and Yahoo maps (via the Mapstraction library). The project is broken into four parts:

  1. The YM4R/GM plugin for Rails provides helpers for interacting with the main Google Maps API. It is engineered to facilitate updates to the map via RJS. The plugin also includes some functionality not directly available through the GMaps API: Clusterer, GeoRSS, WMS layer. Read up in the documentation do see if these extensions are useful for your project.
  2. The YM4R/Mapstraction plugin for Rails provides rails helpers to interact with the Mapstraction API. As with YM4R, it facilitates updates to the maps via RJS.
  3. The YM4R gem provides ruby helpers for the Google Maps geocoding API and the Yahoo! Maps Building Block API’s: Geocoding, Traffic, Map Image and Local Search v3. The gem plugs into both Yahoo and Google geocoders, but not any 3rd party geocoders like geocoder.us.
  4. The Tools package provides command-line tools to generate tiles in order to create custom map types for use in Google Maps.

The YM4R author has been posting regular updates and tutorials on using the packages, so there's a lot of information available. He has the RDocs for all the packages online as well.

The Tools package for custom tiles is interesting. Read through the docs at http://thepochisuperstarmegashow.com/ProjectsDoc/ym4r_tools-doc/ and check out an example of the result at http://open.atlas.free.fr/GMapsTransparenciesImgOver.php

Helpers or no Helpers?

Cartographer and YM4R definitely provide some food for thought. If you're doing serious map-based development, you have a choice to make: do you want to program directly in JavaScript (the native tongue of all the web-based mapping APIs), or do you want an a Ruby-based intermediary package (as these two projects provide). There are pros and cons to both approaches, and I think the answer will depend on the kind of project you're doing. I'll write more on this in a future post.


Links/References