﻿<?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>Jason B commented on Component Oriented Design and why it be retired</title><description>I enjoyed the article. I did find the title confusing, but I think I understand both what Ayende is conveying and the complaints you guys are listing.
  
  
My thing is this...We don't teach babies to run before they can crawl. It's a mandatory step (err...generally...unless this is some sci fi flick). I do not advocate giving 'bad' code to beginners; however, there is something to be said for breaking up the learning process into chunks. 
  
  
Maybe the example application should have been done in phases. An initial beginner phase that eases newbies into MVC, and then a more thorough version that shows where the previous one fell short, while introducing advanced concepts like Repository pattern, IoC, etc....granted SoC is what's missing in this example and that's not necessarily an advanced concept, but still...baby steps.
  
  
I guess the short version of what I'm trying to say is this: I don't mind examples that skimp to a degree on best practices, but those examples ought to be mindful of their shortcomings and make mention of it so they aren't taken as the defacto and only way of accomplishing a given task.
  
  
With that said, the MVC community has been such that people take up projects and add things to them all the time. Nerddiner is a great example of that.
  
  
Maybe this is all a tangent. I'm no expert. I'm just a guy trying to figure all this stuff out.
</description><link>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment37</link><guid>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment37</guid><pubDate>Tue, 18 May 2010 15:55:11 GMT</pubDate></item><item><title>Alex Kilpatrick commented on Component Oriented Design and why it be retired</title><description>Nice article.  It would be interesting to see how you would rewrite it to have a cleaner design.
  
  
Also, I think this is the first time I have seen software development talked about in terms of centuries.
</description><link>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment36</link><guid>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment36</guid><pubDate>Tue, 18 May 2010 14:33:11 GMT</pubDate></item><item><title>John Smith commented on Component Oriented Design and why it be retired</title><description>@Kelly
  
  
Dont hold your breath.  I'm still waiting for the end-to-end NHibernate "best practices", "real world", sample app that Ayende promised in August that was supposed to be delivered by December.  A app of this description could really drive sales of his product.
  
  
If you already built it Ayende I'm an idiot and can you provide a link?
  
  
...
</description><link>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment35</link><guid>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment35</guid><pubDate>Mon, 17 May 2010 22:18:28 GMT</pubDate></item><item><title>Ayende Rahien commented on Component Oriented Design and why it be retired</title><description>NHibernate Sample,
  
You mean... Effectus? 
  
Which came out in ... December?
</description><link>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment34</link><guid>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment34</guid><pubDate>Mon, 17 May 2010 22:18:25 GMT</pubDate></item><item><title>Kelly commented on Component Oriented Design and why it be retired</title><description>My apologies. I did not know about those sample projects. Perhaps they deserve a link on the home page.
</description><link>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment33</link><guid>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment33</guid><pubDate>Mon, 17 May 2010 17:54:08 GMT</pubDate></item><item><title>Ayende Rahien commented on Component Oriented Design and why it be retired</title><description>Freddy,
  
Look at the future posts
</description><link>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment32</link><guid>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment32</guid><pubDate>Mon, 17 May 2010 17:38:25 GMT</pubDate></item><item><title>Ayende Rahien commented on Component Oriented Design and why it be retired</title><description>Kelly,
  
You mean like Effectus?
  
