2 Replies Latest reply on Jul 8, 2009 1:17 AM by Jason Villmer

    Flex 3 > FB4 Migration Tip

    Jason Villmer Level 1

      Thanks to the help of several Adobe members I was able to successfully import a styled (.css) Flex 3 project into Flash Builder 4 and have it retain its aesthetic and functional attributes. I wanted to take a moment and share what I found with everyone, in case you may find yourself confronted with the same issues.

       

      1.First, to bring in my Flex 3 project to Flash Builder 4 I needed to add a single line in my .css file:

       

      @namespace "library://ns.adobe.com/flex/halo";

      2. Next I had to add an Additional Compiler Argument. (Properties > Flex Compiler > Additional compiler arguments):
      -theme=${flexlib}/themes/Halo/halo.swc
      Basically there were a number of aesthetic breaks due to FB 4 (and newer SDKs) using the Spark component set. To ensure you Flex 3 application looks the same with the .css style, you'll need to specify that the application uses the Halo theme as the foundation.
      I'm including a photo showing several aesthetic issues I had under Flash Builder 4 and the newer SDKs prior to this solution.
      All of these have been fixed. Thanks again to all those at Adobe for the great support.
      Jason Villmer
      www.lucid.it
        • 1. Re: Flex 3 > FB4 Migration Tip
          tinylion_uk Level 2

          Hi

           

          Glad to here it all went to plan.

           

          Was just the same here.

           

          After all the talk of things breaking it's good to hear a success story.

           

          I used a similar approach to this, rather than using the compiler argument I just grabbed the css file from the halo components and included that above my other style sheets includes at the top on main.mxml. Im not sure if this just gives exactly the same result in the end, but it defiantly worked for me.

           

          I know that almost all of the styles that were set by using the default.css (i think that was the file i used) and then overriding the values with subsequently included style may seem kind of redundant, but my thinking was, well at least when my custom style are being added they are working from the same base that they were expecting in sdk3.

           

          All in all our projects transition to sdk4 has been very smooth. This is a large project (it's an intranet application for a uk architects and bespoke joiners, and when complete will be used at just about every stage of their workflow. I was expecting a lot more pain during the conversion than we had)

           

          It's my opinion (and it's a very strong one) that the advantages of moving to sdk4 are more than worth the initial conversion.

           

          At present the application uses a mix of sdk3 and 4. And this mix is quite deep. As time goes by more and more has been changed to sdk4. It was my initial intention to get the project working as was, then continue to use new features as and when they were advantageous. What has happened though, is that having found new sections of the application written in sdk4 being so much better, easier to read, flexible, that we've started re-writing perfectly useable sections of the app over to sdk4. Trust me when I say we wouldn’t have done his extra work if there wasn't some pay off.

           

          Anyway, good to hear how things went for you

           

          Cheers

          glenn

          tinylion

          • 2. Re: Flex 3 > FB4 Migration Tip
            Jason Villmer Level 1

            Glenn,

             

            There is always the lure to immediately embrace the newest 

            technologies. I'd been considerably eager to see what Flash Builder 

            had to offer and it does, indeed, provide a broader landscape of 

            possibilities. After everything has been said and done I believe the 

            Flash Builder team should consider a Migration Assistant to help 

            transition Flex 3 projects to the Flash Builder 4 code architecture. 

            Upon importing a Flex 3 project the user could be asked if they would 

            like to formally convert the entire codebase into a native FB 4 

            project. It would then go through the document, possibly stopping 

            occasionally asking for approval to do something, and update all 

            relevant code so it becomes a true FB4 app. There could also be a list 

            provided after this conversion that specifically outlines all changes 

            made.

             

            I've been working in Flex for a number of months now. Prior to this I 

            was using the Flash IDE. Upon exploring Flex, the advantages were 

            clear and substantial. Flex is absolutely outstanding for both 

            designers and developers in my opinion. The issue, however, is that 

            Flex users should be, above all, anxious to migrate to Flash Builder 

            4, not worried. If a Flex 3 developer has finished a huge project 

            (like you and I apparently) in Flex 3 we shouldn't have to go through 

            all of our code trying to figure out what needs to be changed. There 

            should be something that helps developers do that automatically.

             

            Technology is relentlessly changing. Monthly, weekly, daily even. 

            That's great but for something like Flex, new versions shouldn't have 

            developers searching everywhere trying to find patchwork solutions.

             

            The folks over at the Flash Builder 4 team have been great assisting 

            both myself and the multitude of other users with their issues, so I'm 

            pretty confident things will unfold well.

             

            Jason Villmer

            www.lucid.it

            villmer@lucid.it