3 Replies Latest reply on Jan 2, 2007 12:06 PM by Jfill

    Transfer data objects from flex to CF

    Jfill
      I might not be explaining this correctly but I will do my best as I am a newbie with Flex. I would like to create the data model in flex to hold the data for the application. Then once the user is ready to save the data, transfer the entire object over to CF and have it store all the data in the database. I guess the question is how would I transfer the object to CF and what would in arrive in CF as (struct, array, object, etc)?

      Hope this makes sense and any help would be great!

      Thanks
        • 1. Re: Transfer data objects from flex to CF
          peterent Level 2
          If you don't already have it, get Flex Builder 2 and CF 7.0.2. ColdFusion 7.0.2 comes with the Flex 2 Connectivity Kit and a plug-in for Flex Builder 2 that lets you easily create CFCs and corresponding ActionScript 3 objects.

          The idea is that you have a CFC which represents an "object". Say you have an employee.cfc which contains code to load itself from the database, save itself to the database, and has get and set functions for all its properties (eg, getfirstname()).

          You then create a corresponding ActionScript 3 class which has properties matching the set/get functions in the CFC (eg, firstname). PLUS, the ActionScript object has a [RemoteClass] metadata statement which names the CFC as its remote version.

          Now the Flex gateway that comes with CF 7.0.2 will automatically serialze the employee.cfc to and from the Employee.as.

          Check it out - great stuff.
          • 2. Transfer data objects from flex to CF
            Jfill Level 1
            Thanks for the info!

            Is it possible to download the Connectivity Kit without re-downloading the entire 7.02? I have had CF and Flex builder installed for awhile but for some reason I do not have the RDS option available in my flex builder views. So I am assuming I do not have the connectivity kit installed.

            Any ideas on that.
            • 3. Re: Transfer data objects from flex to CF
              Jfill Level 1
              Oops sorry I found it. It was under the coldfusion folder in the views options. I thought there was suppose to be a rds folder.

              Thanks again!