Sending Messages
Last week, a lot of things sorta clicked together for me.
My key revelation is: It’s better to send a message asking for something to be done, than to explicitly invoke the functions yourself
.
The first step into reaching conclusion began when I was talking to Miguel on the T after watching Hide and Seek. He told me he’s been reading a bit into the permathread that is SOAP vs. REST. I remembered two things from that conversation, 1) Schema validation is used only at development time, there is no need to schema validate incoming messages in production, and 2) in a REST-like system, the URL pointing to the service is analogous to the monikers used in COM and Bonobo.
The first point provided a nice introduction to last week’s inter-blog discussion about truth in WS.
Which leads to the 2nd point.
Prof. Rasala has been teaching this class on Web Services since last year. When he was preparing for this class last year, I would go to his office every week and do a brain dump of the stuff I know about Web Services. Oftentimes, we will then have a pleasant discussion about what the XML Web Services vision is and how it works, etc.
Unlike me, Prof. Rasala first learned to use the XML Serialization before learning any of the APIs from System.Xml. While I shared the same enthusiasm when I first learned how to use XmlSerializer (Miguel will attest to that), I soon learned that XML Serialization has its limitations and eventually settled down on using XPath as my favorite way of traversal XML documents. I got especially keen on XPath once I realized that XPath can be implemented on top of different storage mechanisms. Since then, I’ve been trying to convert Prof. Rasala to the XPath camp. I think I succeeded last week.
Similar to how monikers condenses a set of method calls into a single string, XPath does a similar thing with XML infosets. In the contest of Web Services, while everything already works in this fashion, using URL+query strings is a lot more economical and copy-n-pasteable than blobs of XML in a SOAP envelope with various WS-Addressing headers. The last is basically what Miguel pointed out on the T.
Most of this maps pretty close to how Smalltalk works already, but after reading Don’s entry on Indigo, I’m curious to see if there’s an extensibility mechanism (other than the wonder doesNotUnderstand:
) which will allow me to have direct control over the mapping of selectors to methods. In Indigo-speak, I’m searching for the equivalent to:
void ProcessMessage (Message m);
duncanmak: Sending Messages:
[...] duncan mak (duncanmak) wrote,@ 2005-02-19 21:50:00 Sending Messages Last week, a lot of things sorta clicked together for me.My key revelation is: It’s better to send a message asking for something to be done, than to explicitly invoke the functions yourself.The first step into reaching conclusion began when I was talking to Miguel on the T after watching Hide and Seek. He told me he’s been reading a bit into the permathread that is SOAP vs. REST. I remembered two things from that conversation, 1) Schema validation is used only at development time, there is no need to schema validate incoming messages in production, and 2) in a REST-like system, the URL pointing to the service is analogous to the monikers used in COM and Bonobo.The first point provided a nice introduction to last week’s inter-blog discussion about truth in WS. Which leads to the 2nd point.Prof. Rasala has been teaching this class on Web Services since last year. When he was preparing for this class last year, I would go to his office every week and do a brain dump of the stuff I know about Web Services. Oftentimes, we will then have a pleasant discussion about what the XML Web Services vision is and how it works, etc.Unlike me, Prof. Rasala first learned to use the XML Serialization before learning any of the APIs from System.Xml. While I shared the same enthusiasm when I first learned how to use XmlSerializer (Miguel will attest to that), I soon learned that XML Serialization has its limitations and eventually settled down on using XPath as my favorite way of traversal XML documents. I got especially keen on XPath once I realized that XPath can be implemented on top of different storage mechanisms. Since then, I’ve been trying to convert Prof. Rasala to the XPath camp. I think I succeeded last week.Similar to how monikers condenses a set of method calls into a single string, XPath does a similar thing with XML infosets. In the contest of Web Services, while everything already works in this fashion, using URL+query strings is a lot more economical and copy-n-pasteable than blobs of XML in a SOAP envelope with various WS-Addressing headers. The last is basically what Miguel pointed out on the T.Most of this maps pretty close to how Smalltalk works already, but after reading Don’s entry on Indigo, I’m curious to see if there’s an extensibility mechanism (other than the wonder doesNotUnderstand:) which will allow me to have direct control over the mapping of selectors to methods. In Indigo-speak, I’m searching for the equivalent to: void ProcessMessage (Message m);View this post on my blog(Post a new comment) Log in now.(Create account, or use OpenID) [...]
6 September 2006, 4:19 pm