2 Replies Latest reply on Jun 29, 2010 11:24 AM by enfantterrible-tijzQ7

    Sharing ColdFusion Components (CFC)

    enfantterrible-tijzQ7 Level 1

      I have several ColdFusion Components in a Flex Library Project which I would like to share with several Flex / FB projects. is there a practical way of being able to to this?


      Right now I includ the CFCs directory in the 'Flex Build Path/Additional source folders outside the main source folder' of each project, this is OK except that Flex puts the CFC's in the root directory of the debug folder which becomes a mess. Does anyone know of a better way of doing it, so that I can share my CFC components in a well organized way and maybe put them in a folder like 'cfc_components'.


      Any ideas, suggestions, or tips would be greatly apreciated!!!

        • 1. Re: Sharing ColdFusion Components (CFC)
          JeffryHouser Level 4

          You don't really "Share" CFCs with Flex.


          As long as the CFCs are web accessible--I assume using the remote attribute to each method--any Flex SWF served from the same domain as the CF Server can access them using RemoteObject, or via WebServices, or even via a HTTP Post.


          IF the SWF is on adifferent domain than the CF Server, you may need a crossdomain.xml file to access the CFCs.

          • 2. Re: Sharing ColdFusion Components (CFC)
            enfantterrible-tijzQ7 Level 1

            Thanks for the input and insight, it's very much apreciated!!!


            You're quite right that you don't really share CFC's, I misused the word. I was hoping that I could've kept the CFC's in a library project and Flex (Ecclipse) would've been able to create links as it seems to do if you include their directory in the source path, but keep them in the same folder they're in and put them under the src folder instead of the root directory which is what it seems to do. I was hoping I had missed something and be able to do what I wanted to do.


            The reason I was hoping to keep the CFC's in a library project is that eventually I want to shared them with others.


            What I've been doing is put the CFCs in a main project application and the other applications, which are sub-modules, compile to the main applicaton's debug folder. clunky... messy... perhaps but it's been doing the work.  Like I said I would like to find a way to shcare my CFC's without also sharing my main app's files.


            Again thanks for the input.