3 Replies Latest reply on Aug 8, 2016 10:40 AM by VectorP

    newbie design question

    netvillage Level 1

      Trying to understand how this work under the covers so I can make better design decisions.

      I understand that phonegap is basically web browser running your app on the phone. When you build your iphone installation (I've never done that), does that basically take all your web stuff (html files, images, js, etc) and bundle them up as an "app" and put them on the person's phone (within your "app") and run the whole thing locally (via phonegap) as a web server? Meaning that when it loads index.html, it's loading a local copy (on the phone) and not an http://mywebsite/index.html version.

      If that's the case, then I guess that means php calls are done via ajax or something, to my external webserver, and I guess I have to whitelist (I read that somewhere) it or something,

      but the main gist, I guess, is that the app on the phone seems to be running both a browser and small basic web server too?

        • 1. Re: newbie design question
          VectorP Level 4

          Not quite.

          The assets (html/js/css/graphics) are stored in the app bundle and displayed in a native Webview component.

          There is no local server involved.


          Phonegap is just the building tool. It prepares your hybrid app as signed .apk, .ipa, etc.

          Phonegap is not active at execution time! There's just a piece of javascript, which gets included in your assets, to act as a bridge between your local javascript and native plugins.


          Server side scripts are indeed to be performed on a remote server upon ajax communication (or through a socket). You would design your client/server application MVC-ish.

          1 person found this helpful
          • 2. Re: newbie design question
            netvillage Level 1

            ah, ok no server. So does that mean the webview component (not exactly sure what that mean but I assume its sort like a browser widget) it basically runs my index.html, sorta like if I had clicked on an HTML file on my windows explorer.

            Thanks for your answer!

            • 3. Re: newbie design question
              VectorP Level 4