Collaborate/Structure a large scale Phonegap project
My friend and I planned to start on a mobile Phonegap projects, which will cover iOS, Android, and Window Phone. It will require access to some native features like Camera Phone. It will also have to make some XHR server calls, which is done in CakePHP.
Now I am wondering how such a project is usually structured in Phonegap/ and what to Git commit.
Here are something I am considering:
1) We will need one repo for the server side stuff because this is relatively universal.
2) Should we keep all mobile apps in its separated Git repos? (so 1 for iOS, 1 for Android, 1 for Window Phone). This approach will have to maintain 3 separate www folder, each of will will be consisted of many html files.
I really admire this Wikimedia project done in Phonegap: https://github.com/wikimedia/WikipediaMobile. They keep everything in one giant repo and a universal www folder with separated device-related js files (like my approach 3). Though it’s a little complicated for me to trace through how they’ve done their.
If you happen to know of a case study broken down about WikipediaMobile, please let me know.
One Solution collect form web for “Collaborate/Structure a large scale Phonegap project”
The approach I recommend would be to have everything in one repository but break that down into a folder structure like:
- android [eclipse_project] - ios [xcode_project] - windows [vs_project] - www
Each platform specific folder contains the native project for each platform (i.e. your Xcode project sits in the iOS folder, your Eclipse project sits in the Android folder) but the actual HTML/JS application is stored in the www folder.
As @F481 hints at, whether or not you use PhoneGap Build will make a big difference. If you use PhoneGap build you won’t need native projects (which is great if you aren’t familiar with the native IDEs) so you’ll only need a single folder for the web-application. I recommend you take a look!
I hope this answers your questions!