If you’ve been doing much iPhone-targeted web development, you’re probably familiar with the iUI framework. It’s a great tool that makes producing iPhone-targeted web content that looks and feels like native iPhone apps relatively easy to create.
For the most part, the iUI Framework has historically focused on the actual web page presentation … providing stylesheets and JavaScript that provides the iPhone look along with enhanced UI features like animated “sliding” screens.
The iUI framework is very AJAX oriented with the focus really being on exchanging HTML fragments for updates rather than whole pages. Using a declarative model, one can designate whether to replace a sub-section of HTML page, jump to a separate section of HTML in the same page, etc.
I’ve found the model very easy to work with but had felt that one thing was missing … events.
When working in full page updates, events like load/onload, blur/onblur, etc. … allow one to execute code based on page state changes. In the iUI Framework, because it focuses on partial content loading much of the time, these events don’t fire.
I recently had a scenario where I needed such events and was planning to jump into the iUI Framework’s JavaScript and add such an event mechanism myself… but I figured that I’d check and see what the iUI folks are up to…
… Good news!! The latest update, iUI 0.40-dev provides just such a mechanism. This release now includes events like
- blur
- focus
- load
- unload
- beforetransition
- aftertransition
- beforeinsert
- afterinsert
These events make it really easy to inject any special processing you need to perform during or after the partial page updates. Check ‘em out if you haven’t already.
As a quick note… Although the iUI 0.40-dev version is pre-release, I’ve been working with it for a bit and things are working well.
Posted
Oct 27 2009, 07:29 PM
by
jim-wilson