﻿<?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>Kyle Szklenski commented on Discussion: OO 101 Solutions and the Open Close Principle at the architecture level</title><description>I didn't mind the formatting so much; it was the seeming incoherence of certain spots because of the more natural language that you guys used that caused me a bit of hassle in figuring out what was going on.
  
  
Someone should write a little chat program which records the chat between two people, and formats the text for HTML however the user chooses (you could choose to make yours nice and powerfully bold and blue, and your opposition's pink and flowery).
  
  
Now for the technical aspect:
  
To me, it sounds a lot less like the strategy pattern than it does the chain of responsibility pattern. You pass the same item through a series of actors to act upon the item. This might be implemented by having an event defined in your code, and you pass the necessary values for a person to use around in your EventArgs class; then, when they make a new class and need to use it, they can implement your IOrderProcessingRule, and the engine will auto-wire the event to a function handler in the interface/derived class. A neat side-effect of this is that you can have the standard "Cancel" boolean in your EventArgs class, and short-circuit the remainder of the calls to the other rules if need be; this makes it more complex, but still manageable (in my opinion). Of course, there are tons of different ways to do this. This is just one idea I had.
  
  
This is a really great way to achieve simple systems that are super-extensible. It's also a bit of a plug-in system where you can plug in various rules and such.
  
  
The other fantastic use-case for doing it this way is that if need be, you can have a really simple unit test for every single class without ever really needing to go back and update any tests, unless that specific rule changes. It's keeping it SRP to the extreme! I love it.
</description><link>http://ayende.com/3781/discussion-oo-101-solutions-and-the-open-close-principle-at-the-architecture-level#comment16</link><guid>http://ayende.com/3781/discussion-oo-101-solutions-and-the-open-close-principle-at-the-architecture-level#comment16</guid><pubDate>Wed, 31 Dec 2008 12:59:54 GMT</pubDate></item><item><title>Darius Damalakas commented on Discussion: OO 101 Solutions and the Open Close Principle at the architecture level</title><description>Very interesting.
  
  
Could be improved by:
  
 * showing who is talking, because in times it was dificicult to understand who is who
  
 * Use more and different kinds of real-world examples 
  
 * Other important topics like rule-chaining were not touched 
  
  
</description><link>http://ayende.com/3781/discussion-oo-101-solutions-and-the-open-close-principle-at-the-architecture-level#comment15</link><guid>http://ayende.com/3781/discussion-oo-101-solutions-and-the-open-close-principle-at-the-architecture-level#comment15</guid><pubDate>Wed, 31 Dec 2008 08:17:47 GMT</pubDate></item><item><title>Bart Reyserhove commented on Discussion: OO 101 Solutions and the Open Close Principle at the architecture level</title><description>Very interesting conversation, reminds me a lot of the requirements of my customer and the thought process we went through while reading your DSL book and reading your blog posts. 
  
  
We need to create something that returns generel ledger numbers based on a set of rules (which you don't really know up front). They now do that using a decision table that at a certain customer grew so big it did not fit in Excel anymore ;-)
  
  
Now we are going for the DSL in Boo solution and even the customer is more comfortable with that...
</description><link>http://ayende.com/3781/discussion-oo-101-solutions-and-the-open-close-principle-at-the-architecture-level#comment14</link><guid>http://ayende.com/3781/discussion-oo-101-solutions-and-the-open-close-principle-at-the-architecture-level#comment14</guid><pubDate>Wed, 31 Dec 2008 06:38:22 GMT</pubDate></item><item><title>Joe Gutierrez commented on Discussion: OO 101 Solutions and the Open Close Principle at the architecture level</title><description>What I like is the idea of having the what-if scenario query language.
  
  
By the company having historical data, they then can change the rules on the fly and get a scenario to try and optimize their profit.
  
  
Are you going to call it Rules Query Language?
</description><link>http://ayende.com/3781/discussion-oo-101-solutions-and-the-open-close-principle-at-the-architecture-level#comment13</link><guid>http://ayende.com/3781/discussion-oo-101-solutions-and-the-open-close-principle-at-the-architecture-level#comment13</guid><pubDate>Wed, 31 Dec 2008 02:11:38 GMT</pubDate></item><item><title>Luke Breuer commented on Discussion: OO 101 Solutions and the Open Close Principle at the architecture level</title><description>A heads-up to those interested: I will write up an alternate version of this post that will be a bit more like journalism's inverted pyramid. [1]  Hopefully it will complement Oren's post here.  I'll let Oren know when that's done and maybe he'll make a blog post with a link.
  
  
FYI, this didn't start out as a consulting call.  I apparently didn't like an example business Oren gave during the discussion (perhaps too contrived?), so I decided to come up with a real-world example.  I never intended this to be useful for my work, but it looks like it could be quite valuable!
  
  
[1] 
[en.wikipedia.org/.../News_writing#Inverted_pyramid](http://en.wikipedia.org/wiki/News_writing#Inverted_pyramid)</description><link>http://ayende.com/3781/discussion-oo-101-solutions-and-the-open-close-principle-at-the-architecture-level#comment12</link><guid>http://ayende.com/3781/discussion-oo-101-solutions-and-the-open-close-principle-at-the-architecture-level#comment12</guid><pubDate>Tue, 30 Dec 2008 17:47:34 GMT</pubDate></item><item><title>Steve Campbell commented on Discussion: OO 101 Solutions and the Open Close Principle at the architecture level</title><description>I like the description of JFHCI better here than in your original post.  Beforehand my interpretation was just that JFHCI = YAGNI, i.e. avoid making complex frameworks for things that might turn out to be simple.
  
  
My new understanding is:
  
YAGNI  + DRY = JFHCI 
  
  
...which implies strategy pattern, which can be a precursor to rules-engines or DSLs. 
</description><link>http://ayende.com/3781/discussion-oo-101-solutions-and-the-open-close-principle-at-the-architecture-level#comment11</link><guid>http://ayende.com/3781/discussion-oo-101-solutions-and-the-open-close-principle-at-the-architecture-level#comment11</guid><pubDate>Tue, 30 Dec 2008 17:21:58 GMT</pubDate></item><item><title>josh commented on Discussion: OO 101 Solutions and the Open Close Principle at the architecture level</title><description>Wow, I actually read the whole thing.. and look at how many others did too.
  
  
well, maybe this should be the forward to you DSL book.  It's pretty good imo.
</description><link>http://ayende.com/3781/discussion-oo-101-solutions-and-the-open-close-principle-at-the-architecture-level#comment10</link><guid>http://ayende.com/3781/discussion-oo-101-solutions-and-the-open-close-principle-at-the-architecture-level#comment10</guid><pubDate>Tue, 30 Dec 2008 16:57:47 GMT</pubDate></item><item><title>Ayende Rahien commented on Discussion: OO 101 Solutions and the Open Close Principle at the architecture level</title><description>Presentation is tough, because it is so complex to do this in a generic fashion while maintaining good UI.
  
I would say that if you have a set of abstractions in the UI, it is possible, but I would caution against overly generic UI.
</description><link>http://ayende.com/3781/discussion-oo-101-solutions-and-the-open-close-principle-at-the-architecture-level#comment9</link><guid>http://ayende.com/3781/discussion-oo-101-solutions-and-the-open-close-principle-at-the-architecture-level#comment9</guid><pubDate>Tue, 30 Dec 2008 16:38:10 GMT</pubDate></item><item><title>Tim Ross commented on Discussion: OO 101 Solutions and the Open Close Principle at the architecture level</title><description>Awesome and inspiring discussion, Oren. I am interested in your thoughts on whether this could apply to presentation rules. Could you have a set of discrete behaviors defined using a DSL that describes the behavior of a user interface? The DSL could wrap up the presentation specifics and new behavior could be added without modifying the existing infrastructure. I am not sure if this would be practical, or even useful, but it is an interesting thought.
</description><link>http://ayende.com/3781/discussion-oo-101-solutions-and-the-open-close-principle-at-the-architecture-level#comment8</link><guid>http://ayende.com/3781/discussion-oo-101-solutions-and-the-open-close-principle-at-the-architecture-level#comment8</guid><pubDate>Tue, 30 Dec 2008 16:35:05 GMT</pubDate></item><item><title>Steve Bohlen commented on Discussion: OO 101 Solutions and the Open Close Principle at the architecture level</title><description>Yes, formatting needs some help here to differentiate you from the other party, but in general its fun to peek into a live consulting session and see how others' thougth-processes flow in such situations.
  
  
Neat idea.
</description><link>http://ayende.com/3781/discussion-oo-101-solutions-and-the-open-close-principle-at-the-architecture-level#comment7</link><guid>http://ayende.com/3781/discussion-oo-101-solutions-and-the-open-close-principle-at-the-architecture-level#comment7</guid><pubDate>Tue, 30 Dec 2008 14:00:09 GMT</pubDate></item><item><title>Paul Batum commented on Discussion: OO 101 Solutions and the Open Close Principle at the architecture level</title><description>Good read, good ideas. I enjoyed this format, but agree with the other commenters that it needs to be clearer who is talking.
</description><link>http://ayende.com/3781/discussion-oo-101-solutions-and-the-open-close-principle-at-the-architecture-level#comment6</link><guid>http://ayende.com/3781/discussion-oo-101-solutions-and-the-open-close-principle-at-the-architecture-level#comment6</guid><pubDate>Tue, 30 Dec 2008 13:39:18 GMT</pubDate></item><item><title>alberto commented on Discussion: OO 101 Solutions and the Open Close Principle at the architecture level</title><description>You messed up a little with the indenting starting at "And they give you these crazy rules?" (using 3 levels, I don't know who is talking anymore)...
  
  
It would be easier if each piece of conversation had L: or A: in front of it.
  
  
Back to reading...
</description><link>http://ayende.com/3781/discussion-oo-101-solutions-and-the-open-close-principle-at-the-architecture-level#comment5</link><guid>http://ayende.com/3781/discussion-oo-101-solutions-and-the-open-close-principle-at-the-architecture-level#comment5</guid><pubDate>Tue, 30 Dec 2008 12:24:15 GMT</pubDate></item><item><title>Lucas Goodwin commented on Discussion: OO 101 Solutions and the Open Close Principle at the architecture level</title><description>@Oren
  
  
I like the style, though the actual formatting could use some fine tuning. Specifically using colors or bolding instead of indentation and perhaps taging who's "talking" when.
  
  
Otherwise a great overview of ideas I've been solidifying over the last couple years as well.  After you've built enough data-entry apps you start trying to build infrastructure to stop building the same things again and again only to figure out that you've created a massive maintinance nightmare later.
  
  
Then you start going back to "Just Hard Code" it solutions again until you've reached a happy medium.  I swear the majority of software complexity in the world is driven by boredom.
</description><link>http://ayende.com/3781/discussion-oo-101-solutions-and-the-open-close-principle-at-the-architecture-level#comment4</link><guid>http://ayende.com/3781/discussion-oo-101-solutions-and-the-open-close-principle-at-the-architecture-level#comment4</guid><pubDate>Tue, 30 Dec 2008 11:32:52 GMT</pubDate></item><item><title>Tigraine commented on Discussion: OO 101 Solutions and the Open Close Principle at the architecture level</title><description>Ok, i'm completely blown away, although at times it was a bit hard to follow.
  
But that's the beauty of it. You where talking about a really complex scenario and threw some quite advanced stuff at the problem that I don't fully grasp (need to catch up on topics as hot code swapping and building DSLs), but the ideas made absolutely sense and it was very interesting to follow the thought process.
  
  
I guess I'll be ordering your book now to familiarize myself with DSLs :)..
  
  
Also I'd like to say that I really LOVE the format. I really like listening to Podcasts (so go ahead and do one if you want to ;)), but reading about something complex and seeing code is equally great.
  
If you're thinking about turning stuff like that into a webcast, I discourage you that. The hibernating rhinos stuff is absolutely great, but it's hard to find the time to actually watch the whole thing (there are topics better suited to webcasts than others...), so having something to read that can be easily "filtered" for relevant information makes it much more convenient.
  
  
Thanks for this great post...
  
  
greetings Daniel
</description><link>http://ayende.com/3781/discussion-oo-101-solutions-and-the-open-close-principle-at-the-architecture-level#comment3</link><guid>http://ayende.com/3781/discussion-oo-101-solutions-and-the-open-close-principle-at-the-architecture-level#comment3</guid><pubDate>Tue, 30 Dec 2008 10:44:02 GMT</pubDate></item><item><title>jdn commented on Discussion: OO 101 Solutions and the Open Close Principle at the architecture level</title><description>I have massive insomnia issues.  I read through the whole thing.  Those are logically unrelated points.
  
  
Besides wondering what an 'ecat' is, on something this long, it is painful not knowing what is Luke talking and what is your immediate response, as opposed to your more detailed 'outside of your conversation' response.  I assume each indentation is him, but sometimes you have a 'one-liner' response and sometimes much longer.  Italicizing what your actual response to the conversation was would help.
</description><link>http://ayende.com/3781/discussion-oo-101-solutions-and-the-open-close-principle-at-the-architecture-level#comment2</link><guid>http://ayende.com/3781/discussion-oo-101-solutions-and-the-open-close-principle-at-the-architecture-level#comment2</guid><pubDate>Tue, 30 Dec 2008 08:05:13 GMT</pubDate></item><item><title>Jose commented on Discussion: OO 101 Solutions and the Open Close Principle at the architecture level</title><description>In my opinion this is one of the best posts. An eye-opener for me. Really like the format and the "talking-about-a-real-thing" sensation.
</description><link>http://ayende.com/3781/discussion-oo-101-solutions-and-the-open-close-principle-at-the-architecture-level#comment1</link><guid>http://ayende.com/3781/discussion-oo-101-solutions-and-the-open-close-principle-at-the-architecture-level#comment1</guid><pubDate>Tue, 30 Dec 2008 07:59:15 GMT</pubDate></item></channel></rss>