5 Replies Latest reply on Nov 28, 2012 6:42 AM by rob.speakman

    Most efficient way of Pull Filemaker data from PHP API

    rob.speakman

      Hi Guys,

       

      I working on a system and before I start the PHP integration I thought I would pick the brain of some of the best and brightest.

       

      In the past if I was going to pull data into a single PHP web page, I would set up one layout in filemaker will all the field I need in the current table and also all the related data that also need to be pulled onto the PHP page. I'm now wondering if this isn't the best approach as far as I know it is not something you would do with an SQL database.

       

      I am considering now if it would be better to have a Filemaker layout per set of data I want to display on one PHP page and load the related data by submitting a request to each layout one at a time therefore pulling the data in stages. Do you think this method would be quicker than my previous method.

       

      N.B.The goal is to give a faster experience to the web user.

       

      Any thoughts or other approaches would be much appreciated.

       

      Many Thanks

       

      Rob

      We Know Data

        • 1. Re: Most efficient way of Pull Filemaker data from PHP API
          filemaker@i-absolute.com

          Hello Rob, that is right!

           

          I usually create many optimized layouts with a few fields.

          Also consider using ajax to load data asynchronously, improving the user experience.

           

          Fabio

           

           

          Il giorno 18/nov/2012, alle ore 14:12, weknowdata <noreply@filemaker.com> ha scritto:

           

           

          creato da weknowdata in Integration - Sharing Data With Other Programs - Visualizza la discussione completa

          Hi Guys,

           

           

          I working on a system and before I start the PHP integration I thought I would pick the brain of some of the best and brightest.

           

           

          In the past if I was going to pull data into a single PHP web page, I would set up one layout in filemaker will all the field I need in the current table and also all the related data that also need to be pulled onto the PHP page. I'm now wondering if this isn't the best approach as far as I know it is not something you would do with an SQL database.

           

           

          I am considering now if it would be better to have a Filemaker layout per set of data I want to display on one PHP page and load the related data by submitting a request to each layout one at a time therefore pulling the data in stages. Do you think this method would be quicker than my previous method.

           

           

          N.B.The goal is to give a faster experience to the web user.

           

           

          Any thoughts or other approaches would be much appreciated.

           

           

          Many Thanks

           

           

          Rob

           

          We Know Data

           

          Per rispondere a tale utente, rispondi a questo messaggio e-mail -o- accedi al messaggio su FileMaker Technical Network

          Avvia una nuova discussione in Integration - Sharing Data With Other Programs per e-mail o in FileMaker Technical Network

          Gestisci le tue preferenze email.

           

          FileMaker Developer Conference 2013 • San Diego, California • August 12-15 • www.filemaker.com/devcon

           

          • 2. Re: Most efficient way of Pull Filemaker data from PHP API
            Malcolm

            In the past if I was going to pull data into a single PHP web page, I would set up one layout in filemaker will all the field I need in the current table and also all the related data that also need to be pulled onto the PHP page. I'm now wondering if this isn't the best approach as far as I know it is not something you would do with an SQL database.

             

             

            I am considering now if it would be better to have a Filemaker layout per set of data I want to display on one PHP page and load the related data by submitting a request to each layout one at a time therefore pulling the data in stages. Do you think this method would be quicker than my previous method.

             

            You'd probably need to do both and measure the performance of your application. There is no clear answer because there are many factors, such as:

            How much data is being transferred?

            What are the network conditions?

            What do your users expect?

             

            Malcolm

            • 3. Re: Most efficient way of Pull Filemaker data from PHP API
              steve.winter

               

              You'd probably need to do both and measure the performance of your application. There is no clear answer because there are many factors

               

               

              I agree entirely with Malcolm's assertion here - the only way to know in your situation is to test it.

               

              Remember that most databases used for web applications don't have the concept of a 'permanent' relationships and portals, so just because that's not the way MySQL(for example) does things doesn't mean it isn't' right for FileMaker.

               

              Every query to a new layout in the database carries with it overheads in terms of establishing a new connection - each query is a new cURL request, and while I'd be sure that the API caches the connection for re-use there are still additional 'costs' with each new query…

               

              My personal experience is that if the 'join' is relatively simple, and the volume of data low, then portals will be quicker. As the complexity of the joins increase, the 'distance' between tables increases (e.g. is the table you wish to draw data from a child of the parent, or a grandchild of the parent) and the volume of data being returned increases then you may be better looking to make direct queries to child tables…

               

              BUT - you need to test it in your own situation to know what will work best…

               

              Cheers

              Steve

              • 4. Re: Most efficient way of Pull Filemaker data from PHP API
                PalmDBS

                I agree as well - depending on the number of fields and how they are being used/incorporated, either method could be faster.  If you need a few fields from a single related table on the fly, hitting up that layout through an AJAX call may be the best.  If you're writing to multiple related records, using a layout with a portal on it would work faster, as you can update all the related records in one FM edit/execute statement instead of switching layout and making multiple edit/execute statements.

                 

                In short, no one way is right - you have to customize to your solution for the most optimized performance.

                • 5. Re: Most efficient way of Pull Filemaker data from PHP API
                  rob.speakman

                  Fabietto, Malcolm, steveWinter and dbmike

                   

                  Thank you all for spending the time to comment on my post, it was very interesting to hear your combined thoughts. I have done some testing which proves that the differences between load speed needs to be treated on a case by case basis.

                   

                  I will continue my testing and try to write it up as there seem there may be a farely consistent tipping point when you should pull data from another layout.

                   

                  This might be slowed down a little by the fact that I am current integrating Filemaker Server with backbone.js for a client. Not sure if you guys have any experience in backbone, but form my work so far seems great and  I'm really enjoying it!

                   

                  Have an excellent Christmas & New Year.

                   

                  Thanks Again

                   

                  Rob