views:

40

answers:

1

I'm starting to make an iphone app with jqtouch - so i'm keen to hear some best practises.

I'm developing for iphones users on a UK 3G connection.

  • Any particular things that cause script blocking?
  • What are the main performance hotspots?
  • Whats the deal with browser caching?
  • If the iphone doesn't cache should i include my scripts and styles in the page?

basically, i'm looking for some general tips and absolute no-no's!

A: 

I have developed four web apps for the iPhone specifically, the first two using JQTouch and the last two using my own framework I put together in a day and a half - I switched from JQTouch because it was slow, unwieldy and heavy to use, and my own replacement was significnatly lighter, faster and did everything exactly as I wanted it.

Regarding caching, take a good look at the cache manifest file that Safari implements as part of html5 - this will give hints to Safari as to what needs to be cached locally and cuts down on access times a lot.

Keep your page sizes down - if you have a lot of data, use html5 local storage to store data and JQuery to dynamically create application pages as you go. JQuery can choke if you do not design your page hierarchy well, and have lots of elements in the page (my last project had 50 top level categories, each with 10 subcategories, each with 10 options - putting all of those in the page itself caused JQuery to hang for 5 to 10 seconds on first lookup, while moving all of the data into html5 local storage and doing sql selects to build the page sped the entire process up considerably).

Moo
yes i'm starting to see the limitation of jqtouch!
Haroldo
All of the transitions et al are very easy to accomplish in code (my library is about 1/3rd the size of JQTouch and it handles all of the same transitions and button clicks, as well as tabs and scrolling), so I would suggest you go right ahead and roll your own :)
Moo