iPhone web app development has its limitations
August 20, 2007
When Apple announced the third-party app strategy for the iPhone back in June at WWDC -- ie, web apps -- the news landed in the Apple developer community with a resounding thud. My initial reaction, shared by many other developers, was a combination of frustration and disappointment. No need for specific links here -- a Google search on "iPhone SDK" pretty much shows it all.
It's not that web apps aren't real apps. In my opinion, if it helps the user perform a particular task or "application" on their device, it's an app. And, as I found out, it's possible to stay up all hours of the night obsessing over a web app, just like developing a traditional Cocoa app. Actually, more so in my case, as web apps are new to me and new stuff ropes me in big time.
So, yeah, web apps are real apps, but they are not without some legitimate gripes. Foremost in my mind, a web app really only makes sense when it's based on some aspect of collaboration, sharing, or remote data / content access -- stuff that benefits from the web or requires it. For example, it would be nuts to require web access just to be able to type a to-do list on my iPhone. But if the to-do list can be shared among other users or with my other computers and devices, it makes sense as a web app. There are other concerns, but this is the big one for me. I would have a real hard time justifying a web app that doesn't have an honest web component to it.
Of course, web apps are currently the ONLY way to make non-hacker, mainstream software for the iPhone right now, so my gripe doesn't have a lot of meat. Reality does that sometimes. In this case, I think reality is acting like a form of natural selection, dividing would be iPhone developers into four categories: 1- traditional developers that are staying away, 2- traditional developers who are getting their feet wet with web apps, 3- hacker developers who are marching forward and developing native apps the hard way, and 4- existing web app developers. Actually, there's a 5th group out there -- people making iPhone-sized websites -- but I think they'd be doing that no matter what the app development outlook was.
I'm least worried about the hacker developers, as they have to be pretty damn smart and work hard to do what they are doing, plus they're making good progress. It's what comes from living under an oppressive regime. The seasoned web app developers know what they're doing too, and have been turning out some good apps (albeit in limited numbers). You'll know one when you see it.
I guess I am most concerned about category # 1 -- the traditional developers who are staying away. iPhone app development will suffer without the influx of creativity and talent these guys could bring to the table. Some of the best software on OS X these days comes from small, independent developers, and it would be great to have these guys developing for the iPhone. I know some are watching the market, and perhaps holding out for a native SDK from Apple or someone else. Others may want to get into the game right now, but are put off by the notion of web apps, or by the business aspects of web apps. Among other things, traditional developers may be discouraged by web apps because they often carry server side overhead and infrastructure requirements, they require new strategies for software registration and management, and they offer little or no protection of source code.
I attempted to make my first iPhone web app into a viable business effort by offering it as a companion product to a Mac desktop app. This keeps registration tied to the traditional software product, and gives me some control over distribution and usage. But it also relegates the web app to be more like a "feature" of the desktop app. This will enhance the value of the desktop app and may make it appeal to additional customers, but the web app will probably never be a smashing success on its own. A "killer" iPhone app might work in this role though, if it was so good and compelling that it actually drove sales of the desktop app in a major way.
Business aspects aside, the main issue I see as a traditional developer is that iPhone web app development is still very limited. Outside of some viewport settings, a couple special link types (really only the "tel:" link is new), and some new "-webkit" style attributes, there is little about making iPhone-specific web apps that differs from generic web apps. And that's possibly the most disappointing aspect of all from my standpoint. Apple's announcement states that "developers can create Web 2.0 applications which look and behave just like the applications built into iPhone", but that's not the case.
Another problem is that Safari intercepts many of the iPhone's unique input gestures such as the one-finger flick / drag and the two-finger pinch. The only input events that make it through everywhere are basic click events. Scroll events work for frame and overflow elements, but these use a little-known two finger maneuver (similar to scrolling on a MacBook trackpad) that is both awkward and inelegant compared to the one-finger flick / drag. Apple needs to give us more options to accept the iPhone's direct input events. I think we could do a lot of cool things with the touchscreen and unique gestures if we had better access.
Finally, a big limitation is that Safari on iPhone presents pages in a large panning viewport where all elements are fixed relative to one another. As a result, web apps really behave more like web pages than real apps (not surprising since Safari is formally intended to display web pages). You can layer elements and position them as usual, but there is no independence between fixed and absolute or relative positioning when the viewport moves -- so forget floating, fixed position toolbars and the like. Ironically, a lot of the stuff that makes web apps look great in Safari 3 on the desktop doesn't work out on the iPhone because of this lack of element position independence. And the iPhone's small screen is where we need it the most.
These are just a few issues I have run into that take the glow off of developing web apps for the iPhone. There are more, but they all follow the same basic theme. Now, don't get me wrong -- I adore my iPhone and I really enjoy developing web apps and experimenting with it. But it has become clear to me that the web app path is very limiting, mostly because Apple has not actively expanded our capabilities much beyond creating generic web apps. At this stage, there is just not a lot about developing web apps for the iPhone that is iPhone-specific or iPhone-optimized. That's disappointing considering the iPhone is such a unique, breakthrough device.
For all the seriousness behind that "web 2.0" app announcement Apple floated at WWDC, there is very little in the way of substance, and maybe that's the real tragedy here. Forget the missing native SDK, how about an SDK for the official web app development path? If we really want to come up with great web apps for the iPhone, they need to look better than web pages in Safari, and Apple should be the one leading the charge. Let's see them eat some of their own iPhone-flavored dog food.