Web service misc
来源:互联网 发布:淘宝刷流量 猎流 编辑:程序博客网 时间:2024/04/30 04:28
- If client invokes server in loop as follows, it will have bad performance.
Client:
foreach ()
{
invoke server
}
In order to improve performance, client should invoke serve once (get a collection of results) as follows, then client will handle these results in loop.
Client:
collection results = invoke server;
foreach (result in results)
{
handle result;
}
- WebMessageBodyStyle
比如:
xml:
Bare:
1: 请求消息主体:
2: <Employee xmlns="http://www.artech.com/"
3: xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
4: <Department>行政部</Department>
5: <Grade>G9</Grade>
6: <Id>003</Id>
7: <Name>王五</Name>
8: </Employee>
Wrapped:
1: 请求消息主体:
2: <Create xmlns="http://tempuri.org/">3: <employee xmlns:a="http://www.artech.com/"4: xmlns:i="http://www.w3.org/2001/XMLSchema-instance">5: <a:Department>行政部</a:Department>6: <a:Grade>G9</a:Grade>7: <a:Id>003</a:Id>8: <a:Name>王五</a:Name>9: </employee>10: </Create>
Json:
Bare:
1: 请求消息主体:
2: {"Department":"行政部","Grade":"G9","Id":"003","Name":"王五"}Wrapped:1: 请求消息主体:
2: {"employee":{"Department":"行政部","Grade":"G9","Id":"003","Name":"王五"}}
- If client has cache, it should get data from cache first; if not found, then get data from server again.
- Getting data from server and updating UI should process asynchronously.
- If client calling web service failed, you can copy url to browser to see what happens. (there will be some detailed information for failure.)
- Response status code: 1xx(information,不), 2xx (ok,好), 3xx(redirect,转), 4xx(client error,客), 5xx(server error,服)
- Web service misc
- ISCC2014--basic+web+misc
- jarvisoj WEB +MISC writeup
- Misc
- MISC
- Misc
- MISC
- MISC
- Misc
- Misc
- misc
- MISC
- MISC
- MISC
- Misc
- misc
- misc
- Misc
- 把从framebuffer抓出来的数据转换成jpg图像
- android学习笔记5 android按键事件处理代码走读[framework]
- C/C++关键字static,const,inline,define,typedef
- mysql中采用concat来拼接中文字符乱码解决方式
- android学习笔记6 eventhub
- Web service misc
- 关于自动化测试
- java参数传递
- ExtJS简单的动画效果
- PHP 对象与类的权限控制 案例
- js和java转码
- VC非ASCII语言复制到剪切板乱码问题
- 正则表达式30分钟入门教程
- MapReduc操作HBase