Writing web apps for the iPhone

I’ve been working on a web app for the iPhone the last few days. It’s been a little while since I’ve done ASP.NET (I miss it!) so it’s fun to jump back in. I came across iUI – a very well done, lightweight and visually beautiful “mini-framework” for creating web sites that behave just like native iPhone applications. Digg.com used an early version of iUI to create their iPhone interface.

Unfortunately, to use the HTML structure and navigation paradigm that iUI supports out of the box, I feel more like I’m coding in classic ASP, not ASP.NET. iUI (as it currently stands) is all about replacing the current page fragment with one returned from the server via an Ajax call. Sort of like a bunch of UpdatePanel’s that keep replacing each other–except that the last instance isn’t removed, just hidden. So if you navigate to a “sub page” (or sub menu) and perform an action that causes a state change such that an already-loaded higher level menu should be updated, it won’t be. It’s cached.

Alas, these are the issues I’m working around. I’m working on some possible tweaks to iUI to help support some of this functionality. I’ll probably post something when my app is done with a quick tutorial on how to use the toolkit from ASP.NET–assuming I figure it out. :)

Has anybody out there used iUI and have advice for me? I’m interested! I’ll pay big bucks… I’ll take you out for a fancy fast-food meal. How can you pass that up??

Technorati Tags: , ,

This entry was posted on Saturday, October 27th, 2007 at 12:01 am and is filed under asp.net, mac, mobile. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

6 Responses to “Writing web apps for the iPhone”

  1. Chris Says:

    I didn’t know that you had an iPhone to test it. Is there an emulator? Or is this an attempt at justifying a purchase? Nice try.

  2. aaron Says:

    I don’t have one – but I know people that do. :) And for now, Safari on Windows (or Mac, I guess :) ) comes close enough.
    I’ll probably get one when they support something faster than EDGE.

  3. SelfishGene Says:

    Hey I’ve been running into the same issues. At this point I’m planning to just take the UI assets (css, img) and do everything with standard ASP.NET.

  4. aaron Says:

    I found that it worked out very well to:
    - have a root page with full HTML that loads the initial view and loads the javascript, etc.
    - have a single page for each “div” that iUI expects (and that I don’t pre-load). Those pages return HTML fragments.

    I’m planning on writing a blog post shortly about using ASP.NET MVC on the back end, as it aligns *perfectly* with iUI’s architecture, in my opinion.

  5. Martin Says:

    hi, i’ve written a couple of web apps for the iPhone, using iUI and ASP.NET.

    You can find and download a sample project on my blog http://sludderforensladder.dk

    I agree with Aaron, i think iUI and asp.net is a perfect match.

  6. Rock the iPhone with ASP.NET MVC | Aaron Lerch Says:

    [...] to enable you to easily build a version of your site that is tailored for the iPhone experience. I first started using iUI before ASP.NET MVC was publicly introduced, and I specifically remember thinking how much iUI was [...]

Leave a Reply