I am building a local/static mobile app using jquery mobile+phonegap. Since I want to be least dependent on getting server side, I thought to go for placing the resultant files (at least 200+ same looking pages with individual table results). For a second thought, that would certainly increase the app's size. So I came to a conclusion on having a single resultant page with conditional results. Problem is, there are approx. 200+ results.
Hence, I'm a little confused which way to go. If a conditional statement has to be chosen, which one to go with for a better performance as I certainly might be increasing the result loading of the app, in this case,
- the if else ladder,
like
if(someVar==1)
<//Display so and so variable and image values at placeholders and header on result.html>;
else if(someVar==2)
<//Display so and so variable and image values at placeholders and header on result.html>;
else if(someVar==3)
<//Display so and so variable and image values at placeholders and header on result.html>;
.
.
.
.
else if(someVar==200)
<//Display so and so variable and image values at placeholders and header on result.html>;
or - the switch case?
like
switch(someVar){
case 1: <//Display so and so variable and image values at placeholders and header on result.html>;
break;
case 2: <//Display so and so variable and image values at placeholders and header on result.html>;
break;
case 3: <//Display so and so variable and image values at placeholders and header on result.html>;
break;
.
.
.
case 200: <//Display so and so variable and image values at placeholders and header on result.html>;
break;
}
or even containing different result pages like result1.html, result2.html, result3.html.
Whatever could give better performance as a locally stored smartphone app (either of the 3)