Flex三种通信方式
表1-1
| 通信方式 | 通信协议 | 交互数据格式 |
| HttpService | 常用的http 协议 | XML |
| WebService | SOAP 协议 | XML |
| RemoteObject | Flex 自定义的高效二进制 数据通讯协议:AMF | 任意(可以是数字,字符串,对象,图片等等) |
这三种通信方式的比较如下:
表1-2
| 通信方式 | 优点 | 缺点 |
| HttpService | 数据格式通用,便于不同应用系统间交换数据 | 1. 数据在发送前需要转换成XML 格式,接收后要解析XML 数据。哪怕是只发送一个简单的的数字也要如此 2. 在处理复杂数据类型如图片,对象的时候,非常不方便 |
| WebService | 同上 | 同上 |
| RemoteObject | 能够处理各种类型的数据类型,速度快 | 需要专门的服务器端软件LCDS (FDS )或AmfPHP 。LCDS (FDS )是收费的,价格不菲(免费版本只能支持单CPU) |
BlazeDS是Opensource,也就是就免费让你使用,LCDS是Adobe需付费的方案,什么情況下会需要使用LCDS呢?
想清楚得知BlazeDS的Spec可以到这里http://opensource.adobe.com/wiki/display/blazeds/Features
而LCDS的功能列表可以从这里看,http://www.adobe.com/products/livecycle/dataservices/features.html
下图是Adobe官方的Blazeds与LCDS的对比
√ 代表此功能可用
| Features | BlazeDS | LCDS |
| Data management Services | ||
| Client-Server synchronization | √ | |
| Conflict resolution | √ | |
| Data paging | √ | |
| SQL adapter | √ | |
| Hibernate adapter | √ | |
| Document Services | ||
| LiveCycle remoting | √ | |
| RIA-to-PDF conversion | √ | |
| Enterprise-Class Flex application services | ||
| Data access/remoting | √ | √ |
| Proxy service | √ | √ |
| Automated testing support | √ | |
| Software clustering | √ | √ |
| Web tier compiler | √ | |
| Enterprise Integration | ||
| WSRP generation | √ | |
| Ajax data services | √ | √ |
| Flex-Ajax bridge | √ | √ |
| Runtime configuration | √ | √ |
| Open adapter architecture | √ | √ |
| JMS adapter | √ | √ |
| Server-side component framework integration | √ | √ |
| ColdFusion integration | √ | |
| Offline Application Support | ||
| Offline data cache | √ | |
| Local message queuing | √ | |
| Real - Time Data | ||
| Publish and Subscribe messaging | √ | √ |
| Real -time data quality of service | √ | |
| RTMP tunneling | √ |
本文详细介绍了Flex中的三种通信方式:HttpService、WebService及RemoteObject,对比了它们各自的优缺点,并深入探讨了RemoteObject所涉及的LCDS与BlazeDS的区别。
3389

被折叠的 条评论
为什么被折叠?



