86
APIs Google pour l'Entreprise Les pieds sur terre... ...et la tete dans les nuages July 2nd 2008 Patrick Chanezon, Google, [email protected] API Evangelist

Google Apis for the Enterprise

Embed Size (px)

DESCRIPTION

Many bridges, using different technologies - No new SOAP API planned - REST for data and message APIs: Gdata - Ajax to surface customizable controls and enable mashups - Google Web Toolkit to build your own Ajax applications easily - Gears for offline support - Google App Engine for easy scalability - OpenSocial for the social enterprise Exposing many Google services for Enterprises… and more to come: give it a try!

Citation preview

APIs Google pour l'Entreprise

Les pieds sur terre......et la tete dans les nuages

July 2nd 2008Patrick Chanezon, Google, [email protected] Evangelist

Google APIs Evangelist: Patrick Chanezon

• Paris - San Francisco• API Evangelist - OpenSocial• Checkout, AdWords• Software plumber• Java geek… in scripting rehab: Ruby,

JavaScript, PHP, Python• Open Source: ROME, AdWords (Java, C#,

Ruby), OSSGTP• Sun: Blogs, Portals, eCommerce• Netscape/AOL: LDAP, Calendar, App

Servers, CMS, MyNetscape (RSS)• More on my blog

http://wordpress.chanezon.com

• Links and slides at http://del.icio.us/chanezon/

Agenda

Google APIs

Buzzwords & DefinitionsAPI: Platforms and BridgesAPI technologies: SOAP, REST and AjaxGoogle APIs for Enterprise Mashups• Enterprise

o Enterprise OneBox• Geo

o Mapso Earth

• Apps: GData API for Calendar, Docs, Spreadsheet, Document List, User Provisioning

• AdWords• Open Source

o Gearso GWT

http://code.google.com/apis/ http://code.google.com/enterprise/

Google APIs

Why are we doing do it?• Our mission: “Organize the world’s information and make it universally accessible and useful”

o We can’t organize it all ourselves14 Google APIs on http://code.google.com… and counting!

• Google Data APIo Calendar

API• Maps API• AdWords API• Blogger API• Data APIs• Desktop SDK• Earth (KML)

• Enterprise APIs

• Homepage API

• Related Links• Sitemaps• Talk (XMPP)• Toolbar API• Web Search

API

(Circa November 2006, Mainz)

Google APIs

Why are we doing do it? Our mission: “Organize the world’s information and make it universally accessible and useful”

We can’t organize it all ourselves

32 Google APIs on http://code.google.com… and counting!

• Checkout API• Data API

o 8 services• Maps API• AdWords API• Ajax Search API• Ajax Feed API• Desktop SDK

• Enterprise APIs • Homepage API• YouTube API• Sitemaps• Talk (XMPP)• Toolbar API• Google Web

Toolkit• …

(Circa May 2007, Buenos Aires)

Google APIs

Why are we doing do it? Our mission: “Organize the world’s information and make it universally accessible and useful”

We can’t organize it all ourselves

37 Google APIs on http://code.google.com/apis… and counting!

• Checkout API• Data API

o 8 services• Maps API• AdWords API• Ajax Search API• Ajax Feed API• Desktop SDK

• Enterprise APIs • Homepage API• YouTube API• Sitemaps• Talk (XMPP)• Toolbar API• Google Web

Toolkit• …

(Circa September 2007, San Francisco)

Google APIs (Circa April 2008, Redwood City)

wget http://code.google.com/more/ -q -O - | grep products-short-desc | wc -l55

Including 3 Platforms

Why are we doing do it? Our mission (it has not changed): “Organize the world’s information and make it universally

accessible and useful” We can’t organize it all ourselves

N Google APIs on http://code.google.com/apis… and counting!Let’s script it so that I can reuse this slide

Google APIs Today (July 2008, Paris)

var window = new Object();load('http://code.google.com/js/codesite_product_dictionary.js');print(window['CODESITE_productDictionary'].products.keys.length);61

Including 4 Platforms

Why are we doing do it? Our mission (it has not changed): “Organize the world’s information and make it universally

accessible and useful” We can’t organize it all ourselves

