Flex:MXML“组件”和MXML“模块”有什么区别?

前端之家收集整理的这篇文章主要介绍了Flex:MXML“组件”和MXML“模块”有什么区别?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
标题所示,“组件”(新 – > MXML组件)和“模块”(新 – > MXML模块)之间有什么区别?

谢谢,
大卫

解决方法

模块被编译成SWF并在运行时加载了ModuleLoader,而MXML组件被编译成一个应用程序.从Flex文档:

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. […]

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相关文章