Log in

View Full Version : Cross-platform Smartphone Development for Web Developers (no Java required)



Hands0n
25th August 2011, 10:50 PM
If you want to develop apps for iOS you will need to know, or learn, Objective C.

If you want to develop apps for Android you will need to know, or learn, Java.

Similarly, if you want to develop apps for Symbian, Windows Mobile 7, WebOS, Bada or RIM OS, then you'll need to learn those particular OS languages and SDKs.

The above was true until PhoneGap. This application development environment claims to be "The only open source mobile framework that supports 6 platforms". The promotional material goes on to state that
PhoneGap is an HTML5 app platform that allows you to author native applications with web technologies and get access to APIs and app stores. PhoneGap leverages web technologies developers already know best... HTML and JavaScript.

Late last night ...
And so, yesterday evening, I decided to put this to the test. After all, I can develop in HTML, I have a smattering of JavaScript, but absolutely no formal Java skills that would be noteworthy. Could I really develop a small application for Android using just HTML and JavaScript?

I already have Java, the Android SDK and Eclipse IDE installed on my Macbook Pro. I had made a start on learning Java last year, but did not get too far because of other commitments. I will pick it up again some time. And so adding PhoneGap to this environment was all that was needed to get me started.

Incidentally, you can use any SDK and IDE you like, where it is standard for development of the smartphone OS that you are used to.

Easier said than done. The instructions on the website and its associated wiki were a little confusing at first. There is a little bit of copying of files and editing of parameters to be done in the Eclipse Project to get it ready to use PhoneGap. But eventually everything was in place, and I'm sure that after a few iterations I'll be proficient in setting up new projects (each has to be set up to use PhoneGap individually).

What you end up with is a /www directory with an index.html file that will be familiar to anyone who has worked with web creation before. It is within this file that you place all of the HTML and JavaScript. These can even be prepared outside of the environment using your favourite web development tool (Dreamweaver for instance). Copy the resulting code into index.html and its job done.

Compiling the application and targeting it to the Android emulator or a physical handset is trivial and normal SDK function.

And so ...
Within about five minutes of getting the environment set up to use PhoneGap I had my first "Hello World" app up and running, complete with Dialogue box and buttons.

Now I need an application development muse to help me come up with some ideas :)

If this has whetted your appetite to give smartphone development a try then take a wander over to http://www.phonegap.com/ and check it out.

PhoneGap is approved by Apple, it does not suffer the same fate as Flash. Read more here --> http://engt.co/nkHIs9

Oh, and remember, if you develop any apps that you'd like to share, well just pop the link to them in this thread.

Ben
26th August 2011, 09:04 AM
Ah, nice. Good to see this; there's already something similar in the market called jquery mobile (http://jquerymobile.com/) which we use, makes me wonder how much this differs...

gorilla
26th August 2011, 09:21 AM
I predict that most phone apps will be HTML5 in the future and here's why:
Develop once deploy everywhere;
Future iterations of the mobile OS will allow tighter integration with the browser - therefore allowing a native like experience;

There will always be a need for proper native apps, but what we are already seeing with HTML5 web apps is quite exciting.

Now, if only I had some great idea for a web app...