N Google APIs on http://code.google.com/apis… and counting!I had to modify my script since april: http://wordpress.chanezon.com/?p=60

Google APIs Trends

Google APIs Grandfather

Nelson MinarCreated APIs at GoogleSearch API 2002AdWords API 2005

2006, blog post“Why SOAP Sucks”http://tinyurl.com/ykdy32

Buzzwords & Definitions

SOASOAP/WSDLRESTAjaxMashupsSOBAWeb 2.0Wiki

Loose CouplingCompositionPipesRSS, AtomOrchestrationGovernanceOpen SourceSaaS, MaaS

IdentitySSOProvisioningHTTPXMLJavascriptJSONMicroformats

APIsBIWorkflowPortalsWSRPSituational SoftwareSocial Networks

Buzzwords & Definitions

SOASOAP/WSDLRESTAjaxMashupsSOBAWeb 2.0Wiki

Loose CouplingCompositionPipesRSS, AtomOrchestrationGovernanceOpen SourceSaaS, MaaS

IdentitySSOProvisioningHTTPXMLJavascriptJSONMicroformats

APIsBIWorkflowPortalsWSRPSituational SoftwareSocial Networks

Tag Clouds for Mashups: Enterprise?

API Metaphor Bridges

User - Search results (Ajax Search)User - Maps (Maps)User - Data (Gdata)Buyers - Sellers (Checkout)Advertiser Ads (AdWords)Publishers - Ads (AdSense)Build your own bridge (Google Web Toolkit)

Ajax

REST

SOAP

API Metaphor Bridges

User - Search results (Ajax Search)User - Maps (Maps)User - Data (Gdata)Buyers - Sellers (Checkout)Advertiser Ads (AdWords)Publishers - Ads (AdSense)Build your own bridge (Google Web Toolkit)

Ajax

REST

SOAP

API Metaphor Bridges

User - Search results (Ajax Search)User - Maps (Maps)User - Data (Gdata)Buyers - Sellers (Checkout)Advertiser Ads (AdWords)Publishers - Ads (AdSense)Build your own bridge (Google Web Toolkit)

Ajax

REST

SOAP

API Metaphor Bridges

User - Search results (Ajax Search)User - Maps (Maps)User - Data (Gdata)Buyers - Sellers (Checkout)Advertiser Ads (AdWords)Publishers - Ads (AdSense)Build your own bridge (Google Web Toolkit, Gears, App Engine)

Ajax

REST

SOAP

Don Isidro as a metaphor for Web Services

Detective, rational mind, knows a lot, infers the restAlgorithmsPeople look for his advice on issuesVisit him in prisonGet answers, can get going with their lives

Google APIs for Enterprise

Google Mini & Search Appliances

Regular OneBox

Enterprise Onebox

Enterprise OneBox API

XML module fileSpecifies a trigger: keywords or regexpA provider: where to get the info, as XMLSecurity: auth for the providerTemplates: XSLT

<onebox type="external"><name>directory_example</name><description>This is a sample OneBoxthat queries for phone directory information</description><security userAuth="none"/> <trigger triggerType="keyword">directory</trigger><providerURL>http://directory.corp.acme.com/phonebook</providerURL><resultsTemplate>{xslt template} <resultsTemplate/></onebox>

Google Maps API

What is it?• Put Google Maps on your site for free, just like Frappr.com,

housingmaps.com and chicagocrime.org• Overlay custom content, write custom functionality• Free to all web sites that are free to consumers (including commercial

web sites)• V1 in june 2005, V2 in April 2006• Maps for Enterprise

o Behind the firewall mashupso Phone supporto Geocoding backend for many locations

So how does Maps do work?

Maps JavaScript architecture

CSS positioned map tiles with a cropped at the map border

Maps JavaScript architecture

+ =+

+ =

What you can do with the Google Maps API

Switch between maps• “Map”, “Satellite” and “Hybrid” modes supported by default

Overlays• Markers

o Custom icons, shapes, etc• Polylines

o e.g., driving directions lines• Custom overlays

“Info window”, tabbed• You know, that cool window with the shadow underneath it

Customizability• Custom map controls, overlays, and map types

Overview map• New GOverviewMapControl control displays an attractive and collapsible map in the

