views:

335

answers:

2

I'm trying to explore Behavior Driven Design and Domain Driven Design. I'm getting that written specifications drive the tests in BDD, but also that business logic can be encapsulated using the specification pattern for re-use in domain objects and repositories, etc.

Are these basically the same concept just used in different ways, used in conjunction together, or am I completely confusing the concepts?

Please shed some light, if possible.

+1  A: 

BDD or context specification is a style of writing unit tests in a test first manner. DDD is a term coined by Eric Evans that basically re-introduces appropriate design patterns when you are constructing software systems. If you are wanting to do test first development in a context specification style then see this link. From a BDD standpoint there are lots of resources out there if you really want to design your software systems using the patterns described in Eric Evans' book you will find some good resources here

Michael Mann
I realize that BDD and DDD are not the same, but most people doing BDD utilize DDD. I'm just wondering how specifications, which both utilize, converge or diverge.
cadmium
The purpose of doing context specification style TDD/BDD is to flush out the behaviors and interactions between the components of your application. The context specification style also brings out design patterns in your code because it forces you to write testable/decoupled components. I have an example on my blog if you want to check it out.
Michael Mann
Sure, have a link?
cadmium
http://mmann2943.blogspot.com/2009/03/my-new-way-of-writing-tests.html
Michael Mann
A: 

Hi ! There's a couple here http://fuzzelogicsolutions.com/wordpress/index.php/2010/04/20/plain-text/

Peter