2 Replies Latest reply on Mar 16, 2009 4:58 PM by ChrisKStuart

    Help with a few basic server concepts

      Hi. I'm fairly proficient with Flex but struggling with the concepts of communication between flex and the server.
      My first question is why are there a few ways to communicate with a server eg. HTTPservice, RemoteObjects, etc.
      Secondly, do I need to learn another language eg. PHP, JAVA to properly communicate with the server.

      If anyone knows of a good tutorial, book or other documentation that simply describes server side concepts (ideally relating to flex and AS3) I would really appreciate it.

        • 1. Re: Help with a few basic server concepts
          Gregory Lafrance Level 6
          Many times the back-end technologies are already in place, or the people who would start to build Flex apps already have expertise in certain back-end etchnologies.

          So Flex allows you to pick your technology to an extent. If you are just getting started in the back-end, PHP is a good choice, and it works well with databases, and is fairly easy to learn.

          The Flex builder help sys has lots of data on connecting to data, but I usually do google searches.
          • 2. Re: Help with a few basic server concepts
            Check out this benchmark, compares many data communication approaches, best performance was achieved with Flex RemoteObject (Select "Flex AMF - 5000 Rows" from dropdown):

            "The Flex AMF benchmark makes a RemoteObject request to the server for 5000 rows. The server serializes the data in the AMF format. AMF is a binary object format for ActionScript objects in the Flash Virtual Machine. The client gets the AMF data over HTTP, shoves it into memory, then updates the DataGrid with the 5000 rows. The DataGrid supports client side sorting.

            Out of all the benchmarks AMF is by far the fastest and smallest across the wire. There is nearly no parse time because the objects are already AS objects (instead of XML or another text based object representation). Render time is also extremely fast due to Flash's, Mozilla Tamarin JIT'd VM. If you try sorting you will again see the performance of the VM. Notice that sorting is faster in the AMF benchmark than in the E4X benchmark because the objects are typed AS objects rather than XML objects."

            This post contains AMF benefits and example code:

            Hope this helps!