Snapshots of using Sencha Touch in Eclipse

Given here are snapshots of working with Sencha 2 using Eclipse-Indigo.
You can create a “Dynamic Web Project” in Eclipse and copy the core sencha libraries to the “WebContent” folder. Shown below is a sample web project in Eclipse with the Sencha libraries copied to it.

Notice the touch folder that has the Sencha “src”, “resources” and sencha-touch-all.js in WebContent.
The index.html with the hello world code is shown below.

You can view videos of Sencha Touch v2 here.


PhoneGap name confusion

If you have been working with PhoneGap 1.0 and trying to move to the latest version of PhoneGap, 1.5, one of the things that may leave you scratching your head, is a set of new files “cordova-1.5.0.js” and “cordova-1.5.0.jar” found in the PhoneGap distribution folder, instead of phonegap.js and phonegap.jar files.
You will notice that the MDS AppLaud plugin in Eclipse is also pretty confused about it.

This blog post may clear you off the name confusion.


Loading PhoneGap library for different devices

Maintaining single codebase while building native mobile applications is one of the reasons for using PhoneGap. PhoneGap provides a separate JavaScript library for different devices. Based on the device you have to load the appropriate PhoneGap JS files.
Say, your application is targeting the Android, iPhone and Blackberry platforms, you can have the PhoneGap JS file (phonegap-versionNumber.js in the earlier versions and cordova-versionNumber.js in the current version) provided for each of these platforms renamed to
phoneGap-android.js, phoneGap-iphone.js, phonegap-blackberry.js (or)
cordova-android.js, cordova-iphone.js, cordova-blackberry.js

Based on the device that is accessing the application one of these three files can be loaded like shown below.

var userAgent = navigator.userAgent.toLowerCase();

if (userAgent.match(/android/)) {
        document.write("<script src='phonegap-android.js'></script>");
    else if (userAgent.match(/iphone/)){
        document.write("<script src='phonegap-iphone.js'></script>");
    else if (userAgent.match(/blackberry/)){{
        document.write("<script src='phonegap-blackberry.js'></script>"); 

Video lectures on Sencha Touch 2.0

You can view few introductory video sessions on Sencha Touch 2.0. You can find the videos in DuraSoft site as well.

The plan is to upload atleast 2 videos per week.


Update on video sessions in Sencha Touch 2.0

My work on creating video sessions in Sencha Touch 2.0 is progressing at a good speed. Thanks to the increasing number of inquiries regarding this, which is keeping me on my toes. Looks like it’ll take couple of more days before uploading a sizeable number of videos in this topic.