Thursday, May 29, 2008

Google I/O 2

Second day, and we're off with Melissa as she describes some principles in play at google.

"Imagination is a muscle" is the one which resounds most soundly with me.

some good quotes from this presentation:

Henry Ford: customers wld say they wanted faster horses
Sam Walton: if you don't listen to your customers, someone else will

I'm now loitering at the "GWT and client/server communication" talk. At first I've been pointedly ignoring GWT; watching folks battle JSF has been a counter example for adopting release 1.0 technologies. I'll add more as it starts up, right now they are using crowbars to fit everyone into the room.

-- later, after bandwidth was restored.

The GWT talk was inspiring. What a huge hunk of work they have been doing.

Next"Using google data APIs from non javascript languages" Vidam Spivak.

covering Search, Feed and Language AJAX APIs. pivoting on RESTful interfaces.

JScript isn't considered to work in : latency sensitive websites, Flash/Silverlight, and server-side apps.

Vidam goes through a tour of the APIs as an overview.

The AJAX language API is cool; highlight text and it tries to figure out
the source language and translate.


JS controls & UI
JS runtime
RESTful data access

this talk focuses on the RESTful layer

- read only

shows a CURL request ( bonus points )

FLASH crossdomain file is avail on google to allow
flash requsts against google - allows all requests ( silverlight too)

referrer -
specify URL where used, or your homepage or a google ID

search returns 32 results
lang 500 characters
feed 100 feed entries

--- examples,
"faster AJAX"
use DOMContentLoaded - its faster than an OnLoad handler, works cross browser
possible to have the call to G use your function to handle the content on their side before it is returned, cool.

Flash: ActionSctript 3 use HTTPService, layout via MXML, and jason parser 'corelib' for AScript.

Server side example;: Facebooj App, Google App Engine, Google AJAX.
URL Fetch API from APPs pythong
gminifb ( minimal facebook developer app in python )

in facebook translates wall postings to target language using google translation
API. nice.

examples at

--- next: server side javascript.

hah! let's see how this has come along since the old LiveWire days. I used to make a living running a small consulting firm doing LiveWire consulting. but that's another story - time to fight geeks for sandwiches.

RHINO - great lecture, highly entertaining. who the heck is this guy?


Reusing Google APIs with GWT. - migueal mendez

a specific project for the GWT.

GALGWT ( GWT is pronounced "gwit" )

opensource bindings for Google JS APIs.
Project for each API has individual JAR file, doc, etc.
supports Search, gadgets, Gears and Maps.

techniques -
containment ( java holds JS object you access )
JSIO google API interop. allws one to extend JS objects in Java etc.
JavaScriptObject in Java

in GWT 1.5 you cfan declare types which overlay JS objects.

Search overview -

condfigure SearchControlOptions
add options to the SearchControl
add SearchControl to the page
execute searches on the search control

Inspect the reults with a Search Listener . Listner callback gets updates
from search engine.

Gadgets overview -
( go to iGoogle to see a gadget )
extend Gadget class
implement each of the NeedsXXX interfaces for that it needs.
can make XHRs from gadget.
gadget suppport via Generator and Linker
need Gadget container to test against ( iGoogle, shindig, opensocial )

Gears overview
exposes Database, LocalServer and WorkerPool JS modules.
provides an Offline module which automates process of going offline.
provide GWT rebind prop to test for existence of gears, so your app can adopt if gears isnt' present.
"hosted mode" only supports IE on Windows
cannot debug WorkerPool workers currently

Maps overview
exposes Maps API w/cleanup
allows GWT widgets to be added to InfoWindows
Extend the Maps API using Java
( watch out for Maps keys issues )

( the example is dirt simple )

milestone builds:

--- Turbo GWT

First - GwtQuery
- like jQuery, query the DOM. uses what is available: XPath, W3C Selector, getElementsByClassName...
compile0time CSS3 Selector parsing

each browser gets separately compiled JS. ( neat )

!check out GWTQuery at

Second - High power graphics. Display Lists

immediate mode vrs retained mode
-Canvas vs SVG/VML
JS VM top out beween 1-10K method calls on canvas
inserting DOM objects vrs canvas calls.
idea: record and optimize desired graphics calls

Chronoscope Chart library
renders 30K+ interactive rates
supports javascript, flash, applet, servlet and android due to GWT capabilities.

demo: graphing millions of datapoints of all the google trades ( about one a second )
over the last few months. smooth scaling and zooming. the crowd goes wild as seamless zooming from months to seconds scale

Third - GWT with other environments.

GWT and servlets is a given.
Also to browser, via JS calls.
what about RPC to Flash, Android, "Gears Workers?"

write once and publish gadget ti other containers -

"Syndroid" a prototype demo is given. This guy is amazingly talented.

No comments: