<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>cfis : Rails' Unusual Architecture</title>
    <link>http://cfis.savagexi.com</link>
    <atom:link rel="self" type="application/rss+xml" href="http://cfis.savagexi.com/2007/09/05/rails-unusual-architecture?format=rss"/>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Charlie Savage's Blog</description>
    <item>
      <title>Comment on Rails' Unusual Architecture by Jim Cropcho</title>
      <description>&lt;p&gt;Oh, so &lt;em&gt;that&amp;#8217;s&lt;/em&gt; how the hell Rails works.   It really is an interesting implementation, caveats and all. Great post!&lt;/p&gt;</description>
      <pubDate>Wed, 05 Sep 2007 07:14:13 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:6bdbb44f-574b-44c1-b9d3-b26186b26813</guid>
      <link>http://cfis.savagexi.com/2007/09/05/rails-unusual-architecture#comment-4387</link>
    </item>
    <item>
      <title>Comment on Rails' Unusual Architecture by Jeff</title>
      <description>&lt;p&gt;Great post.  Can I ask a question?&lt;/p&gt;

&lt;p&gt;Why do they do this:&lt;/p&gt;

&lt;pre&gt;ActionController::Base.class_eval do
  include ActionController::SessionManagement
end
&lt;/pre&gt;


&lt;p&gt;instead of simply re-opening the class?&lt;/p&gt;

&lt;pre&gt;class ActionController::Base
  include ActionController::SessionManagement
end
&lt;/pre&gt;


&lt;p&gt;Is there a difference or is it just a question of style?&lt;/p&gt;</description>
      <pubDate>Wed, 05 Sep 2007 08:32:53 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:7aabe277-d8e6-4504-8089-723fb3b5cac4</guid>
      <link>http://cfis.savagexi.com/2007/09/05/rails-unusual-architecture#comment-4388</link>
    </item>
    <item>
      <title>Comment on Rails' Unusual Architecture by Peter Williams</title>
      <description>&lt;p&gt;To be fair I think it is a bit stretch to say that the architecture of
SIAS was a chain of responsibility.  We were certainly influenced by
that pattern but in practice it turned out to be extremely difficult
(to the point of impossibility) to make a pure chain of responsibility
work as the basis for a web application framework.&lt;/p&gt;

&lt;p&gt;If you are looking for a pattern to base a web application framework
on I think decorator would be a &lt;em&gt;much&lt;/em&gt; better choice.  In fact, not
that I think about it that is the pattern you are describing, not
chain of responsibility.&lt;/p&gt;</description>
      <pubDate>Wed, 05 Sep 2007 08:40:48 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:6401a57a-2350-4b1b-9f95-61feeb5141fa</guid>
      <link>http://cfis.savagexi.com/2007/09/05/rails-unusual-architecture#comment-4389</link>
    </item>
    <item>
      <title>Comment on Rails' Unusual Architecture by choonkeat</title>
      <description>&lt;p&gt;@jeff: Thanks for asking. It made me wonder.. I went searching, and the best answer I found is at &lt;a href="http://r1.sharedcopy.com/k8lgi#shcp1" rel="nofollow"&gt;http://r1.sharedcopy.com/k8lgi#shcp1&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 05 Sep 2007 10:08:27 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:744196d1-de74-4449-9cb7-3f6e08b045e7</guid>
      <link>http://cfis.savagexi.com/2007/09/05/rails-unusual-architecture#comment-4390</link>
    </item>
    <item>
      <title>Comment on Rails' Unusual Architecture by Jacob</title>
      <description>&lt;p&gt;the problem with re-opening a class is that is may not have been loaded yet.
