2 Ajax 框架性能及开发效率对比
A 、数据流量
Demo 中的四个 Sample 都实现了针对 Product 的简单 CRUD 功能。这里我们使用 Fiddler HTTP Debugger 来测试整个操作过程中 Client 和 Server 交互的数据量。
加载 Product List :
|
请求 URL |
数据流量 |
说明 |
|
Prototype |
|
PrototypeServerResponse.aspx
?action=listProduct |
Request Count: 1
Bytes Sent: 380
Bytes Received: 2,150 |
获取 Product 列表,以 JSON 的格式返回,客户端使用 Javascript 脚本处理呈现。 |
|
Ajax.NET Pro ( Second ) |
|
ajaxpro/AjaxProDemoSecond,
App_Web_qgwv3twq.ashx |
Request Count: 1
Bytes Sent: 493
Bytes Received: 1,392 |
获取 Product 列表,以 HTML 的格式返回,客户端直接呈现。 |
|
Atlas |
|
AtlasDemo.aspx |
Request Count: 1
Bytes Sent: 827
Bytes Received: 6,391 |
获取 Product 列表, Server 完成 DataGrid 数据源绑定呈现。 |
删除 Product :
|
请求 |
数据流量 |
说明 |
|
Prototype |
|
PrototypeServerResponse.aspx
?action=deleteProduct&productId=1 |
Request Count: 1
Bytes Sent: 446
Bytes Received: 1,891 |
传送 ProductId ,完成删除操作,并获取 Product 列表到 Client 端呈现。 |
|
Ajax.NET Pro ( Second ) |
|
ajaxpro/AjaxProDemoSecond,
App_Web_qgwv3twq.ashx |
Request Count: 1
Bytes Sent: 504
Bytes Received: 1,300 |
调用远程 RPC 接口,完成删除操作,并获取 Product 列表的 HTML 在 Client 端呈现。 |
|
Atlas |
|
AtlasDemo.aspx |
Request Count: 1
Bytes Sent: 2,287
Bytes Received: 5,913 |
触发 Server 端的 Action 事件,完成删除操作,需要 Postback 整个页面。 |