4 Replies Latest reply on Aug 27, 2017 8:55 AM by kerrishotts

    phonegap and mamp


      so is it possible to setup phonegap mysql connection with mamp? if not then is it better to set it mysql up on online database and just redirect the db connection there?

        • 1. Re: phonegap and mamp
          kerrishotts Adobe Employee

          JavaScript can't make a direct connection to external databases without some sort of intermediate web service. So you'll need to provide that in order for your app to communicate with your backend. Be aware that this involves significant security concerns (always use HTTPS, injection, data validation, etc.) and your web service should NEVER act as a direct proxy to your database (that is, an attacker should never be able to run arbitrary SQL via your web service). You can test a web service on your dev machine assuming your device is on the same network, but at some point you'll have to move the web service to be accessible online. Be sure to adequately protect your backend as well and keep it up to date re: security patches and such.

          • 2. Re: phonegap and mamp
            kerrishotts Adobe Employee

            Extra tip: your backend should be a separate instance from your webservice instance so that you can lock down the backend even more strongly than the webservice. (Exposing a database instance directly to the web is never a good idea.)

            • 3. Re: phonegap and mamp
              knightsj Level 1

              Yep already setup validation and everything.  but this is just for test purposes.  I never tried building hybrid system using html5.  still experimenting on the best way to build my app.  Obviously security is constantly in my mind.  Thank you

              • 4. Re: phonegap and mamp
                kerrishotts Adobe Employee

                If you aren't already familiar with OWASP, I urge you to check them out -- they have lots of useful resources for web apps and security: https://www.owasp.org/index.php/Main_Page