Last week, Eugene Oksman and I presented a webinar on the new Salesforce Mobile SDK. The SDK lets you develop mobile applications for Force.com and Database.com and the webinar included a high-level overview of the current mobile landscape, our mobile strategy going forward, and how to use the Mobile SDK to develop web and hybrid mobile applications. A recording of the webinar is now available. We’ve also posted the slides and compiled an FAQ based on the questions we received during the webinar. The only missing piece is the code that I demoed during the webinar. The code is available on GitHub and I’d like to highlight some of it here. I’ll organize my code walkthrough in the same order that I demoed the application during the webinar and so here goes. I’ve also included links to the points in the webinar recording that correspond to the respective demos.
Developing Web (HTML5) Mobile Applications Using Visualforce
The first half of the webinar was spent on how you can combine Visualforce with other common web technologies like HTML5, JavaScript and CSS to develop web mobile applications – i.e., applications that are rendered completely via a browser on the mobile device (unlike native apps), but are optimized for a mobile/touch environment. To demo this development approach, I extended the Warehouse sample application that is part of the introductory Force.com Workbook. I built a simple Visualforce page that used jQuery Mobile and JavaScript Remoting to present users with a list of records from the Merchandise__c custom object, and then another screen to display details about each record (a classic List–>Detail UI pattern).
Using Visualforce for Mobile Development
Here’s a small code snippet from the MerchandiseMobile Visualforce page.