BBC News iPad app re-done in HTML5
whitherapps.com
whitherapps.com
The future lies in thicker clients, particularly for mobile where the internet is not as assured as on a desktop.
Over all web apps offer more control for the developer as well.
• In 1.0 there was no offline cache or local storage. You had to download whole app each time over 2G.
• JS was many times slower (pre-SquirrelFish engine, slower hardware).
• No CSS transitions or animations. Now you can have 3D hardware-accelerated layers in CSS.
• You couldn't get rid of status bar and Safari toolbars. Now iOS allows apps to take over entire screen (if user bookmarks page on home screen).
Also developers needed some time to learn how to use WebKit features. Instead of dumbed-down CSS you can use some CSS3 and -webkit- properties. Instead of slow and limited onclick you can use non-standard touch events, etc.
Web developers want the web to take over from apps, in spite of the fact that the market has CLEARLY chosen native apps over web apps. Web apps had a year and they gained no traction. Compare that to the native apps traction: huge difference. Wishing it were not so does not change that.
The future lies in native shells mixed with HTML5, and this is just for portability reasons.
From technological perspective superiority of Cocoa it's not that clear either. In my "native" application I've used WebKit views in many places, because it was easier for me to create complex layouts in CSS rather than Cocoa views.
My opinion on this is that they had planned all along to have an SDK but, since it wouldn't have been ready on day 1, they said "oh no, make web-apps they're great!" so that developers would do something while they're finishing polishing the SDK.
Sure, I have no proof for this either, but it sounds unlikely that 1. they wouldn't have thought about it, 2. they would have been able to turn around an SDK in just a few months.
In a couple generations when mobile CPUs are faster and ipads have more than 256mb of ram, we will see a repeat of the web app takeover that occurred on the desktop.
If you're downvoting, please shoot me an email with your html5 mobile app to prove me wrong: einar@lcrnd.com
In my experience trying to develop HTML5 apps instead of a native app:
1) Development (and design) time is roughly equivalent between an iOS developer and an HTML developer, because of time trying to copy things that native code gets for free.
2) It's a bad idea to use a cheap HTML developer because there is a lot of stuff to work around, a good HTML5 iPad app is not something you can really do by dragging things around in dreamweaver.
3) What you wind up developing will have to be majorly modified for another platform due to iOS specific bugs, features and chrome.
4) You will never reach the same quality in HTML5 because the iPad has issues relating to CPU, RAM, and bugs or missing features in Safari that Apple doesn't seem too bothered to fix.
As a proviso, in some circumstances, like for simple apps that don't need to be perfect, HTML5 is a good idea. What I'm saying is that in most cases native will be better in time/money spent and quality of resulting product.
But those are known (or knowable). It's not like you're dealing with 5 different browsers in 10 different versions here, you're dealing with a single browser in a single version (well two by the end of the year with iOS4.x on iPad) on a single, uniform hardware platform.
So the CPU and RAM constraints are well known (and I don't think the BBC app is taxing there), and the bugs or missing features in Safari Mobile can be worked around.
Furthermore you can easily rely on proprietary stuff such as custom JS or CSS rules for transforms & stuff, which is a much bigger issue on the open web.
If you're only targetting iPhone/iPad/iPod, then what's the point of doing it as a HTML5 app? The implied advantage of HTML5 is portability.
The main downside of HTML5 for iPhone apps is that they don't appear in the App Store. How many installs has the BBC News app got because it's been featured in the App Store? Thousands, I bet.
The 'app' culture is pretty ingrained in iOS users now... if it's not in the app store, it doesn't exist. Notice how major services like Facebook have both native apps and iPhone optimised web apps.
Let's not miss the larger point here. HTML5 have become a real option of application development. A business that relies on mobile/tablet form factor should seriously consider HTML5 as the application platform. The cost of porting iPhone/iPad apps to Android phones/tablets is much less with HTML5 than with native code.
Lack of distribution and monetization of HTML5 apps doesn't need to be an issue. A web app can be embedded into a native app to be sold on the AppStore.
[1] It is better than it used to be. There used to be a weird lag at the start. Now it is nearly subliminally jerky. It also crashed when I opened it to check for this comment.
Desktop apps are not like iOS apps. They don't have very easy purchasing/billing built-in, they have to be downloaded and installed in a weird way (very few of my non-geek friends can install anything except apps on their iPhones), and they cost a fortune.
Apple will be doing a good job of maintaining AppStore the easiest option for both users and developers, and, well, people tend to use the easiest option.
In fact the only real challenges are scrolling (since Safari has a strange opinion on overflow:scroll) and embedded video (because the BBC is using some native iPlayer approach, as far as I can see).
Otherwise, my expectation is that a few 100k of HTML5 will be hard to distinguish from 6Mb or so of app. If you have a capped data plan, that might be, er, good news...
Here's a video demo of some of the layout, for the curious: http://www.youtube.com/watch?v=Pt2iJZGqMpw
Is there a reason you couldnt use them? http://caniuse.com/#feat=cors
Also the service needs to have a particular user-agent to work, so the proxy doubles up as a rewriter for that.