Thursday 17 February 2011

Hello HTML 5

And so my journey starts, and it starts with a book.
“Building iPhone Apps with HTML, CSS, and JavaScript” it is exactly what I was looking for.

  1. I have a good knowledge and experience with HTML, CSS and JavaScript. So it looks like my learning curve will be very short (will have to learn some of the latest HTML 5 features and to polish my JavaScript, as I didn’t do any web project for the past four years).
  2. Although the book’s title talks about building an iPhone app, the same tools and technics applies for ANY mobile OS.
  3. No need to buy any product/license –just grab any text editor/IDE and hit the road.
  4. Can develop using my Windows PC. One of the annoying things with building an iPhone app is the fact you have to have a Mac. My wife owns a MacBook Pro, so worst case I can use her, but I would definitely prefer to work on my Windows PC, using my Visual Studio.

If I will try to summaries the book with my key points:

  1. Build a web app
  2. Give your web app the same look and feel as iPhone app, using HTML, CSS and JavaScript.
  3. Build a native package from the web app code using PhoneGap
  4. Send your application to the market. In case you had problems to approve your app, you still have a web app.

PhoneGap also have API that gives access to the device hardware, So if you want to write application that will make use of the device’s file system, Events, Contacts, Camera and so – it can be done with some limitations on some devices.
All sounds good, clear and simple.

My biggest problem at this point was the fact I didn’t have any idea of specific app to develop. As I cannot code without any clear target to achieve, I came up with a simple idea, I will develop a very simple math game. And so I started.

I was wondering how to manage a local Database using HTML, CSS and JavaScript. After some Googling I have learn about using local DB with HTML 5. Will answer most of my needs.
The next thing I did (following the book) was to install a web server (IIS) on my PC, so I will be able to browse and play with my web app from my iPhone, at my home wireless network.

Eventually didn't go very far with my development, as very quickly I felt a bit unsure about the whole thing.
I do know how to create nice user interface elements, using HTML, to mimic the iOS native controls, but it did not feel right. Too many lines of code and it does not feel like the ‘real’ thing. I felt I could not deliver the same 'native experience' with my app.
As I started to be a bit sceptic I have decided to stop my development and to go back to Google.

I was looking for some answers. What kind of web application people already made (not necessarily PhoneGap 'native' apps – but web apps in general) ? Just to get the impression of how powerful a web app could be.
What kind of games you can write using pure JavaScript ?

To answer my first question I have checked apple’s web app catalogue.
After checking some I could say that it was exactly what I thought. Some of the web applications are really nice and made with a lot of hard work, but still, for my view, nothing to compare to native apps.
As for the JavaScript games I have found few articles like this one. It was just like a self remind of what I didn't like with web development. I don't like all of this HTML inside JavaScript...
Some will say that JavaScript is very powerful and you can do amazing things with it. Even if I will agree, I don't think that it is easy.
The bottom line - I don't want to create a web app !
Few days ago, my good old friend Yossi sent me this link. I was very happy to read and to know, I am not alone.

To be fair I would say that I really think that PhoneGap is a very impressive tool and can easily see how it can be use for some scenarios, but I don't see how it will help me with having fun, coding on my free time.

OK - So bye bye HTML 5, and goodbye PhoneGap - so what's now :(  ?
Some Googling, and...
Should I try "Appcelerator" ?

- to be continue...

No comments:

Post a Comment