混合隐喻并使事情变得过于复杂(REST和SOAP)

Folks keep trying to push metaphors (or similes, like, depending on how you say it) a smidge too far. Steve Maine had some words for Mark Baker. That said:

人们一直试图将隐喻(或类似的词,取决于您的称呼)推得太远。 史蒂夫·缅因(Steve Maine )对马克·贝克( Mark Ba​​ker)说了些话。 说:

Patrick and I sat down to talk about this:

帕特里克和我坐下来谈论这个:

  • REST:

    REST :

    • I write a letter, a document even, and it has no address on it and doesn't even say "Dear Patrick."

      我什至写了一封信,甚至一个文件,上面没有地址,甚至没有说“亲爱的帕特里克” 。

    • I tell the Postman, remembering that I'm only able to tell him two things, GET and POST, to take this letter to my friend Patrick.

      我告诉邮递员,记得我只能告诉他两件事,即GET和POST,以便将此信带给我的朋友Patrick。
      • POST /patrick.aspx HTTP/1.0

        POST /patrick.aspx HTTP / 1.0
    • If the Postman puts the document (not a message, considering that he's the only one who knows where it's going) down on the seat, in order to Store and Foward this message - is it a letter? No, it's a document with no destination.

      如果邮递员将文件(不是消息,考虑到他是唯一知道消息的去向的消息)放在座位上,以便存储和转发此消息-这是一封信吗? 不,这是没有目的地的文档。
    • REST doesn't cover this. The address is out of band.  It's not on the "envelope" as there IS NO ENVELOPE.  Trying to say that the HTTP Headers are a Poor Man's Envelope succeed only in describing a very poor man.

      REST并不涵盖这一点。 地址带外。 它不在“信封”上,因为没有信封。 试图说HTTP标头是穷人的信封,只能描述一个很穷的人。

  • SOAP

    肥皂
    • I write a letter, a document even, and it has no address on it and doesn't even say "Dear Patrick."

      我什至写了一封信,甚至一个文件,上面没有地址,甚至没有说“亲爱的帕特里克” 。

    • I put it in an envelope (also, a folded piece of paper, except this one has glue on it in certain places and a licky part) and put ATTN: Patrick (WS-Addressing) on the outside with some wax seals (WS-Security) and a Notary Public Stamp (WS-Trust).

      我将其放在信封中(也可以是一张折叠的纸,除了这张纸在某些地方和上面有胶水的部分上有胶水),然后将ATTN:Patrick(WS-Addressing)放在外面,并用一些蜡封(WS-安全性)和公证人公章(WS-Trust)。
    • If the Postman puts the document on his seat, the document (now a bona fide message) could be delivered by a substitute Postman.

      如果邮递员将文件放在座位上,则该文件(现在是真实的消息)可以由替代邮递员发送。
    • Thus, SOAP adds, gasp, value by simply formalizing addressing, containment, and with WS*.*, security and trust.

      因此,SOAP通过简单地形式化寻址,包含以及使用WS *。*来确保安全性和信任,从而增添了价值。
    • And, it's transport independent. The Postman is free to use a Mule or a Segway.

      而且,它是独立于运输的。 邮递员可以自由使用a子或赛格威。

How anyone can argue about this is beyond Patrick and I.

任何人都可以对此争论,这超出了我和帕特里克。

REST is interesting, and when simplicity is called for, knock yourself out.  But seriously, I can see why some may call them RESTafarians because more often than not "Hay now, Mista Postman, tak dis letta to mwa bwoy Patrix. Eim dwon undastan SOAP." doesn't cut it if you really want your letter to arrive.

REST很有趣,当需要简化时,请放手一搏。 但是说真的,我能理解为什么有些人称他们为RESTafarians,因为更多的是“现在干草,Mista Postman,tak disletta到Patrix。Eimdwon undastan SOAP。 ”到达。

翻译自: https://www.hanselman.com/blog/mixing-metaphors-and-making-things-too-complex-rest-and-soap


本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!

相关文章

立即
投稿

微信公众账号

微信扫一扫加关注

返回
顶部