Showing posts with label screencast. Show all posts
Showing posts with label screencast. Show all posts

Gears Screencast: An Introductory Tutorial




Using a JavaScript API to cache web pages offline, interact with a client side database and introduce threading into your application isn't immediately intuitive because it's such a foreign concept for a web API. I remember when I was doing my first work with Gears -- I was a bit disoriented and in need of a walk through of how things work and why.

To help potential Gears users that feel like my 7-month-ago-self, I wrote a tutorial application that uses a minimal amount of non-Gears code. This application is a simple stock ticker that makes use of 5 of the Gears modules; LocalServer, Database, WorkerPool, Timer, and HTTPRequest.

But a standalone application can't teach someone -- it needs some explaining. Long articles generally lose my attention, so my media of choice was video. I made a screen cast where I walk through the code in three steps, which you can find here. There's also a zip file that contains the three steps of code so you can take a look at the code on your own. Please note that there is a PHP file that is required for the application to work, so you will need a server that runs PHP in order to use this code on your own!

Building Offline Salesforce Applications




Our friends at Salesforce have written a detailed tutorial showing how to create an offline-enabled Salesforce application using Google Gears. Along the way they demonstrate Google Gears, Google Web Toolkit, and the use of Apache Axis to access Salesforce.com through its remote Web services API. Full source code for the application is available, as well as screencast showing it in action, below:



The application itself views a set of relevant accounts, and then allows you to get detailed information about a particular entry.

The architecture that they chose looks like this:



The GWT UI logic talks to a data switch which is responsible for knowing if you are online or offline (via an explicit action) and gets data from the appropriate location depending on the status. If you are online, it will call out to the service data layer which understands how to get data from Salesforce via their APIs. If you are offline, the data will be retrieved locally.

Read the full tutorial to get the step by step walkthrough of the code, including how to use the GWT Gears library that bridges the worlds nicely.

We are looking forward to seeing your Salesforce applications work offline!