I set up a demo mode for my iPhoneWx web app here:

     http://hunter.pairsite.com/iphonewx/main.php?id=demo

iPhoneWx is a companion web app to my Wx weather software on OS X.

Within iPhoneWx, I make use of asynchronous XMLHttpRequest calls to
get data from the US National Weather Service (NWS) XML data feeds.  I
had to implement a couple PHP pass-through scripts on my site to allow
cross-site XMLHttpRequests from the web app to the NWS servers.  The
rest is fairly basic Javascript, css, and html.  I am new to
Javascript and css, and my HTML skills date back to the early 90s, so
this was pretty much a new experience for me.  But it was fun to
learn, and easier than working on traditional apps in my opinion.

To minimize network access and control data updates, I implemented
very specific data caching rules in iPhoneWx. Mobile Safari on the
iPhone does caching of course, but it is generic web browser caching
and obviously not aware of update times and schedules used by the NWS
data feeds. As a result, Safari was caching when I didn't want it to
and not caching when I did! So I use local storage within Javascript
code to keep time stamped data on hand, and only go out for fresh data
when the cache gets stale (the cache cycle runs between 7 and 20
minutes depending on the particular data feed and product).

iPhoneWx is configured by exporting settings from Wx on a Mac to a
Safari bookmark, which is later synched to an iPhone.  This allows
easy setup of as many as 20 weather locations and 20 weather maps,
which would be kind of tedious to do on an iPhone.

I have a few more things to address.  First, there is a graphical
glitch when first loading the page where a standard form menu selector
is briefly shown before the "blue button" style is applied to the
selector.  It's temporary and not an operational issue, but it seems
like it should not be happening.  If anyone knows why this happens,
let me know.

It would be nice if Apple gave us a way to hide or collapse the
standard URL bar in Mobile Safari.  I am aware of the kludge proposed
by Joe Hewitt to scroll the page to (0,1) but this is temporary and
goes away as soon as a user scrolls the viewport (even if
accidental).  It definitely doesn't help much for long scrolling pages
(such as my forecast display).  Really, I think Apple just needs to
provide a way for the URL bar to collapse (perhaps tapping on the
collapsed bar could restore it to full height).

I made no effort to handle landscape view, since most of the data is
more readable in portrait mode and I sized everything for a 320 wide
viewport.  The exception is in the zoom/pan modes for radar and maps,
where portrait or landscape can be used.

I guess that's it -- if anyone has feedback or suggestions, I will
gladly take it!  I'd be glad to answer any questions you might have.

thanks,
Craig

p.s. thanks to Joe Hewitt for iUI -- though I did not use it directly,
it gave me a lot of ideas and provided a good template.  It was
certainly a great example of CSS for a newbie to follow.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to