Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

With Phonegap, which is better: multiple html pages or multiple jquery-mobile pages?

As the title say, Which is better, multiple html pages or multiple jquery-mobile pages?

To emphasize:

What I mean by multiple html pages is that an app that starts with index.html and as you navigate with your app, it will change the visible page (via href) to other html pages like for example another.html, anotherone.html, anothertwo.html and so on.

What I mean by multiple jquery-mobile pages is like this one.

Additionally, what I mean better is in terms of starting speed of the app, loading speed per page, installer/app size, memory consumption.

like image 835
Marl Avatar asked Nov 07 '12 08:11

Marl


1 Answers

This is not a complete answer, but there are things to consider when loading a "multiple jquery-mobile pages".

Cons of "multiple pages" case:

  • do you need dynamic content in the pages? This would need to reload the whole multiple pages each time.
  • how often do you update (I mean in application update to provide more detailed content for ex.) the pages? It is less convenient to update a page among many pages from one file, and CSS/XPath could be messy if you need fancy UI display (like relative/absolute kind of position of component
  • very large page would take longer to load (but you'd need to actually test on various device to see the real impact and a "Loading" first page could make the trick).

In term of app size, I can't say here, but my feeling is that it wouldn't change much to have 1 page or multiple page. However having 1 big file would give difficulty (i.e. lower performance) to the device with less RAM.

My personal preference would go to several pages unless the content is really small and not dynamic (i.e. depends on user input/action).

like image 73
JScoobyCed Avatar answered Nov 09 '22 12:11

JScoobyCed