From: Kirk Haines Date: 2004-08-22T07:17:42+09:00 Subject: Re: Idea: Webshare On Sun, 22 Aug 2004 06:19:08 +0900, Patrick May wrote > P.S. About the only cgi design suggestion I see on ruby-talk > that I outright disagree with is Request / Response. > > I experimented with this in Narf, and I think it is a mistake. You > end up with two objects, with alot of shared implementation code, > that always go together, split apart for no practical reason. I > don't mind having Request / Response separated in the documentation, > but splitting it in the code just adds typing. When will you ever > want a request without the response? Martin Fowler has a name for > this refactoring, but I don't have his book. You know, this is one thing I definitely agree with. In Iowa, I have an Iowa::Request that encapsulates the request. However, it actually also encapsulates the response, and I've found it to be a very natural thing that the same object that brings the request into the app also carries the response back out of it. The Iowa::Request is modeled very closely on the mod_ruby Apache::Request, mostly because it seems like a good, effective, familiar model, and doing so helped me avoid reimplementing the wheel. Kirk Haines