3 Replies Latest reply on Aug 17, 2006 2:20 PM by peterent

    newbie question

    refugeo
      I want to use Flex - Cold Fusion implementation.

      What is the best location to install the Flex application?

      thx
        • 1. Re: newbie question
          peterent Level 2
          Install Flex Data Services separately from ColdFusion. Typical installations are:

          ColdFusion as standalone with FDS installed as J2EE application in another App Server (eg, JRun, Tomcat, etc.)
          -- can be on same machine or on different machines.

          ColdFusion in multi-server configuration (J2EE app in App Server) and FDS installed in same App server as a sibling J2EE app.
          -- can also be installed in separate App servers on same or different machines.

          Choose the one that best fits with your production system; it is helpful if your development environment mirrors your production environment, but it is not necessary. It just gets your head into thinking about the configuration and working with it right from the start.


          • 2. Re: newbie question
            refugeo Level 1
            I presently have:

            C:CFusionMX7-> wwwroot-> ALL COLD FUSION PROGRAMS

            I then serve these from various servers at different hosting companies.

            I know I will have to reconfigure various Flex files to use wizards. When I tried this previously using tutorial for Contact Manager I found I was having to flip all over my computer find folders and files...seemed illogical, or I was totally confused. I never did get configuration correct and now I must reload Flex and start over.

            Where is the most logical place to install Flex to use with cold fusion?

            Do I think of Flex using Cold Fusion as an addition to Flex application or,

            Cold Fusion application now using Flex to enhance it?

            Somwhat confused newbie
            • 3. Re: newbie question
              peterent Level 2
              Flex and ColdFusion are completely different things. Neither needs the other. Flex is your front-end and so it can communicate with CF using HTTP, WebServices, or RemoteObject data services. Using HTTP (sending requests, receiving responses such as XML) or WebServices (your CFCs can be invoked as WebServices, something CF automatically provides for you).

              RemoteObject is something different. Normally people need Flex Data Services to use RemoteObject because RemoteObject communicates using our AMF protocol to our FDS system. However, we also provide a means to use CFCs with RemoteObject using ColdFusion 7.0.2.

              Are you using Flex Data Services or were you just going to build a Flex SWF using the Flex 2 SDK or Flex Builder 2?

              If you are using FDS, just install it as I described above.

              If you aren't using FDS, then you install the Flex SDK or Flex Builder on your local computer. When you get your SWF, you deploy that to your web server or put it into your CF wwwroot and let CF serve the HTML page. Most people don't do that, they let their web server server the HTML and SWF.

              But here's the catch: the Flash Player is extremely security-minded. If you serve the SWF from the same domain as CF, then you are golden - no security problems. But if the Flash Player sees that it is going to connect to a different domain, then it demands that the other domain allow it access.

              This is done using a crossdomain.xml file (you can find its format in the Flex 2 documentation).

              Let's say you have a server for ColdFusion called fridge.com and so a CFC might be located at: http://www.fridge.com/testapp/getdata.cfc and you want to use that as a RemoteObject from a Flex application. But you are going to serve the HTML page and the SWF from myweb.com at: http://www.myweb.com/apps/MyFlex.html.

              When the SWF tries to connect to the CFC in fridge.com, it won't allow it unless it checks with fridge.com to see if that's OK. The Flash Player will request http://www.fridge.com/crossdomain.xml and look for www.myweb.com as being allowed to connect. If that is allowed, your Flex SWF can access the CFC.

              Hope all that helps.