Reputation: 45
I have a question regarding the Phonegap basic architecture design:
1.The phonegap project contains an "index.html" file which controls the flow and functionality of the application.
If I need to implement an app which contains 4 tabs, the general idea is creating 4 classes, one for each tab, allocate a middle section for its view (the upper and lower sections are the static bars) and changing it each time a click event is happening on the tabbar (the bottom bar).
Should I squeez everything into one giant index.html file or use couple of html files but then how can I upload more then one file when the project is beeing deployed via Phonegap (since the deployment requires one html file).
2.Where can I get a good explanation with examples of creating (and deploying) a complete phonegap project.
Thanks, Asaf
Upvotes: 2
Views: 3219
Reputation: 21
just came across this link , though very old question , answering here for the benefit of subsequent visitors ..
PhoneGap / Cordova apps can be written in two flavors
From my experience I would suggest, go for Single page application strategy , reason it has many performance advantages over multipage application , as follows
Cons of Multipage Applications Cons
Due to transition between pages
PhoneGap JavaScript library Should be included in every page that uses PhoneGap APIs.
Apple Appstore (The Dark Giant in White )
Suggestion frameworks to build Cool Single page ( UI + PhonegGap ) App
HTML5 , css, JS also its offers inbuilt MVC also out of the box Store , so its MVCS
M - Model
V - View
C - Controller
S - Store
have a look at http://www.sencha.com/products/touch/
Upvotes: 2
Reputation: 5835
Please go through with this document called 'get started Guild' for phonegap. You can setup Phonegap in 5 mobile platforms sdk.
Now Phonegap runs on HTML, css and Javascript, so you need to get familiar with the HTML, css, javascript and yes it is possible to create multiple html pages in your app, to navigate from one html page to another you just need to call js method window.location
from your index.html which is default main html page for phonegap application.
You can build bottom tab bar in phonegap by using 2 ways specially in iPhone you can called the native UITabBarController or you can customize bottom tabbar using HTML, JS and css so that can useful for many platforms.
There are number of good js plugin available for Mobile that you can easily integrate in Phonegap like sencha touch, JQTouch, jQuery Moblie etc.
Following link will help you to setup sencha in phonegap- http://www.sencha.com/learn/a-sencha-touch-mvc-application-with-phonegap
If you interested to integrate sencha framework please download sencha framework
Demo - http://dev.sencha.com/deploy/touch/examples/kitchensink/
If you interested in JQtouch, you can find useful code here
Demo - http://web.me.com/djpinter1/iPhone/jqtouch/demos/main_tabbar/#ui
thanks,
Mayur
Upvotes: 0