corner of the screenSupport for a subset of KML (Google Earth data format)

Emphasis on Simplicity

// Center the map on Westin Hotel in San Franciscovar map = new GMap2(document.getElementById("map"));map.addControl(new GSmallMapControl());map.addControl(new GMapTypeControl());map.setCenter(new GLatLng(37.787742,-122.408295), 13);// Add 10 markers to the map at random locationsvar bounds = map.getBounds();var southWest = bounds.getSouthWest();var northEast = bounds.getNorthEast();var lngSpan = northEast.lng() - southWest.lng();var latSpan = northEast.lat() - southWest.lat();for (var i = 0; i < 10; i++) {var point = new GLatLng(southWest.lat() + latSpan * Math.random(),southWest.lng() + lngSpan * Math.random());map.addOverlay(new GMarker(point));}

A few cool Google Maps applications

Maps Demo Galleryhttp://code.google.com/apis/maps/documentation/demogallery.html

Useful/Cool• http://del.icio.us/chanezon/ajaxian+google+maps+app+cool

Technically interesting• http://del.icio.us/chanezon/ajaxian+google+maps+app+tech

Maps API Web Resources

• http://code.google.com/• http://www.google.com/apis/maps• Google-Maps-API Developer Forum:

http://groups.google.com/group/Google-Maps-API?lnk=li• Maps API blog: http://googlemapsapi.blogspot.com/• Mike William’s tutorials: http://www.econym.demon.co.uk/googlemaps/• http://del.icio.us/chanezon/google+maps

Maps API Books

• The Ajaxians book: Pragmatic Ajaxo implement your own Map UI in a day…

then you have to do the server side:-)• The O’Reilly ones:

o Google Maps Hacks o Mapping Hacks

Google Earth: KML

• The Google Earth team don’t do 2D slides• Let’s do the presentation in KML:-)• http://www.chanezon.com/pat/presos/earth/flatland.kmz

Google Ajax APIs

Standard REST Plumbing for Google APIs

Each service wants their own Data API: standardize on a common REST Plumbing• APIs = Plumbing

"If I had my life to live over again, I'd be a plumber.”

Albert Einstein

Google Data API

REST API, Based on Atom and the Atom Publishing Protocol

"The release of atom power has changed everything except our way of thinking…”

Albert Einstein

+ Google namespaced service specific Data+ AuthSub+ Optimistic Concurrency

First Google Data API: Calendar

GET, POST, PUT, DELETE Calendar EntriesReleased in April 2006

“...the solution to this problem lies in the heart of mankind. If only I had known, I should have become a watchmaker."

Albert Einstein

20 AtomPub based Data APIs

From Videos to Spreadsheets

"The secret to creativity is knowing how to hide your sources.

Albert Einstein

quotes...

“'Google Data APIs Protocol' is a horrible name. You can tell that ex-Microsoft employees had a hand in this effort. :)”

Dare Obasanjo (Microsoft)

Adam Bosworth on a bike

Applications

Outlook sync• Daniel Tiles, RemoteCalendars

Cell Phone Sync• Thomas Oldervoll’s Gcalsync, J2ME midlet

RDFCalendar XVCD• By Justsystems Corporation: Google, eventful, upcoming Remember The Milk

Resources

• http://code.google.com/• http://code.google.com/apis/gdata/overview.html• http://code.google.com/apis/gdata/calendar.html• Google Calendar Data API Developer Forum:

http://groups.google.com/group/google-calendar-help-dataapi?lnk=li• http://del.icio.us/chanezon/gdata• “RESTful Web Services” Sam Ruby, Leonard Richardson

GData for the Enterprise

Google Apps for your DomainGData APIs for Calendar, Spreadsheet, Document ListGoogle Apps APIs• User Provisioning Gdata: CRUD on users and lists• Reporting: post XML, receive CSV• SSO: SAML

SAML for Google Apps for Your Domain

Google Gears: Offline capabilities

Offline• Local Server: cache for HTML, js, css• Local SQLite Database: for application data

WorkerPool: like processes for javascript• More responsive applications

A few applications use it already• Google Reader• Zoho Writer• Remember the Milk Salesforce Tutorial: Gears + GWT + Salesforce SOAP API

