Monday, June 11, 2007

"Web Apps Are Not Applications" Rogue Amoeba



Some developers aren't terribly pleased by Apple's announced option for those wishing to develop iPhone applications.

The original post is simply sarcastic, but this response (strongly agreeing with the original post's sentiment) sums up the poster's point of view:

Apparently if we want to develop for the iPhone, we have to be web developers, and develop web apps. Saying we can develop "Web 2.0 apps using AJAX" is just a nice way of saying "No 3rd party apps and no 3rd party widgets."


Just like if you really want to develop Cocoa apps, you can't write them (easily) in Logo, Visual Basic, C#, or Pascal.

They're right, of course, Web Apps aren't Applications.

  • They don't need to be installed
  • Or kept up to date
  • Or moved from machine to machine when you suddenly need to go on a road trip
  • Or uninstalled when not needed
  • They don't support multiple users either (a) not at all or (b) as an afterthought
  • They can't crash the machine they're running on, only the browser
  • A rogue web app can't format your hard disk, or turn your iPhone or computer into a bot
  • They can be written using a huge variety of tools and languages, many of which are childishly simple to learn
  • "Hello, world" is only a few bytes longer than the ASCII string. There's no 20MB .NET runtime.
  • They don't need to be recompiled to run on different platforms, although they do need a little tweaking.


To allow third party development for the iPhone Apple needs to provide a development and runtime environment that:
  1. is safely sandboxed so that third-party apps can't compromise the iPhone's stability,
  2. has the power to communicate with central servers, and
  3. has some kind of mechanism for distributing and updating itself
  4. and has all the usual capabilities of handling user interaction, drawing pictures, and so on

Safari has all of these things. It runs on HTML, CSS, JavaScript, and Flash, which can be generated by server code written in any language you like, including C++, LISP, Cobol, and Eiffel. Go for it.

Now, Apple could build this from scratch or it could use something that already exists. Since Apple doesn't have, say, a managed code environment like .NET to throw at the problem, the other glaringly obvious option is Web 2.0 etc. Which is what they picked. Sure, this limits what you can do in your application ... I don't think anyone has written a 3d animation package in JavaScript yet, so I guess that's going to be a stretch.

Don't want to sully your hands with Perl -- fine. Code your server in LISP or C++. I don't care. Neither does the iPhone.

Now there are legitimate concerns vis-a-vis the iPhone working when disconnected from the internet, or in low bandwidth situations. Will it be possible to (a) load a "website" onto your phone and run it as a local app (possibly with some local runtime support, such as Apacha/PHP/Perl or whatever?); (b) can you load a page or pages into your cache explicitly and always have access to them? These are perfectly legitimate questions for which I suspect there are good answers.

But whining about being forced to learn HTML/CSS/JavaScript or whatever is just dumb. If you can handle Objective-C, you're not going to have any problems building web applications.