If this happens:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;class ActionController::Base
  include ActionController::SessionManagement
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and ActionController::Base is not already defined then a new class will be defined and the logic that runs on self.included may run and not find a process method for &lt;code&gt;alias_method_chain&lt;/code&gt; to work on. (in which case you&amp;#8217;d get an exception)&lt;/p&gt;

&lt;p&gt;Whereas if you do:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ActionController::Base.class_eval do
  include ActionController::SessionManagement
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You are asserting that ActionController::Base is already defined before you open it. (if it&amp;#8217;s not, rails const_missing will find and load it)  Thus forcing it to be fully loaded before you go and change it.&lt;/p&gt;</description>
      <pubDate>Wed, 05 Sep 2007 10:25:52 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:177d4b07-f29b-454c-b0f2-906be91b3b19</guid>
      <link>http://cfis.savagexi.com/2007/09/05/rails-unusual-architecture#comment-4391</link>
    </item>
    <item>
      <title>Comment on Rails' Unusual Architecture by James Britt</title>
      <description>&lt;p&gt;Could you explain how Java manages to support AOP, yet Ruby does not?&lt;/p&gt;</description>
      <pubDate>Wed, 05 Sep 2007 11:16:46 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:20e1fd07-1342-44a9-a5d8-e87cecd573d0</guid>
      <link>http://cfis.savagexi.com/2007/09/05/rails-unusual-architecture#comment-4392</link>
    </item>
    <item>
      <title>Comment on Rails' Unusual Architecture by Alan Shutko</title>
      <description>&lt;p&gt;There&amp;#8217;s been a lot of tricky work done on Java to make it support it.  The original AOP work had a precompiler you needed to turn your source into Java source.  Spring has a more limited form of AOP built in which relies on dynamic proxies (or building proxy byte code at runtime with cglib).  It&amp;#8217;s hidden from the user, but requires a lot of work behind the scenes, and you have some strange situations where it doesn&amp;#8217;t work as you&amp;#8217;d necessarily expect (like when an method calls another method on the same object).&lt;/p&gt;

&lt;p&gt;It seems to me that Ruby&amp;#8217;s made it easy enough to modify behavior that nobody has needed to build out the machinery for &amp;#8220;full&amp;#8221; AOP.&lt;/p&gt;</description>
      <pubDate>Wed, 05 Sep 2007 15:26:34 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:3079ad9f-9be8-45c8-ac26-b642443e1813</guid>
      <link>http://cfis.savagexi.com/2007/09/05/rails-unusual-architecture#comment-4393</link>
    </item>
    <item>
      <title>Comment on Rails' Unusual Architecture by Ezra</title>
      <description>&lt;p&gt;alias_method_chain is evil. Not only does it make it very hard to extend a feature that has already been aliased but it just adds additional method call overhead(which is expensive in MRI) and it deepens the stack for no beneficial reason.&lt;/p&gt;

&lt;p&gt;Down with alias_method_chain!&lt;/p&gt;</description>
      <pubDate>Wed, 05 Sep 2007 15:43:33 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:700dd0b4-9758-4988-89ad-e6bd5d4b6172</guid>
      <link>http://cfis.savagexi.com/2007/09/05/rails-unusual-architecture#comment-4394</link>
    </item>
    <item>
      <title>Comment on Rails' Unusual Architecture by charlie</title>
      <description>&lt;p&gt;Peter,&lt;/p&gt;

&lt;p&gt;Here is the &lt;a href="http://dofactory.com/Patterns/Diagrams/decorator.gif" rel="nofollow"&gt;Decorator&lt;/a&gt; pattern.&lt;/p&gt;

&lt;p&gt;I have to admit I don&amp;#8217;t see much difference between the two patterns.  Why do you think it is so much better?&lt;/p&gt;</description>
      <pubDate>Wed, 05 Sep 2007 17:15:20 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:f4e5d503-bd8a-4a56-a1ef-31de61a62ca0</guid>
      <link>http://cfis.savagexi.com/2007/09/05/rails-unusual-architecture#comment-4395</link>
    </item>
    <item>
      <title>Comment on Rails' Unusual Architecture by charlie</title>
      <description>&lt;p&gt;James - Its done by modifying Java byte code - see &lt;a href="http://www.eclipse.org/aspectj/doc/released/progguide/implementation.html" rel="nofollow"&gt;http://www.eclipse.org/aspectj/doc/released/progguide/implementation.html&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Alan - Thanks for the info about AOP and Java.&lt;/p&gt;

&lt;p&gt;There has been some work on adding more AOP features to ruby - including an &lt;a href="http://rcrchive.net/rcrs/1" rel="nofollow"&gt;RCR&lt;/a&gt;, &lt;a href="http://aspectr.sourceforge.net/" rel="nofollow"&gt;AspectR&lt;/a&gt; and &lt;a href="http://aquarium.rubyforge.org/" rel="nofollow"&gt;Aquarium&lt;/a&gt;.&lt;br /&gt;
&lt;/p&gt;</description>
      <pubDate>Wed, 05 Sep 2007 18:10:06 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:a3aa31fa-e70e-4ac8-8fdf-0eb186a522c0</guid>
      <link>http://cfis.savagexi.com/2007/09/05/rails-unusual-architecture#comment-4396</link>
    </item>
    <item>
      <title>Comment on Rails' Unusual Architecture by charlie</title>
      <description>&lt;p&gt;Choonkeat - Nice link, thanks!&lt;/p&gt;</description>
      <pubDate>Wed, 05 Sep 2007 18:11:52 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:7dc6abdc-0257-4607-b564-32508dc7ccd1</guid>
      <link>http://cfis.savagexi.com/2007/09/05/rails-unusual-architecture#comment-4397</link>
    </item>
    <item>
      <title>Comment on Rails' Unusual Architecture by Peter Williams</title>
      <description>&lt;p&gt;The main difference between the chain of responsibility and a
decorator patterns are the end point.&lt;br /&gt;
&lt;/p&gt;

&lt;p&gt;In a pure chain of responsibility the first thing that was able to
handle the request would do so and the rest of the chain would not be
executed at all.&lt;/p&gt;

&lt;p&gt;In a pipe and filter pattern, which is structurally very similar to a
chain of responsibility, the entire chain would be execute with each
step doing one thing and then passing the request/response on to the
next filter.  So the request starts at the first element of the chain,
and ends at the last element.  Control never returns to a step after
it has been executed.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;(req/resp) -&amp;gt; init_session -&amp;gt; controller_action -&amp;gt; (req/resp)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In a decorator pattern each step wraps the steps below it.  So
handling a request would start at the top decorator and it would
finish when that method returned.  The decorator pattern is a more
direct match to the way &lt;code&gt;alias_method_chain&lt;/code&gt; works in that you can do
work before and/or after, or even modify the results of, the step
below you.&lt;/p&gt;</description>
      <pubDate>Wed, 05 Sep 2007 20:18:37 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:d4ae5b22-be2e-4ce5-a6e8-3da2e692d9a6</guid>
      <link>http://cfis.savagexi.com/2007/09/05/rails-unusual-architecture#comment-4398</link>
    </item>
    <item>
      <title>Comment on Rails' Unusual Architecture by charlie</title>
      <description>&lt;p&gt;Hi Peter,&lt;/p&gt;

&lt;p&gt;Ah.  Just reread the Gang of Four:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;The first object in the chain receives the request and either handles it or forwards it to the next candidate on the chain, which does likewise.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;So yup, its the decorator pattern.  Although Chain of Responsibility sounds so much better.&lt;/p&gt;</description>
      <pubDate>Wed, 05 Sep 2007 20:42:34 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:6a1d390c-9fb2-4765-94f0-0bfcbd694747</guid>
      <link>http://cfis.savagexi.com/2007/09/05/rails-unusual-architecture#comment-4399</link>
    </item>
    <item>
      <title>Comment on Rails' Unusual Architecture by Justin George</title>
      <description>&lt;p&gt;It&amp;#8217;s funny you should reference design patterns with regard to ruby. There was an interesting article pointing out that most of them (iirc all but 3) were hacks to get around things that modern languages should have by default.&lt;/p&gt;

&lt;p&gt;Ruby does, in fact, have those defaults (well, if you consider blocks and lambda to be fully first class functions), and thus talking about it is probably not the time to be citing GoF as gospel.&lt;/p&gt;</description>
      <pubDate>Thu, 06 Sep 2007 00:07:02 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:6d375806-853b-4b21-bfa3-672e02b6333d</guid>
      <link>http://cfis.savagexi.com/2007/09/05/rails-unusual-architecture#comment-4400</link>
    </item>
    <item>
      <title>Comment on Rails' Unusual Architecture by Dean Wampler</title>
      <description>&lt;p&gt;Great post!&lt;/p&gt;

&lt;p&gt;FWIW, &lt;a href="http://aquarium.rubyforge.org" rel="nofollow"&gt;Aquarium&lt;/a&gt; effectively uses the Decorator pattern to chain &amp;#8220;advice&amp;#8221; calls. There is a type of advice called &amp;#8220;around&amp;#8221; advice (in addition to the more intuitive &amp;#8220;before&amp;#8221; and &amp;#8220;around&amp;#8221; advice&amp;#8230;), where you wrap a method call and you must explicitly invoke the wrapped method. If you don&amp;#8217;t, then it behaves like Chain of Responsibility ;)&lt;/p&gt;

&lt;p&gt;Aquarium doesn&amp;#8217;t yet provide a way to insert advice between already chained advices, but the pieces are there already. Another thing you would like to do (which AspectJ provides) is the ability to prioritize execution of advices acting on the same method. For example, maybe authentication should always be first!&lt;/p&gt;</description>
      <pubDate>Thu, 06 Sep 2007 08:00:10 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:4d37debf-90ab-478f-a95c-d5103f809f3c</guid>
      <link>http://cfis.savagexi.com/2007/09/05/rails-unusual-architecture#comment-4402</link>
    </item>
    <item>
      <title>Comment on Rails' Unusual Architecture by Dean Wampler</title>
      <description>&lt;p&gt;Uh, I meant &amp;#8220;before&amp;#8221; and &amp;#8220;after&amp;#8221; advice&amp;#8230;&lt;/p&gt;</description>
      <pubDate>Thu, 06 Sep 2007 08:38:19 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:b71b7299-1f83-4031-bfff-b988c92b30c2</guid>
      <link>http://cfis.savagexi.com/2007/09/05/rails-unusual-architecture#comment-4403</link>
    </item>
    <item>
      <title>Comment on Rails' Unusual Architecture by http://kurtstephens.com</title>
      <description>&lt;p&gt;  This coding pattern is common in Rails and Ruby. This is a great way to package functionality into reusable units.&lt;/p&gt;

&lt;p&gt;  But, this is not AOP, Decorator or Chain of Responsibility.&lt;/p&gt;

&lt;p&gt;  It is an exercise in first-class modules and module delegation, which Ruby supports very well.  It is a chain of methods packaged in modules, not objects collaborating; i.e. composition of class and module singletons, versus instantiated behavioral objects.  The latter is far more flexible.&lt;/p&gt;

&lt;p&gt;  There are no Decorator objects being created.  There is no Chain of Responding objects.  It is not AOP because the advice is not specified orthogonally, outside the subject class.&lt;br /&gt;
&lt;/p&gt;

&lt;p&gt;  The Ruby gem aquarium looks like a good AOP framework.  Found it just after I wrote my own method advice package. :(&lt;/p&gt;</description>
      <pubDate>Thu, 06 Sep 2007 09:14:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:3eebbbfb-7751-4102-8708-20522cf52670</guid>
      <link>http://cfis.savagexi.com/2007/09/05/rails-unusual-architecture#comment-4404</link>
    </item>
    <item>
      <title>Trackback from anothr user: Anothr feed track -cfis on Rails' Unusual Architecture</title>
      <description>One new subscriber from Anothr Alerts</description>
      <pubDate>Thu, 06 Sep 2007 10:35:09 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:e300ca47-44a7-4dc3-a406-4dbf5f3dadd2</guid>
      <link>http://cfis.savagexi.com/2007/09/05/rails-unusual-architecture#trackback-4405</link>
    </item>
    <item>
      <title>Comment on Rails' Unusual Architecture by Rick</title>
      <description>&lt;p&gt;You mention that ruby has limited support for AOP, which is true, but you fail to mention that, generally, intended effect of AOP is to implement  cross-cutting-concerns. In this capacity ruby is incredibly adept. It utilizes it&amp;#8217;s trademark feature, the closure, to add functionality (such as logging, auth, even  the decorator pattern) It accomplishes this in a much more elegant fashion than standard AOP practices, IMO. Interesting article by the way.&lt;/p&gt;</description>
      <pubDate>Thu, 06 Sep 2007 12:34:05 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:4e7c97a3-0b1c-43a0-a2a0-3931e518fc98</guid>
      <link>http://cfis.savagexi.com/2007/09/05/rails-unusual-architecture#comment-4406</link>
    </item>
    <item>
      <title>Comment on Rails' Unusual Architecture by charlie</title>
      <description>&lt;p&gt;Hi Justin,&lt;/p&gt;

&lt;p&gt;Yes, its a bit of a meme that dynamic languages reduce the need for many design patterns.  Do you have a link to that article?&lt;/p&gt;

&lt;p&gt;However, that doesn&amp;#8217;t mean that all design patterns are useless. And in this case particularly, they help understand some of the possible approaches to building a web framework.  Using a more functional approach(blocks/lambda), like you mention, would also work.  But I would guess it would end up fairly un-Ruby like.  So if you&amp;#8217;d prefer that approach its probably better to use a functional language.&lt;/p&gt;</description>
      <pubDate>Thu, 06 Sep 2007 12:53:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:b889d45a-dd06-4564-be73-e9e59252f743</guid>
      <link>http://cfis.savagexi.com/2007/09/05/rails-unusual-architecture#comment-4407</link>
    </item>
    <item>
      <title>Comment on Rails' Unusual Architecture by charlie</title>
      <description>&lt;p&gt;Hi Dean,&lt;/p&gt;

&lt;p&gt;Thanks for the info on Aquarium. Do you use it often, and are you a developer on the project?  Looks like a very interesting project, I&amp;#8217;ll have to give it a try.&lt;/p&gt;</description>
      <pubDate>Thu, 06 Sep 2007 12:54:37 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:d5178a91-af24-4b70-9910-9b195fe7e05b</guid>
      <link>http://cfis.savagexi.com/2007/09/05/rails-unusual-architecture#comment-4408</link>
    </item>
    <item>
      <title>Comment on Rails' Unusual Architecture by charlie</title>
      <description>&lt;p&gt;Hi Kurt,&lt;/p&gt;

&lt;p&gt;Great comments.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;It is a chain of methods packaged in modules, not objects collaborating; i.e. composition of class and module singletons, versus instantiated behavioral objects.  The latter is far more flexible.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Yes, that is an excellent way of putting it.  I should added a paragraph explicitly calling out that difference.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;There are no Decorator objects being created.  There is no Chain of Responding objects.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Agreed.  The effect is similar, the implementations are very different.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;It is not AOP because the advice is not specified orthogonally, outside the subject class.&lt;br /&gt;
&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;That is an interesting point.  Including the modules into a base class is sort-of-kind-of outside the subject class.  But of course you have to do it via class_eval.&lt;/p&gt;</description>
      <pubDate>Thu, 06 Sep 2007 13:05:27 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:99ad3f56-62c4-48c1-88e3-d2a1d8d26213</guid>
      <link>http://cfis.savagexi.com/2007/09/05/rails-unusual-architecture#comment-4409</link>
    </item>
    <item>
      <title>Comment on Rails' Unusual Architecture by charlie</title>
      <description>&lt;p&gt;Hi Rick,&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;generally, [the] intended effect of AOP is to implement  cross-cutting-concerns&amp;#8230;It utilizes it&#8217;s trademark feature, the closure, to add functionality (such as logging, auth, even  the decorator pattern)&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Sort of.  You still have to add in the code to hook in the functionality (such as Benchmark) versus AOP where that is done orthogonally (as emphasized by Kurt).&lt;br /&gt;
&lt;/p&gt;

&lt;p&gt;But I agree that Ruby does give you the tools to make that less painful than many other languages.&lt;/p&gt;</description>
      <pubDate>Thu, 06 Sep 2007 13:09:20 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:dce36e3f-d876-4eb7-bc7b-483f06a50063</guid>
      <link>http://cfis.savagexi.com/2007/09/05/rails-unusual-architecture#comment-4410</link>
    </item>
    <item>
      <title>Comment on Rails' Unusual Architecture by Charlie Hubbard</title>
      <description>&lt;p&gt;Chain of Responsibility and Decorator are so similar they&amp;#8217;re almost the same.  Their difference only lies in the implementations not the architecture of the pattern.  Decorators can behave like Chain of Responsibility (COR for short) because they can always choose not to forward a request onto it&amp;#8217;s delegate.&lt;/p&gt;

&lt;p&gt;In web frameworks sometimes you want to stop processing a request due to some condition.  Consider, error handling, authentication, etc.  In these cases your request is processed more like a COR rather than Decorator.  A decorator pattern is equivalent to COR and vice a versa.&lt;/p&gt;

&lt;p&gt;I have found it very difficult to figure out what&amp;#8217;s actually happening in the Rails code by looking at the source.  The use of adding dynamic methods is very hard to track down who&amp;#8217;s calling whom.  Being able to view the method decoration at runtime would be really cool.  Maybe using something like &lt;a href="http://www.dogbiscuit.org/mdub/weblog/Tech/Programming/Ruby/MethodMissingMagic" rel="nofollow"&gt;this&lt;/a&gt; could help:&lt;/p&gt;

&lt;p&gt;At runtime you could instantiate a controller object that acts like a camcorder, and at the end would print out all of the methods processed to HTML.  Maybe turn it on with a ViewHelper: &amp;lt;%= request_method_chain %&gt;.&lt;/p&gt;</description>
      <pubDate>Mon, 10 Sep 2007 08:43:52 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:8c4681a4-d9b3-41c8-9737-d4822741ebeb</guid>
      <link>http://cfis.savagexi.com/2007/09/05/rails-unusual-architecture#comment-4425</link>
    </item>
    <item>
      <title>Comment on Rails' Unusual Architecture by JB Brown</title>
      <description>&lt;p&gt;This seems more like a Pipeline/Pipes-and-Filters pattern than Decorator or CoR. You&amp;#8217;ve expressed the consequences of the Pipeline/Pipes-and-Filters pattern in your post along with what I believe are misplaced frustrations about things you&amp;#8217;d expect to be in a Decorator pattern implementation but aren&amp;#8217;t.&lt;/p&gt;

&lt;p&gt;An early post stated that pipleine doesn&amp;#8217;t augment behavior before and after; but rather only before. I&amp;#8217;d say this is a limited view of Pipes-and-Filters and that it really depends on the diretionallity of the intended Pipe; in, out, or in-and-out. Pipeline / Pipes-and-Filters can be for returning a response to a request just as well as it&amp;#8217;s coloquial description of processing a request.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://jb-brown.blogspot.com/2007/09/cage-match-decorator-pipeline-chain-of.html" rel="nofollow"&gt;http://jb-brown.blogspot.com/2007/09/cage-match-decorator-pipeline-chain-of.html&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Mon, 10 Sep 2007 20:30:19 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:faf55142-5b27-48c9-ae7e-e08a847b333a</guid>
      <link>http://cfis.savagexi.com/2007/09/05/rails-unusual-architecture#comment-4428</link>
    </item>
    <item>
      <title>Comment on Rails' Unusual Architecture by JB Brown</title>
      <description>&lt;p&gt;After further understanding the alias_method_chain implementation I agree that in OO patterns this is most acurately described as the Decorator pattern. I was misguided with my Pipeline view. I&amp;#8217;ve updated my blog with the same.&lt;/p&gt;</description>
      <pubDate>Tue, 11 Sep 2007 02:08:33 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:29ef4ac7-73a9-4708-9f04-d5d68352920a</guid>
      <link>http://cfis.savagexi.com/2007/09/05/rails-unusual-architecture#comment-4430</link>
    </item>
    <item>
      <title>Trackback from Quicklinks: links for 2007-09-11 on Rails' Unusual Architecture</title>
      <description> Rails' Unusual Architecture (tags: programming rails)...</description>
      <pubDate>Tue, 11 Sep 2007 05:17:15 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:6ee260ea-dbdf-4b22-818f-b4a46ba88279</guid>
      <link>http://cfis.savagexi.com/2007/09/05/rails-unusual-architecture#trackback-4432</link>
    </item>
    <item>
      <title>Trackback from Blog do Urubatan: Rapidinhas sobre Ruby e Rails on Rails' Unusual Architecture</title>
      <description>Primeiro, eu realmente queria escrever algo sobre java agora, mas realmente n&#227;o estou fazendo nada de interessante (pelo menos n&#227;o que possa ser comentado sem que eu seja processado), e n&#227;o vi nada de muito novo na web que valesse a pena um com...</description>
      <pubDate>Tue, 11 Sep 2007 10:38:44 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:178f3e41-de8b-4131-a798-d32e93819d13</guid>
      <link>http://cfis.savagexi.com/2007/09/05/rails-unusual-architecture#trackback-4433</link>
    </item>
    <item>
      <title>Trackback from The Plan A: Dynamics finders in ActiveRecord using&amp;nbsp;AOP. on Rails' Unusual Architecture</title>
      <description>Yesterday, I have been playing with Aquarium, an AOP framework for ruby. I decided hack a little bit. I try to refactor the dynamics finders of ActiveRecord, using an AOP approach.
First lets try to understand what are and how dynamics finders wor...</description>
      <pubDate>Mon, 24 Sep 2007 18:19:35 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:54bad1fa-f104-4231-bc16-e80c1a6a310e</guid>
      <link>http://cfis.savagexi.com/2007/09/05/rails-unusual-architecture#trackback-4726</link>
    </item>
    <item>
      <title>Comment on Rails' Unusual Architecture by Michael Schuerig</title>
      <description>&lt;p&gt;There is one very big advantage in the way Rails implements the decorator pattern: It keeps the sense of self intact. The classic GOF-decorator, implemented as one decorating object wrapped around another object, suffers from schizophrenia. When a decorated method is called from the outside, it goes through the decorator; when the same method is called from within the inner object, it goes straight to the original implementation, bypassing the decoration.&lt;/p&gt;

&lt;p&gt;The Rails implementation, using method chaining, avoids splitting the meaning of self by keeping everything to a single object.&lt;/p&gt;

&lt;p&gt;See my other, earlier musings on &lt;a href="http://schuerig.de/michael/blog/index.php/2007/02/12/self-conscious-decoration/" rel="nofollow"&gt;self-conscious decoration in Rails&lt;/a&gt;.&lt;/p&gt;</description>
      <pubDate>Fri, 01 Feb 2008 02:19:42 -0700</pubDate>
      <guid isPermaLink="false">urn:uuid:63d22a54-7d22-4363-9d14-dffeab8dfd35</guid>
      <link>http://cfis.savagexi.com/2007/09/05/rails-unusual-architecture#comment-5714</link>
    </item>
    <item>
      <title>Comment on Rails' Unusual Architecture by Charlie</title>
      <description>&lt;p&gt;Hi Michael,&lt;/p&gt;

&lt;p&gt;That is an interesting point that I hadn&amp;#8217;t considered - and thanks for the link to your earlier blog post that I had missed when I orginally wrote this.&lt;/p&gt;

&lt;p&gt;In the case of Rails, I&amp;#8217;m not sure it matters since the method being decorated tends to be process.  But I can see how it would be important in other cases.&lt;/p&gt;</description>
      <pubDate>Sun, 03 Feb 2008 12:44:42 -0700</pubDate>
      <guid isPermaLink="false">urn:uuid:3cbf5335-e4c6-47f6-82d7-0ef023d66a4a</guid>
      <link>http://cfis.savagexi.com/2007/09/05/rails-unusual-architecture#comment-5805</link>
    </item>
  </channel>
</rss>
