本文介绍了迁移到Flex 4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我们的代码基础上,迁移到Flex 4将会产生多大的影响?我们用Flex 3编写了大约40k LOC。我希望Flex SDK中没有发生重大变化,我们可以顺利地转换到Flex 4的新特性,同时最大限度地减少任何中断。从我读过的东西,Adobe正在开发一组名为Spark的新组件,但我希望我们现有的东西可以与新组件共存。

解决方案

Spark和MX组件可以在同一个应用程序中共存(甚至在同一个MXML文件中)。由于CSS命名空间现在被支持,所以CSS的工作方式有了一些变化,您将会遇到一个很小的迁移步骤。



在选择Spark和MX方面,Adobe建议保持已经使用MX组件的现有代码相同。没有必要立即做出一切的Spark。您可以根据需要进行增量更改。对于新的开发,你应该尽可能使用Spark。但是,Flex 4中的Spark组件与MX不会有100%的功能一致性,所以您可能会遇到一些需要暂时继续使用MX组件的情况。


How much of an impact will migrating to Flex 4 have on our code base? We have about 40k LOC written in Flex 3. I'm hoping that there are no breaking changes in the Flex SDK, and that we can smoothly transition to the new features of Flex 4 while minimizing any disruption. From what I've read Adobe is developing a new set of GUI components called 'Spark' but I'm hoping our existing stuff can co-exist with the new components.

解决方案

Spark and MX components can co-exist within the same application (and even within the same MXML files). There are some changes to how CSS works because CSS namespaces are now supported, and you will encounter a small migration step there.

In terms of choosing Spark versus MX, Adobe recommends keeping your existing code that already uses MX components the same. There's no need to make everything Spark immediately. You can make incremental changes as the need arises. For new development, you should use Spark when possible. However, the Spark components in Flex 4 will not have 100% feature-parity with MX, so you will likely encounter some situations where you need to continue MX components for the time being.

这篇关于迁移到Flex 4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-16 00:22