CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Greg Young [MVP]

May 2008 - Posts

  • devTeach: Strategic Domain Driven Design

    Here is Dave Laribee's session on Strategic Domain Driven Design from devTeach.

     

     

     

    I have always admired the simplicity and art of Dave's slides, this time I particularly enjoyed the Mr. Roger's slide!

     

    Of course Dave provides some awesome technical content as well good artistic taste; enjoy!

  • devTeach after thoughts

    Just got home from the airport; what a trip. I flew out Tuesday night on a red eye arriving at about 6:30 am in Toronto (On my way out I listened to the new altdotnet podcast this is great stuff!). I spent all of Wednesday in a barely-able-to-walk-because-I-was-so-tired state popping in and out of various sessions and hanging out with many of the great people at the conference.

    Today I checked out a few sessions including Owen's continuous integration and Dave Laribee's Strategic Domain Driven Design (I took videos of my session and Dave's session and will be placing them up here in the next few days). I really wanted to see two of Oren's talks (DSLs and advanced DI but was unable to make either). I also wanted to see JP's DDD session but it was unfortunately scheduled at the same time as my talk so I was unable to make it. 

    On a side note I would really love it if at one of these conferences we could do a bunch of sessions like this one after another (or a pre/post con tutorial) to jump start people who are not familiar with the subject (drop me a line if something like a pre/post con tutorial would interest you as I am curious on the level of interest). As an example at devTeach we could have come close to this with some small schedule changes as the sessions could almost be seen in a progression of JP->Dave->Me with each session adding to the knowledge learned in the session before. If we were to add in another 2-3 sessions there could be a huge amount of effective knowledge transfer. Maybe I will look at following up on this idea for devTeach Montreal but there are actually 2 of these tracks coming up!

    Unfortunately the two tracks are both in the same week in November :( One being Oredev in Sweden and the other being QCon SF. To be honest I don't know how Eric does it, it sounds insane to me to be presenting in Sweden and in SF within 2 days... You may notice that there is also an alt.net track listed for QCon ... cool stuff! QCon is the best/highest level conference I have ever been to, its will be great to have a good showing from the .NET community.

    As always, the discussions outside of the sessions were great. When you get so many smart people in one place good things are bound to happen!

    JR and crew did an great job (as always) with the conference. Setup was good, especially the ability to find power for my laptop. I heard there were problems with the wireless early in the conference but my experience with it was great.

    Posted May 15 2008, 08:49 PM by Greg with 1 comment(s)
    Filed under:
  • DDDD 11 [Basic Consistency]

    So I was bad last week and didn't get much written shame on me... hopefully I can get back on track. In DDDD 10 we looked at Command Query Seperation, now we are going to take that idea a little bit further as we really need to break it down a bit more than commands and queries.

     

    Let's say that I have a domain with a Customer Aggregate Root. When I want to update this Customer I need to issue a query to get its current state so I can validate whether my current changes would make the object en up in an invalid state. Generally for these types of reads one would want consistent data. Why bother with all of my nice validation if it can be bypassed by inconsistency? One of the key concepts in domain driven design is that I know that certain things about my objects are true.

     

    In that same domain I may also be able to search for customers with a first name of "Greg". In this type of situation it is no longer a technical requirement (may still be a business requirement) that my search is completely consistent (for future reference I call any read such as this a "Report" even though they may not meet your personal criteria of a report).

     

    If my search does not need to be completely consistent I can do many very neat things with my data such as having it come from a different model than my transactional model (i.e. query a reporting database). I can also do other things like cache the data with expirations. These types of operations can allow me to become much more scalable and they are a key concept we will be later exploiting in moving towards distributing our systems.

     

     

    Because of how important our gains are; let's make some rules.

     

    Aggregate roots provide the boundary for where data is always consistent. Anytime you deal with data that belongs to an aggregate from outside of an aggregate you should make your new default to assume it to be eventually consistent.

     

    Bounded Contexts are always considered to be eventually consistent. If you have Bounded Contexts where this is not true there is probably something wrong with your model.

     

     

    When I say you should make it your new default; I mean that:

    Unless it is explicitly stated otherwise and a business reason is provided with the story; it will be eventually consistent.

     

     

     

     

    One problem that you will run into with this transition is managing expectations. Domain Experts like most non-technical (and most technical for that matter) people have been trained to think that everything should be instantaneous with computers ("You mean when I click save and it says it saved it takes 45 seconds to show up in the search?"). They have sucked from the evil tit of the RDBMS and its global consistency for far too long. The next post will be about getting over this hurdle.

More Posts