[ayende.com/.../...ing-ui-based-on-conventions.aspx](http://ayende.com/Blog/archive/2009/12/19/effectus-building-ui-based-on-conventions.aspx)  
  
Like Alexandria?
  
[ayende.com/.../my-secret-project-alexandria.aspx](http://ayende.com/Blog/archive/2010/02/01/my-secret-project-alexandria.aspx)  
  
Like Hibernating Forums?
  
[ayende.com/.../The-Forum-Sample-Application.aspx](http://ayende.com/Blog/archive/2007/06/14/The-Forum-Sample-Application.aspx)  
  
  
Like the 10 parts series in TekPub about how to build NHibernate applications?
  
  
Like MonoRail sample app?
  
[ayende.com/.../...itoryltTgtSampleApplication.aspx](http://ayende.com/Blog/archive/2006/12/27/MonoRailActiveRecordRepositoryltTgtSampleApplication.aspx)  
  
  
And those are only the things that I could pull out from memory. I have a LOT of sample apps, tutorials and guidance out.
</description><link>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment31</link><guid>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment31</guid><pubDate>Mon, 17 May 2010 17:37:46 GMT</pubDate></item><item><title>freddy rios commented on Component Oriented Design and why it be retired</title><description>First, thanks for the post. I agree with the overall ideas behind it. 
  
  
I think there is already a lot of info out there on repositories and there is not much more to say on the shared context. 
  
  
What I'd really love to see in a follow up, is specifically: "I would much rather see behavior moved into the entities (upgrading them from persistent DTOs to actual entities)". Basically I just don't see that extra smell/improvement in those simple snippets, which is mainly the reason why I thought I'd get an aha! moment from this post. In other words, I have the feeling that this still maintains 'Component Oriented Software and entities that are nothing but a data bags to be manipulated stateless business objects' after repository + shared context, yet I don't see much further to move around / or a benefit in doing so.
  
  
ps. I keep reading every now and then about DDD and looking at different scenarios, and I think some concepts mentioned are great but there's just something to it that keeps eluding me. Maybe that's why the above doesn't end clicking to me.
</description><link>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment30</link><guid>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment30</guid><pubDate>Mon, 17 May 2010 17:28:03 GMT</pubDate></item><item><title>Kelly commented on Component Oriented Design and why it be retired</title><description>You are certainly outputting more than your share of code. Your blog is extremely educational and helpful. However, blog posts do have their limitations. You can't expect a beginner to read through your last 2 years of posts to figure out how to get started with their next web app. A concise sample app that sets them in the right direction is much more useful in this scenario. 
</description><link>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment29</link><guid>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment29</guid><pubDate>Mon, 17 May 2010 17:04:06 GMT</pubDate></item><item><title>Ayende Rahien commented on Component Oriented Design and why it be retired</title><description>  
Kelly,
  
You mean that I am not outputting enough code for you?
  
Look at the future posts queue
</description><link>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment28</link><guid>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment28</guid><pubDate>Mon, 17 May 2010 16:25:02 GMT</pubDate></item><item><title>Kelly commented on Component Oriented Design and why it be retired</title><description>So when can we expect a sample app done right, from you?
</description><link>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment27</link><guid>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment27</guid><pubDate>Mon, 17 May 2010 15:58:28 GMT</pubDate></item><item><title>peter commented on Component Oriented Design and why it be retired</title><description>I have to agree that the samples that are shipped are considered by beginners as the bible/model code to be emulated. In our shop every single vb6 guy who graduated to dotnet only built off the samples or did what they saw in msdn.
  
</description><link>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment26</link><guid>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment26</guid><pubDate>Mon, 17 May 2010 15:57:35 GMT</pubDate></item><item><title>Ayende Rahien commented on Component Oriented Design and why it be retired</title><description>jmorris,
  
I am sorry, it was supposed to be "where do you THINK beginners learn", something went wrong in the journey from my head to my fingers
</description><link>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment25</link><guid>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment25</guid><pubDate>Mon, 17 May 2010 07:28:33 GMT</pubDate></item><item><title>Sergey Shishkin commented on Component Oriented Design and why it be retired</title><description>The code sample has nothing to do with component-oriented design. I agree with the semantics of your post, but the titles you choose sometime drive me crazy ;)
</description><link>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment24</link><guid>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment24</guid><pubDate>Mon, 17 May 2010 07:27:53 GMT</pubDate></item><item><title>jmorris commented on Component Oriented Design and why it be retired</title><description>&gt;&gt; Where do you beginners learn
  
  
I take that with a grain of salt: 10 years prof dev experiance, BS and MS CS/SE....Java, C/C++, C#, Web, Desktop, RIA, Mobile, blah, blah, blah...
  
  
My point was that you are naive and ignorant to many aspects of software engineering/development...you make many assumptions, such as this one: "Component Oriented Design and Why it Be Retired" and use and an example that has _nothing_ to do with Component Orientated design/development. 
  
  
Your using a beginners tutorial to prove your point; it's like going to the kiddie pool and proving to two years olds-"this is _not_ how you swim, left me show you". Dude, it's an easy target...to easy: they wouldn't know anyways!
  
  
FWIW (if you read this far), I 100% agree with  this statement:
  
  
 "Apps like this are taken, as is, modified, and used. The architecture used is paramount, because it will be used in many apps.
  
And you can (easily) create a good architecture that a beginner can follow easily "
  
  
Yes, they are and yes it's a PITA when you have to explain to a manager, co-worker, whatever why it is bad...but, using a weak argument to validate this won't work. It's just an example at a simple level...geez, maybe in math 100 we should be teaching a 2nd year Calc class ;)
  
  
  
  
  
  
  
  
</description><link>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment23</link><guid>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment23</guid><pubDate>Mon, 17 May 2010 07:14:58 GMT</pubDate></item><item><title>Ayende Rahien commented on Component Oriented Design and why it be retired</title><description>jmorris ,
  
Where do you beginners learn?
  
Apps like this are taken, as is, modified, and used. The architecture used is paramount, because it will be used in many apps.
  
And you can (easily) create a good architecture that a beginner can follow easily
</description><link>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment22</link><guid>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment22</guid><pubDate>Mon, 17 May 2010 06:07:02 GMT</pubDate></item><item><title>Ayende Rahien commented on Component Oriented Design and why it be retired</title><description>ThatJoeGuy ,
  
I am finding it interesting how many people try to generalize my post.
  
I am talking about a very specific thing, I put up a code sample so it would be clear what I am talking about.
  
  
As for exasperating data and behavior, that may be what you need _on the wire_, it isn't what you want when you are actually executing code.
</description><link>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment21</link><guid>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment21</guid><pubDate>Mon, 17 May 2010 06:04:58 GMT</pubDate></item><item><title>Ayende Rahien commented on Component Oriented Design and why it be retired</title><description>Nicholas,
  
Except that I am not talking about IOC here
</description><link>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment20</link><guid>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment20</guid><pubDate>Mon, 17 May 2010 06:03:14 GMT</pubDate></item><item><title>jmorris commented on Component Oriented Design and why it be retired</title><description>I see your point, but really this has nothing to do with component orientated design...if anything this is 'lack of design'. From what I can tell, the MVC Music Store is just a beginners example of MVC. Why make such a big deal about? It is what it is, a simple example. What's next, deconstructing "Hello World"?
</description><link>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment19</link><guid>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment19</guid><pubDate>Mon, 17 May 2010 05:41:37 GMT</pubDate></item><item><title>ThatJoeGuy commented on Component Oriented Design and why it be retired</title><description>Separating Data and behavior is SOA 101.  You essentially can't do SOA and have interop without this separation.
  
  
The "anemic domain model" (as I think Fowler calls it) can work fine on large scale systems if done properly.  The example as posted is obviously not done properly.  This is a complete strawman IMHO, to post a poor example and use it as an argument for separating data and behavior.
</description><link>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment18</link><guid>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment18</guid><pubDate>Mon, 17 May 2010 01:36:56 GMT</pubDate></item><item><title>Nicholas Blumhardt commented on Component Oriented Design and why it be retired</title><description>Ayende, to make up for the terrible injustice you've done to "component oriented design" please please do a follow-up "component oriented design and why you should be using it" ....... i.e., IoC ;)
</description><link>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment17</link><guid>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment17</guid><pubDate>Sun, 16 May 2010 22:57:45 GMT</pubDate></item><item><title>Steve commented on Component Oriented Design and why it be retired</title><description>I think this is a case where the developers aren't doing TDD.  (I'm master of the obvious eh?).
  
  
See, the ongoing thing I see in places I work is 'deliver' but 'don't write tests'.  Developers are just taught to produce  - for whatever reasons, namely 'economy'.  Churn out a solution quickly.
  
  
1. they want to use some magical database access 'generator'
  
2. which produces anemic data models
  
3. with no tests
  
  
I see job after job here in the states outsourced to someone who can 'do the same job at half the cost' and produce the type of code above, which is fine for the RAD 'show the customer quickly how good we are' but falls apart when the requirements expand.
  
  
It's a real issue in our dev shops. 
  
  
They don't really know how to properly setup a DAL using poco.  It's a 'dataset' mentality.   There is no concept of 'Unit of Work' because it's not understood.  
  
Everyone is stuck with anemic models because the blinders are on - data modeled solutions are typically chosen first, no domain driven modeled solutions.  So they start with the database and create the tables, then have some 'wizard' generate objects vs. knowing the domain, creating the domain object and it's test, etc...
  
  
Lastly, mocking and testings are still primal, and although the masters all know how to do it isn't obviously enough for the everyday developer.
</description><link>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment16</link><guid>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment16</guid><pubDate>Sun, 16 May 2010 22:09:49 GMT</pubDate></item><item><title>Ayende Rahien commented on Component Oriented Design and why it be retired</title><description>Andy,
  
I'll have a post in a few days that discuss this in more details
</description><link>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment15</link><guid>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment15</guid><pubDate>Sun, 16 May 2010 20:51:36 GMT</pubDate></item><item><title>Andy White commented on Component Oriented Design and why it be retired</title><description>Hi Ayende,
  
  
I am new to MVCs and IoC. Could you please explain in slightly more detail. Here is how I understand it.
  
  
You are suggesting we code against interfaces. The classes that implement the interfaces will have all the logic for querying the database. Is this correct?
  
  
What I am not sure about is in the Controller (pseudo code), if we have:
  
IRepository repository;
  
var x = repository.GetCartItems();
  
return View(x.OrderBy(c=&gt; c.OrderID));
  
  
The controller has logic to sort by a certain column in the DTO. Is it OK to do this? 
  
  
Could you also please explain the difference between view specific models, data transfer objects and POCO objects?
  
  
Thanks!
</description><link>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment14</link><guid>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment14</guid><pubDate>Sun, 16 May 2010 19:47:57 GMT</pubDate></item><item><title>Ayende Rahien commented on Component Oriented Design and why it be retired</title><description>Jason,
  
Take a look at my reply for James
</description><link>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment13</link><guid>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment13</guid><pubDate>Sun, 16 May 2010 18:25:54 GMT</pubDate></item><item><title>Ayende Rahien commented on Component Oriented Design and why it be retired</title><description>Dmitry,
  
The things that really annoy me, yes.
  
Total restructuring, no.
</description><link>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment12</link><guid>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment12</guid><pubDate>Sun, 16 May 2010 17:52:29 GMT</pubDate></item><item><title>Dmitry commented on Component Oriented Design and why it be retired</title><description>It looks from the future post list that you are going to change this application to use Raven. Are you going to refactor it to use better programming practices at the same time?
  
  
Either way I am looking forward to this.
</description><link>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment11</link><guid>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment11</guid><pubDate>Sun, 16 May 2010 17:48:40 GMT</pubDate></item><item><title>Ayende Rahien commented on Component Oriented Design and why it be retired</title><description>James,
  
Different guidance for different scenarios.
  
Here we have a mix of persistence &amp; non persistence concerns.
  
When I spoke about query objects, I was talking about a problem with obese repositories.
</description><link>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment10</link><guid>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment10</guid><pubDate>Sun, 16 May 2010 13:31:36 GMT</pubDate></item><item><title>Ayende Rahien commented on Component Oriented Design and why it be retired</title><description>Ralf,
  
I am refering specifically, in this post, to the style that is shown in the post.
  
That style was popular some years ago under the name component oriented design, and this is how many people still refer to it to justify this sort of code
</description><link>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment9</link><guid>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment9</guid><pubDate>Sun, 16 May 2010 13:24:51 GMT</pubDate></item><item><title>Ralf Westphal commented on Component Oriented Design and why it be retired</title><description>Although I kinda emphazise with you I feel an urge to ask: What do you mean by "component". Unless it´s clear what you mean by that I would not say something general like "component oriented design should be retired".
  
  
The reason is simple: I´m doing component oriented design all the time. And companies I´m training in doing it love it. It´s gives them productivity, it gives their designs flexibility, it simply is the foundation of any architectural thinking and planning.
  
  
But I guess such widely differing views on "component oriented design" are only possible if there are widely differing notions of "component".
  
  
So what exactly is your definition of "component"?
  
  
-Ralf
</description><link>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment8</link><guid>http://ayende.com/4503/component-oriented-design-and-why-it-be-retired#comment8</guid><pubDate>Sun, 16 May 2010 13:19:23 GMT</pubDate></item></channel></rss>