1 Reply Latest reply on Apr 8, 2008 9:32 AM by Gregory Lafrance

    run-time app initialization?

      We have a fairly complex Flash application which I want to migrate to Flex. Its a real-time trading system consisting of a couple of hundred classes. It is Flex-like in many ways... there is nothing on the stage apart from the Main() class, the library is nothing but components, almost all graphics skins are programatically generated, we have always used an event dispatching architecture, MVC and a layered approach to comms classes, which means the design will translate well to Flex. One of the nice things about it is the entire screen layout is defined through XML, much like MXML.. Our screen building class goes through the XML and instantiates all the classes it finds using the settings we define through the XML. This means we can generate various versions of the application, including localised, simply by getting the web team to edit XML files. At runtime we pass a parameter to the app allowing it to select the correct XML files and paint itself accordingly.

      So to Flex... as I understand it, if we wanted to be able to get initialization values at run time, we'd have to use the Flex server, which generates the swf from the MXML and AS files on the fly? (There may be resistance in the company to introducing another technology on our servers, we have many servers in several datacentres.) As far as I can see, the other choice is every time a minor change is made in the XML, in terms of colours, sizes, positions, etc, the app would have to be recompiled in Flex?

      We would have to have a very simple MXML file which just kicked off our screenbuilding class which would then read the XML and instantiate classes, exactly how our current Flash app works. Or is there a better way? It would feel a bit like re-inventing the wheel. It would be great to know how others have approached this issue.