DDD Step By Step
A Practical Guide to Domain Driven Design

July 2009 - DDD on the Web

  • DDD and Code ReUse by Jérémie Chassaing

    I read several discussions against Code ReUse and layered architectures recently : The Fallacy Of ReUse (Udi Dahan) WebCast on SOA in the E-VAN (Udi Dahan) Feature by Feature (Oren Eini) Different kinds of Code ReUse You can split your code with different concern : Object model extensions Technical Infrastructure Application code The first two are good candidates for Code ReUse. By Object model extensions I’m talking about things that make your code writing less tedious at language level or object model level. Example of such code are : IEnumerable and Enumerable Collections Reflection helpers Dependency Injection framework By Technical Infrastructure I mean things that make your code run in its environment : Generic Service Host, ORM, Data Layer Format serializers / deserializers Configuration helpers Communication frameworks (WCF, Service Buses) UI frameworks (MVC, WPF) The last part is Application code, and here, things are really different. Application Code ReUse For long I’ve been writing business code in libraries. I began then to notice problems concerning code and data locality. When you have a single application (process), no problem. But if two applications need to modify the same entities, the solution would be to use the...
  • Branch-Per-Feature Source Control. Part 1: Why by derick.bailey

    Several years ago, I started using source control systems to store all of my code. It was a life saver. I was no longer worried about losing changes that I had made. Then a few years ago, I found Subversion . It was a god-send compared to visual source safe. The feature set was very nice, TortoiseSVN was easy to use, and I eventually found VisualSVN which made life even easier. My team(s) quickly picked up on Subversion and we were very, very happy. We even started using some continuous integration processes to ensure our code built correctly, etc. How We Used To Work The way that my team worked, at the time, was based on the industry standard of “Branches”, “Tags”, “Trunk” for the high level organization. I’m honestly not sure if the industry standard is to have everyone working on the trunk, but that is what we standardized on. All live software development processes were done on the trunk, no matter the size of the team. This meant that there were multiple commits from multiple people, multiple times per day, all on the trunk. This worked fine for a very long time. Especially when we looked back at having no source control. The easy to use svn applications made life good, and no one seemed to mind that everyone was committing to...
  • It is done... S#arp Architecture 1.0 RTM by Billy McCafferty

    Over one year in the making...S#arp Architecture 1.0 RTM has been released at http://code.google.com/p/sharp-architecture/downloads . Pronounced "Sharp Architecture," this project is a solid architectural foundation for rapidly building maintainable web applications leveraging the ASP.NET MVC framework with NHibernate. The primary advantage to be sought in using any architectural framework is to decrease the code one has to write while increasing the quality of the end product. A framework should enable developers to spend little time on infrastructure details while allowing them to focus their attentions on the domain and user experience. Accordingly, S#arp Architecture adheres to the following key principles: Focused on Domain Driven Design Loosely Coupled Preconfigured Infrastructure Open Ended Presentation The overall goal of this is to allow developers to worry less about application "plumbing" and to spend most of their time on adding value for the client by focusing on the business logic and developing a rich user experience. To help you achieve this goal, S#arp Architecture includes a Visual Studio 2008 project template and a built-in CRUD scaffolding generator to save you many hours of development time...
  • Lessons Learned: A Grand Post-Mortem by Billy McCafferty

    Taking the development blogosphere at face value, readers would get the impression that development teams rarely run into complications during project development and that things go quite smoothly throughout client engagements. You often read blogs about the ideal ways of using a Kanban board, the benefits of burn down charts, how great user stories are, how agile development leads to greater project success, and how various design patterns make maintainability a manageable task. It's hard to find many blog posts that begin with "Man, that was rough!" The fact is that the perfect project is few and far between. And sometimes, no matter which techniques are leveraged and no matter how hard a team tries, the project still seems like it's sinking further and further into chaos. You're certainly not alone if you've ever seen clients get upset due to schedule and/or budget overruns, had to deal with developers quitting half way through a project, suspected that management feels out of control, felt overwhelmed by too much work and too little time, realized that the initial estimates were way off, or felt that quality was being sacrificed. Obviously, these are undesirable characteristics to run into, but none of...
  • No Fluff Just Stuff roundup by Jimmy Bogard

    This past weekend, the No Fluff Just Stuff event came to town, and this humble .NET author infiltrated the Java ranks.  This was my first NFJS event, and first of any Java event.  In fact, I’ve never opened Eclipse or wrote a single line of Java.  However, I’m extremely interested how other communities are solving the same problems as us (the .NET world), so I was really looking forward to seeing what kinds of innovation were coming out of the Java space. The really interesting observation that I found that while in some respects the Java community has moved past many of the issues the .NET community faces, in some respects they are replaying the same mistakes.  And, like all conferences, I couldn’t get to all the sessions I wanted.  Here are the ones I could get to: Friday The NFJS seem to abhor pointlessness.  This was no less evident in the opening welcome, which lasted ALL OF 15 MINUTES.  Real quick, “thanks for coming, our agenda is on the back of your nametag”.  No lovey-dovey, hippie kumbayas, nor any narcissistic hero-worship keynotes.  Very refreshing.  Instead, we jump straight into the first session. Domain-Driven Design and Development In Practice – Code Generation, Srini...
  • VAN: Castle Monorail, Active Record and Brail talk at Wednesday 8PM CST (-5 GMT), by yours truly. by Ryan Svihla

    Last week I did a talk on Windsor and it went..ok. I’m not used to online presentations and am more experienced in front of crowds that I can interact with. So between last week’s experience and some advice from Agile Joe this talk I’ll be aiming for more of a screen cast feel.  The talk should go for close to an hour and will be open for questions afterword. Outline is as follows (subject to change): Monorail Controllers Windsor integration Grouping controllers (“Area’s”) Aspect Oriented Programming through Filters Brail View Engine Conditionals and Iterators Parent/Child Views Sub Views Rescues Active Record Architecture overview Using multiple databases Using Active Record in a more DDD friendly way Introduction to writing queries in HQL Working with the underlying ISession. If any of you have the time drop by for some/all of this and give me some feedback please do so. Read More...
  • Code Contracts Primer – Part 5: Utilizing Object Invariants by Derik Whittaker

    If you are not familiar with the Code Contracts library which is coming out of Microsoft R&D labs, you need to check this pretty cool little library out.  As of Vs2010/.Net 4.0 this library will be making the jump out of the R&D labs.  Over the next few blog posts we will be taking a look at the topics below. Downloading and setting up the contracts library Handling Legacy Code Providing Support for Unit Tests Utilizing Pre & Post Conditions Utilizing Object Invariants (this post) Performing checking in base classes/abstract classes In this post we are going to take a look at what I think is one of the coolest features of the Contracts Library.  The concept of Object Invariants. What is Object Invariant validation? This part of the library ensures that when the state of an object is changed that the object remains in valid state.  If the state of the object is to become invalid then your contract would fail and this would be an issue. Imagine you have a class called ReportCard, this class is used by a timekeeping system and is used to store instances of daily report cards (a daily report card holds the time/hours worked for that employee).  We want to setup a rule which says that depending on the...