As you probably know, Salesforce announced the Google Data API Toolkit on Monday. Per the site,
The new Force.com Toolkit for Google Data APIs provides a free and open-source set of tools and services that developers can use to take advantage of Google Data APIs from within Force.com.
The end result for developers is a set of classes, written by Salesforce, that allow you to easily communicate with Google services. For example, suppose you want to create an entry in Google Calendar, the following code does it.
GoogleData.Calendar cal = service.getCalendarByTitle('MyCalendar'); event newEvent = new Event( subject = 'Tennis with Beth', description = 'Meet for a quick lesson.', ActivityDateTime = system.now(), DurationInMinutes = 60);
That is actually just 2 lines of code (line #2 was broken into 5 lines for easier reading). The reason you can do this in 2 lines is because of the toolkit. The toolkit does the “heavy lifting” for you to communicate with Google.
From a developer standpoint, the best thing about this is that, to do this, there is no dependency on changes to the Salesforce platform. The Google Toolkit was created by the Developer Marketing Team at Salesforce, not the folks building the platform. Apex Code is already part of the platform. The toolkit uses what Apex Code already offers. What you get with the toolkit is a set of pre-written Apex classes that do the heavy lifting for you on talking to Google. Much like the Salesforce Java/PHP/.NET/Ajax/Perl toolkits do the heavy lifting of talking to the SOAP API for you on those programming platforms.
There is no reason that the developer community cannot create similar toolkits. I am sure Salesforce has some more up their sleeve and did the community a service by building some foundational ones for us to use as working/useful examples.
This is open source at work. To make an analogy… one thing I love about PHP is that these types of toolkits are prevalent and have made my life much easier. For example, when I wanted to build Auto vCard, I Googled for PHP classes that created files in the vCard spec. I found many and chose 1. Similarly with the Web to Lead Spam Check I built. I chose Akismet as the spam checking service because I was familiar with it and trusted it and I found a PHP5 toolkit that took care of the hard part of communicating with Akismet from PHP. Same thing with my old Google Maps mashup. There are PHP classes that do the hard part of talking to Google Maps. Having these classes at my disposal gave me the ability to focus on adding the business value of tying functionality into a Salesforce-related use case. If these PHP classes didn’t already exist, I never would have created any those apps.
If you are a developer looking to create something similar to what Salesforce did, I suggest you:
- Visit Programmable Web to identify useful services that could be connected to and learn about their APIs
- Build your class(es) (Look at the XMLDom class that’s part of the Google toolkit to handle the complicated XML parsing you might need to do)
- Publish it open source and let the community react/improve it
- Offer up some example code for how the class can be used to help people implement a use case of it.
- Become a star
Some services that I think are ripe for developers to concentrate on (that are very applicable to businesses):
- Google Checkout
- Google (Apps) Mail
- Google Charts (with tie into Visual Force)
- Blog Services
- Google Search
- Google Open Social
There are countless others. Get cracking!