Google Developer Day across the World
I was tempted to get up in the wee hours to see the first live webcasts of Google Developer Day 2007 from London. But my brain's desperate need for delta waves overrode its thirst for beta.
Fortunately Google is posting them to YouTube and I'm already seeing one from Sydney on Ajax.
I will probably try to catch a few of the live ones from California. There's twenty five sessions on five different tracks. But there's one on Python design patterns and a few on geospatial that I'm particularly interested in.
There's something about a live webcast that makes it more fun. It's like watching a live concert or television broadcast; you know your brain is processing the same information at the exact same moment as millions of others on the planet.
[UPDATE]
Notes
Watching the keynote now.
There will be over 160 sessions around the world! All free with free food. Hopefully they will all be posted to YouTube. [Hopefully they will all be posted to YouTube.]
Google Mashup Editor lets you build mashups via an online tool in as little as 3 lines of code and serve your mashup via other Google services like Google Desktop.
Google has now become the largest network. Over .5 billion visitors (per day, month?).
Google gadgets are very popular and are generating huge amounts of traffic for their authors (in the millions of pages views per month for some). Example is Expedia Fare Calendar.
Can drop them in Google Pages, Desktop, and hook them into your site and it's served by Google. Pundits talking about "the Google Gadget economy."
"Maplets bring Gadgets to Maps."
Orbitz has a gadget that shows hotel room availability on Google maps.
The power comes from building "mashups of mashups" from disparate services to combine useful data like mashing in weather data, restaurants nearby, etc.
Tools to build the world's next generation of web applications.
Google Web Toolkit lets you code in Java and compiles it to JavaScript and HTML for deployment. [There needs to be a Ruby and Python version. Hmm...]
"Vibrant community around it."
Limits of Ajax: For one you have to be connected to the net.
Gears lets you take your web apps offline [similar to Joyent's Slingshot or Dojo's offline features?]
Works on Firefox, IE, Safari on Mac, Windows, and Linux.
Adobe using Gears with Flex apps and Apollo to install to your desktop. Works on Windows, Mac, and Linux. Drag and drop data from native application from Apollo to desktop. Uses Sqlite for local datasource.
Everything will be linked to from code.google.com.
Sergei Brin speaking now.
AI hasn't worked. "You don't have to eliminate the person. You can create the person."
[Uh oh, here comes the evil part. Skynet is coming!]
First offspring from online dating is about 12 years old and they are creating maplets right now. So the internet is improving itself already.
Google Gears session
Are offline apps necessary? Aren't we always connected now?
But... it's not always reliable even when you can be connected so it's important to have your data available offline. And you have to pay for net access in a lot of cases. Can take 5 minutes or more to hook up.
You are offline more than you think you are, especially if you are a laptop user.
Performance of offline is better. No network roundtrip latency. Takes more time than data from the desktop.
Early release of Google Gears.
In a perfect world...
- One application, one URL
- Seamless transitions between online and offline
- Ability to use local data, even when online
- Available to all users on all platforms
The user shouldn't have to do syncing. The application should make this transparent.
[Seems like we're just talking about offline as a cache. You could use local data caching to improve performance of online apps too. For example, first 2000 blog posts show up in Google Reader are cached on your desktop. You want more, it connects to the web.]
Ajax has been missing offline capability.
An incremental approach
- Do for offline what XMLHttpRequest did for web apps
- Browser plugin
- IE, Firefox (Wind, Mac, Linux), and Safari (almost!)
- Open source: http://code.google.com/p/google-gears (New BSD)
What do Gears apps look like?
- Read and write using local store
- Changes are queued for later synchronization
- Server communication is completely ?...
Tools to build but not to guide you in synchronization and conflict resolution yet.
With Gears most operations stay local and synchronization happens in background.
APIs:
- Localserver, to access the app offline
- Database, to store large amounts of structure data
- WorkerPool, to perform long operations
ManagedResourceStore: Capture entire applications
- List application resources in a separate manifest
- Gears captures and updates the application resources atomically.
- Gears automatically updates application resources on each view (within reason).
- Always run locally.
- Supports multiple users per application.
Uses Sqlite for local store. Parameterized SQL for protection against SQL injection attacks.
Open source. Looks like most of the code is C.
Full text searching in Sqlite using Google search algorithms. Joint project with Sqlite.
Google and the Geoweb
Bent Hagemark, Lior Ron, Michael Jones
Michael
The Google Geo group wants a Star Trek tricoder so you can feel like a local when you're not.
Geographically organize the world's info and make it universally accessible and useful.
Odyssey and Iliad mapped on Google Earth.
Some info belongs on a map, some on a page, some either way.
People are building maplets while they're viewing the Google Developer Day session.
Connecting with users. Local data with buildings in 3d. In Zurick can see subway and train lines. Real time traffic. U.S. Senator made a geoblog.
Sketchup for 3d geometry.
Be the agent of change. Surf the wave and win.
Alan Kay. "What's the easiest way to invent the future? Invent it!"
Bent Hagermark with KML overview.
[Uh oh. XML...]
Placemark give you:
3d/2d view
list view
balloon
Paste KML into an app and it'll actually do something.
Placemark:LookAt
lat, long, range, tilt, icons, rollover styles, balloons, points, lines, shapes, 3d shapes, styling, 3d textured models, ground overlay, screen overlay, folder for grouping elements and hierarchies, time with timestamps and timespans, NetworkLink,
NetworkLink
Divide your docs into many docs. Like and include in C.
view-based refresh. After motion is stopped can call another script/resource, can do time-based refreshes, refresh after expiration.
Region-based allows to trigger a fetch of a link when a user moves into a particular region.
http://code.google.com/apis/kml
KML is:
geographic display language
hosted XML files
a standard
[Boy, there needs to be a YAML version, KAML?]
Amazing developer examples demo with Google Earth flying you around from point to point in 3d. It's like you're flying from point to point like a Superman. All controlled via KML definitions.
Design interactive and motion-based presentations.
All Google Earth stuff also works on maps.
Images from devastation of Kansas town destroyed by tornado.
Can host the KML files anywhere and have the same functionality.
3 levels of imagery can be viewed.
User can fly around and view your data with timespan control for things like viewing a time window of a person walking with a GPS device.
[Can't wait til some network games take advantage of Google Earth. This has to be the next step toward the holodeck. :)]
Time instants for time span data. If your data is imagery, you use a timespan and sweep with timestamps. [Did I get that right?]
Can pop up balloons that are very detailed like a web page. You can keep the balloon up while flying from one location to another. User can navigate dataset without using the side panel, zooming from one point to another.
[This is amazing to watch!!!]
New beta spec for photo overlays. You can fly away from the photo and see that they are in space.
Leor on Geosearch:
Angelina Jolie has tattooed the long/lat of her adopted children on her arm.
Maps and balloons for content that has lat/long.
Can see user created content from geosearch.
Can link to other results and resources from the geosearch results.
Now searching for Osama bin Laden. [Too bad Bush doesn't know about this. :)]
Now searching for all windsurfing locations with aggregated results from 5 different web sites.
Now searching for dog parks in the Bay area and near his house.
Users are helping to map the world.
Use for trip planning. Now searching for tango places in Buenos Aires.
Can also do business transactions, e.g. can book a place from a map balloon directly.
Three steps:
- Use KML or GeoRSS instead of JavaScript so your data can be indexed by Google.
- Put it on a public server.
- Inform them in a sitemap so it can be indexed properly.
Mashups with the Google Mashup Editor
Rich Burdon, Paul McDonald
Rich:
'Hello, world' mashup showing the world in a map.
Mashups is about feeds.
Pasting url of feed into the editor.
Feed browser hooks into the Reader framework. Pulls in a feed URL that is a GeoRSS feed.
Creates a template (autocompletion!). Table row with repeat attribute will repeat elements from feed in table rows.
[Can't really see the code. Someone tell him to increase his browser view!!!]
Images pulled in now.
Extended map to use the feed and geo points. Setup events so the map can respond to those events from the list.
Now map has images on the right that you can click to navigate the map.
List tag with variable substitution syntax to reference app's own custom data store. (Setting up a dataset.) Goes back to add authentication for a login to secure the data.
Uses atom standard and read-write data store.
Now he shows a read/write datagrid for changing the data online.
[Finally some one asked him to increase the size of the browser view!]
Simple relations supported in the data store.
Can use different templates and controls. Schema and query work is done for you.
Google Base integration, pulling in GData feed. Geoencoded info and images pulled in.
Search tag with autocomplete with parameters, binds data from Google Base.
List tag with variable substitution hooked to id of search control.
Builds a list from the data and binds map to results of the query.
Hits Test tab to load the mashup in the sandbox.
[Wow, it occurs to me. How does one write test for all this stuff?]
Now he's deploying the application.
Can now deploy mashup as a Google Gadget to add to his Google Desktop.
Paul:
- Simple online interfaces
- Pluggable extensible services
- Standards based approach
A lot of people are signing up [myself included] but right now it's a limited beta.
[Wow, the room looked kind of empty as they closed out so I wonder if another session was more popular.]
Python Design Patterns
Alex Martelli
Forces controted with not under your control.
Facade interposes a simpler object/class exposing a controlled subset of functiionality.
Patterns not created but rather discovered from "Known Uses." (KU)
Some Facade KUs
* dbhash
* os.path: split + indexing; isdir; os.stat
A structural DP like Adapter.
Sometimes they merge.
No good books on Python design patterns.
Creational
Structural
Behavioral
Also can have object or class-level.
Program to an interface, not an implementation.
Python's duck typing.
Favor object composition over class inheritance.
In Python, hold, or wrap
Inherit only with it's really convenient.
Hold: strong coupling on the wrong axis. Revealing to world as it's built.
Wrap: explicit, automatic, gets coupling right (Law of Demeter: have only one . in your expression.)
Creational pattern not common in Python because factories are built into the language.
Only one instance to exist. Use a module. (works 90% of time).
Can't subclass and not special methods (can't override method)
Make 1 instance (no enforcement) and trust that we're all adults.
Singleton ("Highlander")
There can be only one.
Subclassing is a problem.
Monostate ("Borg") Guido dislikes it.
We don't care how many instances as long as they share state.
Subclassing is not a problem.
Python lets you override data not just methods.
Dependency injection. Don't create anything at all in the class. Creation is done from outside and passed into the object/class. Doesn't work write if you need to do mulitple creations. Factory fixes that.
[Here I gave up trying to keep up with Alex. But I found his slides and some other presentations on design patterns online.]