Reputation: 317
I am building a phonegap app using the following technologies:
backbonejs + underscore.js + bootstrap.
My question and my understanding so far is, when phonegap builds the app, does it bundle everything into one single app,js,css,images etc, including the templates? Therefore, when I try to update view, I request the pages from the local app's memory.
There is no caching to consider from what I an understand.
Thanks,
A
Upvotes: 1
Views: 690
Reputation: 134
Phonegap packages you App, think of it as a wrapper, for Android it puts the www folder in assets, for iOS the folder is in the root directory of the iOS app and so on. You should develop your App as you do for regular web sites and put all the files related to the webpage in the www directory. You cam have multiple pages but the app starts with index.html. That is the basic concept.
My typical structure for the www folder is:
I add all my files, images and everything else I need in there and use AJAX to grab extra content from the server, like checking user loggin details etc.
Now the power of phonegap is reveled when you want to add a display icon for your app or splash screen or take advantage of the native capabilities of the specific phone you want to target like geolocation, camera even accelerometer.
So I recoment you start by building you site in the www folder then follow the instructions on how to build for a specific platform then do final tweaks for that platform by adding plugins if you need to access specific phone features.
Don't delete this <script type="text/javascript" src="cordova.js"></script>
from index.html, phongap needs it when building the app for you project.
There is a lot of info on the web, experiment and remember to have a bit of fun in the process.
Upvotes: 1