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

问题描述

迁移到 Flex 4 会对我们的代码库产生多大影响?我们有大约 40k LOC 用 Flex 3 编写.我希望 Flex SDK 中没有重大更改,并且我们可以顺利过渡到 Flex 4 的新功能,同时最大限度地减少任何中断.据我所知,Adobe 正在开发一组名为Spark"的新 GUI 组件,但我希望我们现有的东西可以与新组件共存.

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 和 MX 组件可以共存于同一个应用程序中(甚至同一个 MXML 文件中).由于现在支持 CSS 命名空间,因此 CSS 的工作方式发生了一些变化,您将在那里遇到一个小的迁移步骤.

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.

就选择 Spark 还是 MX 而言,Adobe 建议保持已经使用 MX 组件的现有代码相同.没有必要立即让所有东西都变成 Spark.您可以根据需要进行增量更改.对于新的开发,您应该尽可能使用 Spark.但是,Flex 4 中的 Spark 组件不会与 MX 具有 100% 的功能对等,因此您可能会遇到一些需要暂时继续使用 MX 组件的情况.

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