Adobe Air(Flex 或 Html)应用程序架构
我没有使用 Adobe Air/Flex 的经验,想知道开发 Adobe Air/Flex 应用程序是否有一些原则(设计模式)? 谢谢。
I have no experience with Adobe Air/Flex and want to know, are there some principles (design patterns) for developing Adobe Air/Flex applications?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Flex 应用程序通常使用 MVC 框架开发。这些框架基于最佳实践和设计模式构建,并确定 Flex 应用程序的(微观)架构。有很多可用于 Flex 的 MVC 框架,请参阅此讨论进行比较:
Flex MVC 框架
Flex applications are normally developed using an MVC framework. These frameworks are built on best practices and design patters and determine the (micro) architecture of your Flex app. There are plenty of MVC frameworks available for Flex, see this discussion for a comparison:
Flex MVC Frameworks
不,没有硬性代码规则。正如如果 J2EE 变得过于庞大和复杂,您会考虑使用框架一样,Flex 也会出现类似的情况。如果您确信应用程序大小在您的限制范围内,请不要使用任何框架。
但是,如果您想使用框架,有多种选择,其中最好的是 Parsley、Cairngorm 2.0、Swiz、PureMVC。但是,您应该使用哪个框架取决于您的应用程序。如果您想开发一个企业应用程序,您需要时不时地访问数据服务来获取数据,请使用 Parsley 或 Cairngorm 2.0,但如果我是您,我会更喜欢使用 Parsley。
不过,您需要注意的一件重要事情是 Flex 的性能。类似的事情也适用于 AIR。
No, there are no hard code rules. Just as, if a J2EE becomes too huge and complex you consider using a framework, similarly it will be the case for Flex. If you feel confident that your application size will be within your limits, don't use any framework.
If however, you want to use a framework, there are various choices with some of the best being, Parsley, Cairngorm 2.0, Swiz, PureMVC. However, which framework you should use depends upon your application. If you want to develop an Enterprise app, where you are hitting dataservices to fetch data now and then, use Parsley or Cairngorm 2.0, though if I were you I would prefer to use Parsley.
One important thing you need to take care of though is performance in Flex. Similar things apply to AIR as well.