Google Web ToolkitWhat, Why, and How

Joel WebberGoogle, Inc.

What is Google Web Toolkit (GWT)?

What is GWT?• A set of tools for building AJAX apps in the Java language• Open Source (Apache 2.0 license)

What makes GWT interesting?• Write, run, test, and debug everything in Java, both client-side UI code

and server-side business logic

Isn’t that called an applet?• No JVM required• GWT converts your working Java source into pure JavaScript

GWT is a compiler?• GWT’s Java-to-JavaScript compiler is a big part of it, but there’s really

a lot more to the story than that…

Code Sample – Hello, AJAX

public class Hello implements EntryPoint {

public void onModuleLoad() {Button b = new Button("Click me", new ClickListener() {public void onClick(Widget sender) {Window.alert("Hello, AJAX");}});

RootPanel.get().add(b);}

}

Without further ado…

Traditional HTML vs. GWT/Ajax

StatelessHTML View

Browser

Stateful Server

User action

New HTML page

01100110

01111001

01101011

011001101101111110010100011010111101110011010110

StatefulJavaScript UI

Browser

Stateless(i.e. any)

Server

Remote procedure call

Data only, not HTML

Events handled locally

01100111

011010011011

Traditional HTML

GWT/Ajax

Compilation: Optimized Per Client

Single Java Code Base

Download exactly what you need in a single

can't-go-wrong chunk

Then cache it on the client until the sun explodes

FireFox 1.0.x

Your Code

en_US

1D04ADDA.cache.html

Safari 2.0.x

Your Code

fr_FR

7EFE4D24.cache.html

IE 6

Your Code

en_UK

15F361BB.cache.html

Opera 9

Your Code

fr_CA

D415D917.cache.html

GWT Summary

Ajax is a lot of work… Make sure to build a code base you're glad to ownLots of rewards, lots of risksLeverage is needed to use Ajax well with minimum riskPhD in browser quirks is no longer an Ajax prereq Turn Ajax hacking into software engineeringWe will share our best work and ideas with you, and we hope you will return the favor

Much more to come… see you online!

Kieden: an API and Cloud Success Story

2005: 3 guys in an appartment in San Francisco with their Powerbook and one serverMixed AdWords and SalesForce: created valueUsed SalesForce platform for the UI and DatabaseAdWords API, accessed from their unique server, pushed to SalesForceProduct done in 6 monthsMany SalesForce customersSalesForce bought them that summerLed to Google-SalesForce alliance in 2006

Salesforce for Google AdWords

What Is Google Apps?

Business GMailRun your corporate email on your own domain with Google

Google TalkInstant communication within and outside your business

Google CalendarBusiness calendar with shared, and public calendars

Google Documents, Spreadsheets, PresentationsSimple real-time document collaboration

Google SitesEasily create and edit web pages for your projects and teams

Google Start Page Your business home page, with views into all of your business apps

Salesforce + Google Apps = A Perfect Match

Salesforce and Gmail

Salesforce and Google Docs

Salesforce and Google Talk

Salesforce and Google Calendar

Google APIs Godfather: Chris DiBona

http://code.google.com/opensource/Google Open Source Program office• Summer of Code• Project Hosting• Over 1M lines of Google code open sourced in more than 100 projects

Platforms, Standards and Open Source

Making the web better, by solving big issues for developers:Ajax ApplicationsOffline web applicationsSocial Applications: OpenSocialMobile applicationsScaling web applications: Google App Engine

OpenSocial

A common API for social applications across multiple web sites

A standard for everyone

This work by Eliette Chanezon is licensed under a Creative Commons Attribution-Share Alike 3.0 License

OpenSocial Foundation

OpenSocial Foundationhttp://opensocial.org/Keep the specification open

Specifications discussed in public forumSpec evolves using an open source community process

friendster®

OpenSocial Containers

OpenSocial Numbers

• 88 days old• 275,000,000 users• 66,000,000 installs• 2,000+ apps• 20,000 developers• 10,000,000 daily app users

Standards-based

html+javascript+REST+oauth

Why should you care about OpenSocial?

• Developers: Distribution >275 Million users• Containers: Features• Users: More applications

OpenSocial Client API

