Any Flex 4 migration experience?

前端 未结 2 1640
傲寒
傲寒 2020-12-13 16:06

My current development stack is MySQL + iBatis + Spring + Spring BlazeDS Integration 1.01 + BlazeDS 3.2 and Flex 3 with Mate 0.8.9 framework. Now Flash Builder 4 beta 2 is

2条回答
  •  余生分开走
    2020-12-13 16:29

    I can't tell you anything about migrating your third-party components. I don't use the ones you've mentioned.

    I can tell you, however, that you won't be able to simply load your existing project up into Flash Builder 4, change the SDK to 4.0, and expect it to recompile. A huge number of things have changed in Flex 4, often incompatibly.

    Here are the ones I've run into so far:

    • You now have two parallel component libraries, Spark and MX. MX is the old Flex 3 component library, sometimes called Halo, though that's technically just the name of the default skin. Spark is the new Flex 4 component library, which only partially replaces MX.

      They do interoperate. You're allowed to use both in a single app, and you can do things like put Spark components in MX layout containers like ViewStack. There are also natural divisions in an application where it's possible to have one side using Spark, the other MX, with no worry about trouble because they don't interoperate at a GUI level. Dialog boxes are like that, for instance.

      The reason they did all this is to support this new skinning stuff you've been hearing about: Flash Catalyst, FXG, and all that. If you use the stock Halo skin, I don't see that Spark matters to you, other than the fact that it's The Future.

      (Aside: What's the Markdown syntax to get the Wizard-of-Oz boomy echo effect?)

      Joan Lafferty (Flex SDK Quality Lead) has a valuable article, Differences between Flex 3 and Flex 4. On page 4, she has a table listing the Flex 3 MX components that have not been replaced by Spark components in Flex 4. Most of these have no appearance of their own, like Accordion, so you don't need to skin them, or are things like dialog boxes, like Alert. (You should read through the rest of that article. It covers things I don't, because I haven't run into all of the differences yet.)

    • Speaking of skins, only two of the MX skins from Flex 3 are still supported in Flex 4. The more colorful MX skins are gone, though there is a new set of colorful Spark-based skins that show off some of the things you can do with FXG and such. If you really liked one of the ones they removed, you can doubtless recreate them atop Spark, but it's not available out of the box.

    • Many things have been renamed, and some Spark replacements for MX components have different interfaces and so have different names. For instance, to move entirely to Spark, you'll have to change your VBoxes to VGroups. There are lots of annoying little differences like that.

    • Because of the whole dual GUI library thing, Adobe found themselves with a bunch of MXML tags like

提交回复
热议问题