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.

  • How does the github website work (architecture)?
  • Setting up git for development and production
  • Branch target prediction in conjunction with branch prediction?
  • Handling multiple sites via git
  • Why does Git store (and hash) blob size in the blob file?
  • How to maintain different distributions of one app
  • 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.

    3) Compact everything into one giant Git repo with a one-page HTML document index.html only. Everything else will be handled by javascript and device-related functions. (Though I don’t know how to handle page transition, navigation, back button on this approach yet — still learning)

    I really admire this Wikimedia project done in Phonegap: 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.

  • git status after checking out a previous commit
  • Visual Studo: Cant build/rebuild/clean after git merge
  • Git diff broken in window git bash shell (Windows)
  • Integrating Git Slave With Jenkins
  • Git map directory to branch
  • Update a local branch with the changes from a tracked remote branch
  • 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
    - ios
    - windows
    - 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.

    In my opinion the web-application you build in a PhoneGap project should be entirely platform independent so there should only ever be one version. Given that the browsers across Android/iOS/Windows are pretty well standardised this shouldn’t be too much of a problem so I can’t see why separate JS files would be necessary. At any rate, if you need different behaviour per device you could identify the devices then handle it at a JavaScript-code/CSS level.

    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!

    Git Baby is a git and github fan, let's start git clone.