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.

  • SOA Webservices - How to manage individual service development on Git
  • Can Angular 2 components be externalised?
  • How to maintain different distributions of one app
  • Branch target prediction in conjunction with branch prediction?
  • How does the github website work (architecture)?
  • 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 - push current branch shortcut
  • git stash changes apply to new branch?
  • clean git history of deleted files, keeping renamed files history
  • Override .gitattributes text=auto in Windows
  • Get commit list between tags in git
  • Converting a free source control to CM Synergy
  • 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.