flex基本通信方式比较 及blazeDS、 LCDS比较
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) |
既然说到了收不收费,那就不得不说说他俩了:LCDS pk blazeDS
BlazeDS与LCDS功能上的区别
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
其实BlazeDS可以看成是LCDS的一个子集,而且是一个开源产品,在一般的项目中完全可以替代LCDS,现在有三个版本,其中Turnkey版内置了Tomcat和 Flex 3 SDK,还包含blazeds.war、ds-console.war和samples.war;Binary Distribution版只包括blazeds.war,此为最简配置;而Source则包含blazeds的Java源代码,如果想做二次开发就下载这个。
下图是Adobe官方的Blazeds与LCDS的对比
下图是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 | √ |
thanks: