Flex:MXML“组件"和“组件"之间有什么区别?和 MXML“模块"? [英] Flex: What's the difference between an MXML "Component" and an MXML "Module"?

查看:25
本文介绍了Flex:MXML“组件"和“组件"之间有什么区别?和 MXML“模块"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如标题所暗示的,组件"(新建 –> MXML 组件)和模块"(新建 –> MXML 模块)之间有什么区别?

As the title suggests, what's the difference between a "Component" (New –> MXML Component) and a "Module" (New –> MXML Module)?

谢谢,大卫

推荐答案

模块被编译成 SWF 并在运行时使用 ModuleLoader 加载,而 MXML 组件被编译到应用程序中.来自 Flex 文档:

Modules are compiled into SWFs and loaded at runtime with ModuleLoader, whereas MXML components are compiled into an application. From the Flex docs:

模块是 SWF 文件,可以由应用程序加载和卸载.它们不能独立于应用程序,但任意数量应用程序可以共享模块.

Modules are SWF files that can be loaded and unloaded by an application. They cannot be run independently of an application, but any number of applications can share the modules.

模块让你拆分你的应用程序分成几个部分或模块.这主应用程序或外壳程序可以动态加载其他模块需要,在需要时.它确实不必加载所有模块启动,也不必加载任何模块,如果用户不交互跟他们.当申请没有不再需要一个模块,它可以卸载释放内存的模块和资源.[...]

Modules let you split your application into several pieces, or modules. The main application, or shell, can dynamically load other modules that it requires, when it needs them. It does not have to load all modules when it starts, nor does it have to load any modules if the user does not interact with them. When the application no longer needs a module, it can unload the module to free up memory and resources. [...]

模块类似于运行时共享图书馆 (RSL),因为它们分开从应用程序代码到单独加载的 SWF 文件.模块比 RSL 灵活得多因为模块可以被加载和在运行时卸载并编译没有应用程序.

Modules are similar to Runtime Shared Libraries (RSLs) in that they separate code from an application into separately loaded SWF files. Modules are much more flexible than RSLs because modules can be loaded and unloaded at run time and compiled without the application.

希望有帮助!

这篇关于Flex:MXML“组件"和“组件"之间有什么区别?和 MXML“模块"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