0 Replies Latest reply on Jun 1, 2008 2:38 AM by bryn50

    Issues with Flex3 and CF8 on Windows Vista

    bryn50 Level 1
      Sorry for the whine, however I feel it necessary to get a few issues I've found with Flex3 on a Vista Laptop working with CF8 that I've not seen documented elsewhere.

      Environment:
      Sony Laptop with Intel Core 2 Duo processor and 3 GB Ram.
      Running CF 8 Standard Edition, along with mySQL 5.x and access to a SQL Server instance on another machine on the same local network.

      What I am trying to do:
      A) learn flex, my background is CF with over 8 years of experience along with Flash AS2 along the way.
      B) put together a hello world app.
      C) use the flex/cf application wizard to build a simple master/detail set of selection/edit screens for one table of a database that I used recently on a CF8 project. To see how much better the UI really is on Flex and whether I could use it to retro fit that old application to have a better UI using flex3.

      Issues.
      My mini-application is set up initially in the folder c:/inetpub/wwwroot/mydirectory, but it does not work.
      Reason is that when run, it cannot access the flex2gateway on the url that the wizard puts into the app. which is http://localhost/mydirectory/flex2gateway...
      Details:
      flex2gateway does not work on a subdirectory URL on the default web site.
      If I access http://localhost/flex2gateway/ I get a blank screen (as expected) meaning that the flex2gatweway is working.
      If I access http://localhost/mysubdirectory/flex2gateway/ I get a 404.0 error (not found)

      Now, I beleive this is supposed to work, something must be wrong with one of the xml file setups. But I cannot find any documentation for it.
      Initially the flex2gateway did not work at all. I did the web connector thing with CF batch file and that got it working, but only on the base directory, not the subdirectory.

      So, to get around this issue, Luckily Vista with IE7 allows more than one website.. I create a whole new website that is accessed using http://192.168.1.73:81/
      I set this website up in the folder c:/localhost/mydirectory.

      The flex project is called mydirectory
      So we come to issue 2.
      Given the above Issue number 1, I have further frustration because when the Flex/Cold Fusion Application wizard builds the various mxml files it insists on prefixing all of the remote object calls with 'mydirectory.'
      e.g "mydirectory.components.cfgenerated.mycfc"
      Now, given that the web root is also the base of the project, this will not work.
      What actually works is: "components.cfgenerated.mycfc"
      There seems to be no way I can configure the project when building it to get around this issue. The only way |I can fix this is to manually edit all the mxml files after the wizard is finished. I also have to doctor the project setup for similar reasons. It wants all of the urls to be:
      http://192.168.1.73:81/mydirectory/bin/main.html instead of
      http://192.168.1.73:81/bin/main.html

      So obviously the wizard is not set up to handle applications that are based right at the web root, even though this is the only place that the flex2gateway can work. <snafu I guess>

      Issue 3:
      I find that the flex/Cf application wizard is set up to build pages based upon a certain narrowly defined way of constructing the source database tables. In particular it wants every table to have its own unique numeric id for each row, and can't handle a string for the primary key and have the primary key editable as well.
      Seems inflexible if you ask me. The main problem is that the preconditions on the table structure that the wizard can work with are poorly defined and documented. You obviously had to go to the same school of database design and the same class as the Adobe developers to think in the same way.

      Given that this tool is supposed to be a help to new users of Flex and AS3 and it is supposed to be a productivity aid, perhaps I should not be surprised to have had to spend over a week getting to grips with the wizard and learning its tricks just to get it to build a mind numbingly simple mini app of my own that works when run. Sorry Adobe, but you get a F minus on your report card for this one, particularly on the really bad documentation. Just as bad for the coding complexity of the solution to seemingly simple application concept.

      Cheers,
      Bryn Parrott