Chatty vs. Chunky: A Developers' Guide
More and more, developers in online forums and at events are asking for more info on the "Chatty versus Chunky" concept, coined by Jonathan Hawkins and Emmanuel Schanzer of Microsoft to describe an efficient 3-tier application design (web with to/from connections to legacy systems). Check IDN's Quick Study of technical sources.
More and more, developers in online forums and at events are asking for more info on the concept of "Chatty versus Chunky," coined by Jonathan Hawkins and Emmanuel Schanzer of Microsoft to describe an efficient 3-tier application design (web with to/from connections to stateful legacy systems).
IDN provides this Quick Study list of some top technical sources on the topic to provide insight, tempaltes and sample code.
- A web services developer poses the following question at a Dotnet247 newsgroup: I have seen the phrase "Chunky instead of Chatty" for designing 3-tier applications, but I'm just not "getting it." Does this mean that I don't use properties directly to avoid network traffic? Can someone give me an example or a URL to an example of what the difference is and how to design 3-tier correctly from an implementation standpoint? Check out the answer, with code samples at Dotnet247.
- O'Reilly author Alex Ferrara, in his article, Top Five ASP.NET Web Services Tips, provides an in-depth discussion of chatty vs. chunky with code samples for developers looking to build a flexible web service. In his examples, Ferrara examines a "login" function using both chatty and chunky. He finds that for chatty, username and password are designed as properties that must first be set before calling the logon() method. For chunky, the logon() method can include username and password as part of the method signature, cutting the number of calls to the server. (He also shows how developers can model input parameters to cope with a larger number of them.)
- Intertech presents a discussion of "chatty vs. chunky,"a principle that applies to distributed programming for a variety of platforms, including but not restricted to Microsoft .NET. In this segment, a code sample is analyzed to distinguish this approach from other object-oriented traditions. http://www.intertech-inc.com/DOWNLOADS/edeveloper/ed062602.pdf
- Microsoft's Scott Seely, author of SOAP: Cross Platform Web Service Development Using XML (Prentice Hall) provides guidance at MSDN on how to build "chunky calls" for WSDLs. Seely shares his key for building a successful web service: First, he says, "I look at what functionality I need to support, and then derive the necessary data types from the operations I'll be exposing." That means: Do a good job separating the data, binding and endpoint information. Seely takes the developer through an online retail web service example, showing how to parse that into four basic functions: GetSearchValue; Search; PlaceOrder; and TrackOrder. Lots of code and lots of good insight. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnservice/html/service02062002.asp.
- Matthew MacDonald, coauthor of Programming .NET Web Services (O'Reilly) says that while many developers are familiar with "chatty" interfaces, those techniques may not be suitable for many web service applications that require state to be maintained. "It's easy to forget," MacDonald says, "that web service communication takes, comparatively speaking, a long time -- thousands of times longer than a comparable in-process method invocation." For this reason, using a "chatty" interface won't often be practical for applications that require multiple method calls for a single task or rely on property procedures. More good advice and code samples to copy here. <