wood burning stoves 2.0*
The moose likes Design and the fly likes First Question for John: What is BDD? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Design
Bookmark "First Question for John: What is BDD?" Watch "First Question for John: What is BDD?" New topic
Author

First Question for John: What is BDD?

charlsy chuks
Ranch Hand

Joined: May 18, 2012
Posts: 79
Hi,
I looked at one thread in this forum about the difference between BDD and TDD. I guess TDD means test driven development.
Since it is on design, I think it will be interesting.
I strongly believe that if design is well done with all documentation well detailed, coding and testing will not be so complex or spiral out of control.
Now I have no idea of BDD. Maybe I should start there.

Thanks


Charles
John Smart
Author
Ranch Hand

Joined: Aug 06, 2013
Posts: 43
    
    5
Hi Charles,

BDD is about verifiable design. Like TDD, BDD (at the coding level) is a design process - it is about writing well-documented specifications in the form of executable tests. In BDD, you start off by thinking about what your system *should* do, in terms of business value, and using concrete examples of the expected outcomes of the system. This focuses efforts on what is really important, and avoids gold-plating and unnecessary features or code. But BDD comes from the observation that it is virtually impossible to get the complete specifications upfront. The same goes for design. While you can (and should) think about the high-level architecture of your application, the high-level domain model, etc, it is very hard to get detailed design complete upfront. Traditional design documentation is also very hard to keep up to date. So, in BDD, part of the detailed design involves writing specifications in the form of executable tests that describe the expected behavior of the system. These executable specifications provide both examples of the expected behavior, and illustrations of how to use your code, which makes them excellent technical documentation.

Code written this way tends to be much cleaner, better designed, better tested and better documented than code written using conventional processes.

This is about BDD at the coding level, but BDD also applies at the requirements analysis level, which I discuss in other posts.
charlsy chuks
Ranch Hand

Joined: May 18, 2012
Posts: 79
Wow,
Interesting stuff indeed. BDD seems to be the new direction for software analysis and best practices alongside agile.
So we can look out for these posts here right?
Besides, I would like to know the details of how these tests can be constructed.
Thanks John.
Burk Hufnagel
Ranch Hand

Joined: Oct 01, 2001
Posts: 814
    
    3
charlsy chuks wrote:Besides, I would like to know the details of how these tests can be constructed.

Charlsy,
For a high level example, take a look at Concordion: http://www.concordion.org/

For something that look a little more like code, try Spock: https://code.google.com/p/spock/wiki/HelloSpock

BDD rocks,
Burk


SCJP, SCJD, SCEA 5 "Any sufficiently analyzed magic is indistinguishable from science!" Agatha Heterodyne (Girl Genius)
charlsy chuks
Ranch Hand

Joined: May 18, 2012
Posts: 79
Thanks Burk!
Burk Hufnagel
Ranch Hand

Joined: Oct 01, 2001
Posts: 814
    
    3
You're welcome. Always happy to share good things I've leaned about.

Good luck,
Burk
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: First Question for John: What is BDD?