Genii Weblog
Two books I couldn't pass up
Mon 2 May 2011, 11:12 AM
Tweetby Ben Langhinrichs
Copyright © 2011 Genii Software Ltd.
What has been said:
989.1. TimFromUK (03/05/2011 12:14)
Ben
I have just completed my company's first smartphone app which works on iPhone, iPad, Android and Blackberry 6 OS. All with one set of code, because it is a web app, using javascript, html and ajax only. Works offline and stores data locally (ie, it usees HTML5 features) and looks like an App.
I truly think this is the future - much cheaper and quicker than developing for at least 3 platforms!
989.2. Ben Langhinrichs (05/03/2011 01:42 PM)
@TimFromUK - That's great. I am betting that you are right about the future, but I think it's worth investing some time and money in the different app platforms just in case. Android seems to be charging forward.
I am curious to know more about your experience. How will you distribute the app, or is it for internal use? Did you run into any unusual coding difficulties given the nature of the mobile devices, or was it just like developing a web app with a very small screen?
989.3. TimFromUK (03/05/2011 14:12)
>>How will you distribute the app, or is it for internal use?
We are a membership body, so we put the links and instructions on our web site.
>>Did you run into any unusual coding difficulties given the nature of the mobile devices, or was it just like developing a web app with a very small screen
Exactly that., with a couple of minor tweaks for the iPhone to deal with home screen icon, and making the address bar disappear so it looks more like a native app.
I did play with frameworks (I may use jQuery Mobile for the next app) but pretty much hand coded it.
The only complication I found was the local database storage (HTML5, using SQLite - currently supported by iOS, Android and Blackbrerry 6). I put the DB code in a separate js file so if some browsers move away from SQL to Indexeddb as seems likely, I can just build another library for that.
The complication was that the javascript for db access is asyncrhonous so instead of just firing off a call to read or update the database, you have to use call back functions which makes following the code logic somewhat tortuous!
Oh, and getting the cache manifest to work so that the app will even work offline (you need to make sure the right mime type is served for the manifest file and that there are no incorrect links in the manifest file).
Nevertheless, developing a single set of code for 3 platforms, using stuff I already know (javascript, HTML, CSS and SQL) beats learning 3 different APIs!
Happy to supply any more information if you are interested.