About Ayende’s blog posts series reviewing the NLayered Sample-App

Ayende has been publishing a series of blog posts reviewing the V1.0 of the NLayerApp Sample App (Note we made V2.0 public a few weeks ago, so most of the code issues he highlights do not apply now).

We’ve been taken into account every of those posts as well as every comment from the community in his blog. Some comments to Ayende’s posts were also good points to think about.

First of all, we are thankful to Ayende and anyone who provides feedback in order to improve our initiative (SampleApp & Guidance) for the community and we will always take into account any comment and feedback.

Second, this is a local initiative gathering experiences from projects, mostly from the Spain community with the collaboration of MVPs, local Microsoft people and some partners. This is not a Microsoft Corp initiative.

Regarding the specific posts that Ayende has been publishing about the NLayerApp V1.0, while we don’t agree on some of the global opinions about what a sample app should be, we acknowledge on some of the improvable code he pointed out, and the points we agree that were issues, were fixed in V2.0 before Ayende published his series. There are also a few other points where we don’t agree, like the size of the SampleApp where we want to show simple and isolated scenarios that anybody can understand (Orders, Customers, simplified Bank Transfers, etc.) showing typical pattern implementations using Entity Framework 4.1 Code-First, or the post about the ‘Query Specification Pattern’ where we think it is useful for many scenarios, like composite queries.

Here you can see a few threads where we explained the modifications because of Ayende’s feedback:





WCF & Exception Handling Improvements for V2.0


Again, we want to highlight that we are thankful to Ayende and we acknowledge that anyone can always improve his code. Therefore, his critics are positive for the community and to this project because he helped us to improve some areas of code in our sample application.

Finally, we’d like to say that this sample app is only a reference for several patterns explained in this guidance you can download and review (Currently draft chapters). Anyone should review it jointly (Guide+SampleApp):


We will appreciate any constructive and specific feedback you can provide and we will take it into account.

Cesar de la Torre

Microsoft Spain

Comments (11)

  1. Rahul says:

    I have been following this project since its inception on Codeplex.  I see implementation of the patterns inline with Eric Evans authoritative book on Domain-Driven Design.  Yes, ofcourse, there may be gaps, errors and scope of improvements in any software whether reference implementations or code running in production.  And, that's why each software has a version number!  I have found these artifacts (code and documentation) very useful to understand the practical aspects of DDD.  Keep up the good work!

  2. Jorge says:

    here's another review wekeroad.com/…/a-simple-example-thats-incredibly-complex, what you think about this?

  3. Santimacnet says:

    Great work Cracks!!

    I just want to thank the whole team effort and work to "light up" with this fantastic guide.

  4. Daniel says:

    I have adopted the use of Entity Framework, especially the Code-First approach, and feel that any sample project illustrating how to implement EF is incredibly valuable. Unfortunately, the comments about the project have turned into a holy war of sorts.  Why criticize someone’s efforts without revealing a different or improved approach? Personally, I have really enjoyed studying this project and have applied a similar design in my past projects. I encourage anyone working with EF to download the project and take it for what it is, a working example applying some of the fundamental thoughts around DDD and EF. Great work and thank you!

  5. Mario Meyrelles says:

    Dear Sirs,

    I appreciate a lot this work. Also, personally I love the examples seen on this project – for teaching and studying, the book and the code seems to be one of the best resources we can find on the web.

    Please continue to keep this project running and working.



  6. James says:

    @ Nick

    If you want to help the community, don't be so condescending. A lot of effort was put into this app, even if it doesn't meet your standards. Get a punching bag or something to hate on, 'cause as a member of the community, I don't feel you represent me or my opinions. Go ahead and hate on me too if you'd like.

    @ Cesard

    Keep it up, and thanks for taking in the criticism and adapting the app accordingly. I've found many aspects of the app to be helpful, and I've been watching it from the very beginning, when the docs were only all in spanish.

  7. @ Javier

    Thanks a lot for your comment. That is exactly the goal of this project. We don't intend to be the 'DDD gurus', we just want to fill a gap between typical patterns and their implementation using latest .NET technologies, like Entity Framework 4.1 CODE FIRST, Unity and so on, in order to help the community with something practical.

  8. @ Nick

    Thank you for your comments. Like I said, all the issues posted by Ayende were fixed in V2.0 even before Ayende published his posts, like the logging issue you comment.

    Then, you say that you looked at the sample by yourself. Do you have any specific and detailed feedback you can provide?. If you, please, I'd love to take it into account.

    And please, read the Guide eBook jointly. It doesn't make sense to look at the code by itself, it was made only as a reference for the Guide/eBook.

    If you have any specific and detailed feedback, you can send it to me to 'cesardl at microsoft.com'. Thanks a lot.

  9. Javier H. says:

    I'm still suprise how harmful people try to be. I mean, people like Nick. You don't like this application or the patterns behind it? Great.

    But don't say it is 0% helpful, because IT IS helpful. It helped me discover and learn some patterns I have never heard about. Sorry for being ignorant, probably you mastered all those patterns several years ago.

    But for the normal people that tries to be less ignorant every day, anybody giving his best trying to teach me something, even if he is sometimes wrong, is wellcome and I can only say "THANKS" to him.

    Go on Cesar and the rest of your team, I think you are doing a great job. You are not only developing a great sample application, but also giving a lesson about how to be educated and polite with peolpe that don't deserve it.

  10. Nick says:

    I look at your sample myself and the quality of the code is very low. Some of the examples pointed out by Ayende should be a warning sign that you are out of your depth creating an application of this nature, and the copy-and-past logging code and un-necessary casting is a warning sign that your fundamental coding skills are not that great.

    If you are trying to help the community, then you should remove this project and spend some time educating yourselves.

    Your application is 0% helpful.

  11. Craig says:

    I wouldn't take it personally, Ayende doesn't seem to like any code he didn't write.

Skip to main content