For example, at the time of this writing, certain parts of the iUI framework are not
functional inside of a data URL, thus greatly limiting the potential for Web developers to take
advantage of offline storage.
Creating an Offline iPhone/iPod touch Application
After examining these constraints, it is clear that the best candidates for offline iPhone/iPod touch
applications are those that are relatively small in both scope and overall code base. A tip calculator, for
example, is a good example applet because its UI would be simple and its programming logic would be
straightforward and not require accessing complex JavaScript libraries. I??™ll walk you through the steps
needed to create an offline application.
After reviewing the constraints and making sure that your application will likely work in an offline
mode, you will want to begin by designing and programming as if it were a normal iPhone/iPod touch
application. For this sample applet, the interface of the tip calculator is based on a subset of the iUI
framework. (Because the functionality inside iui.js is not compatible with data URLs, I am not including
any references to this external file.) Figure 10-4 shows the Tipster application interface that you will be
constructing.
Pages:
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266