6 Replies Latest reply on Jul 7, 2011 10:51 PM by stevetemp

    PHP app running locally on ipad/mobile device

    Abhay_flex

      I am pretty new to adobe flex builder with php.  Just going through site and forum .. but have a basic question -  can we create and deploy standalone applications on ipad or any other mobile device using adobe flex with php ?

       

      Whatever examples I've seen so far export php class methods as service.  Does that mean that these php services will need to be made available on the server side ( outside of the mobile device ) and the device will access these using gprs data connections /wifi ?  ( I don't hope so ! )

       

      Related question is, does such an app run completely locally on ipad ( php service as well as flex client ) ? 

       

      Also then does the air package ( or some other package ) have interpreter for php and the database connectors on the mobile device ?

       

      Thanks

      Abhay

        • 2. Re: PHP app running locally on ipad/mobile device
          RoyGanor Level 1

          can we create and deploy standalone applications on ipad or any other mobile device using adobe flex with php ?

           

           

          Yes, this is possible.

           

           

          Does that mean that these php services will need to be made available on the server side ( outside of the mobile device ) and the device will access these using gprs data connections /wifi ?  ( I don't hope so ! )

           

           

          Correct, PHP services should be accessible to end-clients like mobile devices and Web browsers. You will then need to add an authentication and authorization layers to make sure that only eligible clients access these services.

           

          does such an app run completely locally on ipad ( php service as well as flex client ) ?

           

          The application runs independently on the mobile device but for external services and data it requires an access to the Server who supplies the data. If you don't need any data from outer service then yes - the application runs completely locally

           

          Also then does the air package ( or some other package ) have interpreter for php and the database connectors on the mobile device ?

          There is an essential point to understand - PHP code runs on the server side and is not intereprted by the AIR or iOS platforms which run the mobile device code.

           

          Enjoy,

          Roy

          • 3. Re: PHP app running locally on ipad/mobile device
            Abhay_flex Level 1

            Ahhh.. So essentially you are saying that what goes on mobile device is just the flex application and the php application runs outside the mobile device ( i.e. on server ) and the flex application just accesses php service ( like any php/non-php web service for that matter ) using internet

             

            I was hoping that even the php server runs locally on the mobile device, but that appears to be only a wish at this time, isn't it ?

             

            Do they know if there are plans to support php locally on devices like ipad through AIR ?

             

            -abhay

            • 4. Re: PHP app running locally on ipad/mobile device
              RoyGanor Level 1

              Your first statement is correct - " what goes on mobile device is just the flex application and the php application runs outside the mobile device"

               

              But the other statement "... php server runs locally on the mobile device" is strange to me and leads me to ask what do you want to create with FBPHP? It seems like you are missing an essential part of what PHP is for. PHP is (only) for the server side and will never run on your mobile device as it should access databases and business logic which is hosted on an external device.

               

              Roy

              • 5. Re: PHP app running locally on ipad/mobile device
                Abhay_flex Level 1

                Yes, I get your point. But I was looking at this solution from a different view point - running applications in "island" mode, where there is no network / server connectivity ( e.g. while on flight ) and where applications could run entirely locally - including local php server environment ( and database ofcourse ). Could be heavy for a iphone, but could work well for ipad.

                 

                -abhay

                • 6. Re: PHP app running locally on ipad/mobile device
                  stevetemp

                  I think maybe you should look at the sql lite database that flashbuilder supports which does work on the device only.

                   

                  if you google for "Flash Builder sqlite mobile" you should find plenty of reading.