Archive for May, 2007

Ruby on Rails with Google Gears

Thursday, May 31st, 2007

Prelude
This post is just my head throwing ideas about. Non of which are fully formed, nor fully investigated.

Intro
Today Google labs spitted out an early “plugin” for Internet explorer and firefox to make websites viewable and interactive offline. This isn’t entirely new as Apollo offers something similar. However, this is interesting considering Google is one of the kings of webapps. With Gmail, Google Calender and Google Docs all obviously the target for this technology I doubt that it would fail spectacularly.

Very brief and rubbish Gears overview
First off, there are two main components to Gears. The webserver and the database. The webserver is pretty simple to get our heads round, it essentailly caches pages that us as developers tell it to. For me the most interesting parts is the database.

The Gears Plugin that the user installs includes a fully relational SQLite database. As developers we can interacted with it by passing SQL commands via javascript. Yes thats right… we interact with it by using javascript code such as

var rs = db.execute('select * from Demo order by Timestamp desc');

The benifits of this are pretty interesting. For example webservers technically don’t have to store information at their end, ever, just relying upon the users own store.

I feel however the most use of such an app would be for something like gmail, where when you are offline you write and send an email with gears facilitating the actual sending of the email when the internet becomes available.

So how would Rails fit into all of this?
I love writing webapps in rails. Its quick, easy and Ruby is lovely to write. So could developing a Rails app with gears functionality be a possibility without having to drop into insane javascripty-SQL-type goo every time?

The answer in my opinion is yes, but it won’t be easy.

Here are the major barriers in the way to making a my ideal acts_as_gears type plugin.

  1. The plugin should be able to convert Ruby into javascript for offline controllers and model interactions. A massive undertaking (possibly recreating active record in javascript.. shudder).
  2. Creating the user’s local database and linking each column with the live database columns would be essential if we wanted to do any sort of syncing.
  3. The automatic creation of database syncing methods in javascript and ruby.
  4. Creating a seamlessness of data origin in views. For example, a table of information should be able to be printed out on one page irrespective if data came via the live or local database.
  5. The views should only have to be writen once, with of cause different javascript payloads.
  6. Loading and unloading of data needs and state management.

Anyway that’s what’s on my mind right now, a half baked whirlpool of rails, javascript and gears.

Reading
Google gears
Adobe Apollo
Firefox offline info

Blue LEDs

Monday, May 28th, 2007

Dear Electronics firms, Store designers,

Blue LEDs hurt my eyes, stop putting them into everything.

Regards,

MrBlack.

Fantastic angry critics

Tuesday, May 8th, 2007

With little time and money spare we need the help of critics or reviewers to help us in our choices. As a single male with a cynical slant and a hatred of being “sold” anything I tend to take comfort with critics who get rather angry in their specialist area. Here are a few I really quite like.

BBC Five Live - Mark Kermode film reviews
Kermode loves film and is the BBC’s film reviewer who appears on Newsnight review and The Culture show from time to time. His reviews are, I have to say, spot on for my liking. Of cause not everybody will agree but I like this chap for his balls in lambasting a film. His famous rants against Pirates of the Carabiean and Little Man have almost become legendary.

Reading
Kermode film page / podcast links
Wikipedia entry


4Later - Vids
Before channel four filled its nights with quiz channels or 24 hour CCTV footage of some wankers in a house 4later aired and was a gem of my pubescent years. It had odd animations and tv shows which ran on a shoe string. One of the best was Vids, a video review show which looked at the latest VHS releases. Starring Stef and Nigel as two Scottish video shop owners their reviews took place during comedy sketches which I have yet to see repeated. A classic which could make a fantastic come back on the net if somebody could track them down.

Reading
Vids fansite, long since dead.
IMDb information
Google cache of old 4later site.
Dog-Sized-Cat. Nigel’s new site with links to Vids episodes.
4later fansite.


Internets - Angry Nintendo Nerd (aka angry video game nerd)
This chap just makes me laugh out loud. His age is about mine, his subject matter old video games and his anger is constantly at about 10.

Reading
Angry Video Game Nerd Home page
Youtube videos


BBC Four - Screenwipe
The artsy BBC 4 hosting a program where the hosts states “an undercover camera show that filmed children in restaurants and calling them c**ts, thats a show I would watch” has to be worth a peek. I missed it up until now and have only caught up thanks to youtube and some chap pirating them. I would basically describe this show as like ITV’s TV burp, but funny. Plus any show that hires fat-pie.com and Adam Buxton has to get my vote. Classic.

Reading
BBC Four Screenwipe page
Loads of “clips” uploaded to youtube