Forum OpenACS Development: Re: Mobile Theme?....and OpenACS and Xowiki backed WebApps

One specific case where a targeted CSS solution may not be enough is in the writing of a 'WebApp' specifically for iOS devices, with OpenACS driving it. I am about to experiment with this, and one of the presentation layers I thought I'd try (wAN) requires content to be delivered asynchronously conforming to its own XML DTD.

As well as the WebApp interactions, I'd also want OpenACS to be able to serve the same content in the conventional interface for non-iOS users. CSS @media or javascript feature detection client-side to determine would not be enough in this case, because I need to serve fundamentally different underlying markup as well.

Which of the following would be best?

1) iOS device requests include a parameter webapp='t' which gets passed from page to page?

2) iOS device is identified at the time the session cookie is created and the session cookie is flagged (obviously this would a core change)?

3) Write completely new set of adp 'pages' to drive the webapp?

How best to do this for Xowiki content?

a) Should the render method for ::xowiko::FormPages be adapted, or should I write a new render_4iOS method?

b) Subclass ::xowiki::FormPage to ::xowiki::iOSFormPage, but then what about serving content to normal browsers (problem in reverse)?

b) Should this be done as per 1, 2 & 3 above, by modifying the xowiki adp templates?

There's no correct answer I know, but I'd really appreciate some opinions.

Regards
Richard