There’s an old saying in the relational database world: on a long enough timeline, all fields become optional.
- Seven Databases in Seven Weeks
starwing83 发表于 2014-03-23 21:13
回复 32# OwnWaterloo
恩,这种感觉的确很好,选bluebird也是因为这个,github页直接就有和其他promise的比较,瞬间就好感了……
Promises A+ 2.0.2
Cancellation
Progression
Synchronous inspection
.bind
Complete parallel for C# 5.0 async and await
Collection methods such as All, any, some, settle, map, filter, reduce, spread, join, race...
Practical debugging solutions such as unhandled rejection reporting, typed catches, catching only what you expect and very long, relevant stack tra
starwing83 发表于 2014-03-23 21:11
回复 31# OwnWaterloo
说到这里问个问题:我在REST里面传一个token,然后服务器保有一份状态,然后REST的操作就改变这份状态,这不算传输过程中传递状态吧?其实我觉得传输就是传输,传输哪里会有状态,不明白,解释一下哈……
It doesn’t really matter which authentication mechanism I choose since I’m not actually implementing this service, but let’s say I go with the simplest choice: HTTP Basic authentication.
- RESTful Web Services
starwing83 发表于 2014-03-23 21:11
然后说说你提到的什么数据冗余性的事儿——我才不管呢,能工作就成,管你optional不optional,反正现在大部分的域都是optional,也没觉得有多不好,反正硬盘便宜。
starwing83 发表于 2014-03-23 21:11
我前段时间找了很多REST的文章看看——主要目的是看看这货是不是又是一个卖名词的,后来发现还是有点儿货的。什么状态转换都是装逼的,其实就是很简单的一件事儿:
1. 所有东西都有地址
2. 所有东西都支持共同的操作
A REST API should be entered with no prior knowledge beyond the initial URI (bookmark) and set of standardized media types that are appropriate for the intended audience (i.e., expected to be understood by any client that might use the API). From that point on, all application state transitions must be driven by client selection of server-provided choices that are present in the received representations or implied by the user’s manipulation of those representations. The transitions may be determined (or limited by) the client’s knowledge of media types and resource communication mechanisms, both of which may be improved on-the-fly (e.g., code-on-demand). [Failure here implies that out-of-band information is driving interaction instead of hypertext.]
starwing83 发表于 2014-03-24 02:28
那么按照你说的,我是不是可以这么理解S,所谓状态就是:资源的表示能提供访问更多操作的可能性?
也就是说,我不知道有多少用户,我GET /user,得到一个列表,这样我就能对我获取的用户进行操作了——因此状态(就有机会)改变了?不然我就只知道这一个接口,谈不上能改变状态。
这么说,S其实说的不是状态,而是【获取可以进行其他操作的必要信息】,是这个理解么
欢迎光临 Chinaunix (http://bbs.chinaunix.net/) | Powered by Discuz! X3.2 |