• JavaScript - version 0.7 productiono Standard Web development technologies

HTML + Javascripto Can integrate with 3rd party server

• REST Serviceso Based on Atom publishing protocolo AtomPub and JSON

OpenSocial JavaScript API

• People & Friends o Access friends information programmatically

• Activitieso See what you’re friends are up too Share what you are doing

• Persistenceo Provide state without a servero Share data with your friends

The core OpenSocial Services include

Server-side REST Services

/people/{guid}/@all -- Collection of all people connected to user {guid}

/people/{guid}/@friends -- Collection of all friends of user {guid} -- subset of @all

/people/{guid}/@self -- Profile record for user {guid}

/people/@me/@self -- Profile record for requestor

Accessing People information

OpenSocial ServerSide Integration Options

• Establish a "home" site where gadget can phone home to retrieve, post data

• Can host home site on your own, or use services:o Amazon EC2o Joyento Google AppEngine

In addition to using the provided persistence API...

Cloud Computing

Google AppEngine and OpenSocial

• Create an App Engine app as your backend!o Use makeRequest() to call back to your AppEngine

servero Utilize AppEngine's datastore

• New OpenSocial Apps are coming onlineo BuddyPoke...

• Checkout Lane Liabraaten’s OpenSocial-AppEngine integration articleo http://code.google.com/apis/opensocial/articles/appengine.html

• Google IO Code Lab about OpenSocial Apps in the Cloud

Apache Shindig

• What is Shindig?o Open source software that allows you to host OpenSocial

applications • Is currently an Apache Software Incubator project • Heavy partner involvement (Ning, hi5 …) • Serves as open source reference implementation of

OpenSocial & gadgets technologies It’s Goal: “Shindig's goal is to allow new sites to start hosting social apps in well under an hour's worth of work"

Apache Shindig Info...

Apache Shindig Website

http://incubator.apache.org/shindig

SocialSite• SocialSite is an Open Source project that allows you to turn

your web application in an OpenSocial container• Leverages Apache Shindig• Built by Sun (Dave "Roller" Johnson), announced at JavaOne

this month• Adds a database and widgets to manage your social network

SocialSite Architecture

Details at https://socialsite.dev.java.net/

Google Friend Connect

Google Friend Connect• Users

o ... more ways to do more things with my friends

• Site ownerso ... more (and more engaged) traffic for my site

• App developerso ... more reach for my apps

• http://google.com/friendconnect/• sign up for the preview release

ingridmichaelson.com

The 55th API: Google App Engine

BigTable and GFS exposed in PythonGoogle APIs: Auth and MailAutomatic Scaling and Load BalancingOpen Source local development environment

Google App Engine

"We will encourage you to develop the three great virtues of a programmer: laziness, impatience, and hubris.”Larry Wall, Programming Perl (1st edition), Oreilly And Associates(see Jeremy Zawodny’s talk this afternoon for details)Works for Python programmers too:-)

Larry and Guido, Credits Tim Bray

API Lessons

All Services can benefit from an API: “Innovation happens elsewhere”Solve big problems for developersAll APIs should be self serviceNo ideology for technology choices: pragmatism winsListen to developers, Participate in the conversationOpen Source, Open Standards better than closed PlatformsCode speaks better than SlidewareGet started today at http://code.google.com/

Conclusion

Many bridges, using different technologies• No new SOAP API planned• REST for data and message APIs: Gdata• Ajax to surface customizable controls and enable mashups• Google Web Toolkit to build your own Ajax applications easily• Gears for offline support• Google App Engine for easy scalability• OpenSocial for the social enterprise

Exposing many Google services for Enterprises… and more to come: give it a try!

Credits

This presentation is a mashup of presentations by many Googlers, ex-Googlers and Google friends

Bret TaylorProduct Manager, Maps, GWT

Steffen MeschkatSoftware Engineer, Maps

Frank MantekSoftware Engineer, GData

Thomas Steiner, [email protected] AdWords API

Joel WebberSoftware Engineer, Google Web Toolkit

Scott McMullanPartner Engineer, Google Apps

Questions

Google Apps in the Enterprise

Enterprises — Fortune 500 and Public Sector

Small and Mid-Size Businesses

Academic andNon-Profits