﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Domenic Denicola commented on Design patterns in the test of time: Composite</title><description>I use this all the time in UI programming. E.g. a renderable's render() method calls all of its children's render() methods before returning, in UI hierarchies. The lowest-level renderables are the basic widgets (buttons etc.); middle-level ones are aggregations thereof (toolbars, sections of the page, etc.); and the highest-level renderable is the app itself.</description><link>http://ayende.com/159523/design-patterns-in-the-test-of-time-composite#comment8</link><guid>http://ayende.com/159523/design-patterns-in-the-test-of-time-composite#comment8</guid><pubDate>Tue, 06 Nov 2012 05:10:03 GMT</pubDate></item><item><title>Pete Weissbrod commented on Design patterns in the test of time: Composite</title><description>I use this pattern (or its spirit) for web service request/response objects</description><link>http://ayende.com/159523/design-patterns-in-the-test-of-time-composite#comment7</link><guid>http://ayende.com/159523/design-patterns-in-the-test-of-time-composite#comment7</guid><pubDate>Mon, 05 Nov 2012 23:13:44 GMT</pubDate></item><item><title>Nick commented on Design patterns in the test of time: Composite</title><description>Loving this series, but I'm lost on this post.  I love the composite pattern and use it to implement business rules all over the place.  The idea of clients having a single dependency on an IBusinessRule as opposed to an array of IBusinessRules makes the object model cleaner in my opinion.  Would you / anyone disagree?  Again loving this series, keep it going!</description><link>http://ayende.com/159523/design-patterns-in-the-test-of-time-composite#comment6</link><guid>http://ayende.com/159523/design-patterns-in-the-test-of-time-composite#comment6</guid><pubDate>Mon, 05 Nov 2012 17:20:03 GMT</pubDate></item><item><title>João P. Bragança commented on Design patterns in the test of time: Composite</title><description>[Obsolete("Racist")]
string Id { get;set; }

you got a wicked sense of humor there :)</description><link>http://ayende.com/159523/design-patterns-in-the-test-of-time-composite#comment5</link><guid>http://ayende.com/159523/design-patterns-in-the-test-of-time-composite#comment5</guid><pubDate>Mon, 05 Nov 2012 15:36:06 GMT</pubDate></item><item><title>Dmitry commented on Design patterns in the test of time: Composite</title><description>The infamous specification pattern for expression trees is a good example of that.</description><link>http://ayende.com/159523/design-patterns-in-the-test-of-time-composite#comment4</link><guid>http://ayende.com/159523/design-patterns-in-the-test-of-time-composite#comment4</guid><pubDate>Mon, 05 Nov 2012 14:09:28 GMT</pubDate></item><item><title>Jarrett commented on Design patterns in the test of time: Composite</title><description>I see this one in Rules engines quite a bit. Something like interface IRule { void Validate(); }. A composite rule is both a collection of rules and a rule itself.</description><link>http://ayende.com/159523/design-patterns-in-the-test-of-time-composite#comment3</link><guid>http://ayende.com/159523/design-patterns-in-the-test-of-time-composite#comment3</guid><pubDate>Mon, 05 Nov 2012 14:07:05 GMT</pubDate></item><item><title>mjanoska commented on Design patterns in the test of time: Composite</title><description>Hi, 
 abstracting a level I think any kind of recursive data structure is a good composite candidate. Not only trees but tail recursive structures (lists,  list comprehension implementations). It's quite lucky that

 class Pretty&lt;T&gt;:T{ ... }

is not allowed.
[
Though: class Base&lt;T&gt;:{ ...} with Node:Base&lt;Node&gt; is a workaround
]

Cheers</description><link>http://ayende.com/159523/design-patterns-in-the-test-of-time-composite#comment2</link><guid>http://ayende.com/159523/design-patterns-in-the-test-of-time-composite#comment2</guid><pubDate>Mon, 05 Nov 2012 13:23:46 GMT</pubDate></item><item><title>bourgarel remi commented on Design patterns in the test of time: Composite</title><description>I don't think that properties-only interface are a good example for composite pattern.

I used this pattern when I had an interface "ISaver" with "Save(object item)" and I want to save in many place, so I created a composite that contains many "ISaver".</description><link>http://ayende.com/159523/design-patterns-in-the-test-of-time-composite#comment1</link><guid>http://ayende.com/159523/design-patterns-in-the-test-of-time-composite#comment1</guid><pubDate>Mon, 05 Nov 2012 13:22:33 GMT</pubDate></item></channel></rss>