This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Design and the fly likes BDD and the Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Design
Bookmark "BDD and the "static vs. dynamic" debate" Watch "BDD and the "static vs. dynamic" debate" New topic
Author

BDD and the "static vs. dynamic" debate

Joel Neely
Greenhorn

Joined: Sep 03, 2013
Posts: 6
    
    1
Do you see more interest/adoption of BDD in the communities around dynamic languages than the static language communitites?
If so, do you attribute that more to characteristics of those communities or to technical issues of the languages?
Thanks!
John Smart
Author
Ranch Hand

Joined: Aug 06, 2013
Posts: 33
    
    5
I find BDD adoption to be widespread across all platforms - at the requirements analysis level, tools like Cucumber and JBehave exist for a wide range of static and dynamic languages (Java, Scala, Groovy, Ruby, .Net, Python, PHP,...). Dynamic languages (Groovy, Ruby) are often easier to use to write the executable specifications, but you do not necessary use the same language to write the tests as you use for production code: Spock, for example, can be used to test Java code very effectively. Scala, which is technically a static language, has a very strong BDD culture.
Burk Hufnagel
Ranch Hand

Joined: Oct 01, 2001
Posts: 814
    
    3
John Smart wrote:Dynamic languages (Groovy, Ruby) are often easier to use to write the executable specifications, but you do not necessary use the same language to write the tests as you use for production code: Spock, for example, can be used to test Java code very effectively.

That's a good point - I've used Spock to test Java code and since it's written in Groovy there's a lot less code than my Java teams expected to see. It also got a few interested in looking at Groovy for writing utilities and such.

Another goodie is Condordion which lets you write user stories in free form text on an HTML page, then instrument the stories so the test runner know what to execute and what results to expect. There's a nice example on their home page at http://www.concordion.org/

Burk


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

Joined: Oct 01, 2001
Posts: 814
    
    3
John,
Do you have an opinion on Joel's second question:
Joel Neely wrote:If so, do you attribute that more to characteristics of those communities or to technical issues of the languages?

Given that you can write the tests in a different language, I think it may depend more on the community and their acceptance of polyglot progamming. What do you think?

Thanks,
Burk
Joel Neely
Greenhorn

Joined: Sep 03, 2013
Posts: 6
    
    1
I think that Burk's observation is on target. And I should clarify that "community" may refer to the individual organization, if sufficiently closed or large. When I hear language similar to "we're a Rails/Java/.Net/whatever shop", I immediately wonder about receptiveness to ideas/tools coming from "outside".
Burk Hufnagel wrote:John,
Do you have an opinion on Joel's second question:
Joel Neely wrote:If so, do you attribute that more to characteristics of those communities or to technical issues of the languages?

Given that you can write the tests in a different language, I think it may depend more on the community and their acceptance of polyglot progamming. What do you think?

Thanks,
Burk
Burk Hufnagel
Ranch Hand

Joined: Oct 01, 2001
Posts: 814
    
    3
Joel Neely wrote:I think that Burk's observation is on target. And I should clarify that "community" may refer to the individual organization, if sufficiently closed or large. When I hear language similar to "we're a Rails/Java/.Net/whatever shop", I immediately wonder about receptiveness to ideas/tools coming from "outside".

Thanks, Joel.
The funny thing is that, as Neal Ford has pointed out for years now, most Java developers use multiple languages every day- SQL, XML, HTML, JavScript, etc. So it's strange to me that they hesitate to pick up a language like Groovy for writing tests when it make things so much easier to read and understand.
John Smart
Author
Ranch Hand

Joined: Aug 06, 2013
Posts: 33
    
    5
I do think community culture has a lot to do with it. The Scala community, for example, is very open to BDD, as are the newer Javascript frameworks. BDD has always been strong in the Ruby community. I guess communities using newer/more modern languages seem a bit more open to more "modern" testing approaches like BDD.
Burk Hufnagel
Ranch Hand

Joined: Oct 01, 2001
Posts: 814
    
    3
John Smart wrote:I guess communities using newer/more modern languages seem a bit more open to more "modern" testing approaches like BDD.

I started off agreeing with this statement, but then realized that JavaScript is not a new language. It's been around almost as long as Java has. I will admit though that it's gotten a big bump in popularity with the coming of HTML5 and the prospect of writing mobile apps with it.

Ruby is a little younger but, according to Wikipedia, it was conceived in 1993, so it's not a particularly new language either. OTOH, I think Ruby has always been seen as a smaller, faster, language used by start ups and small companies, while Java's often looked at as a language used by big businesses and corporate programmers, so maybe there is something to the community thing.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: BDD and the "static vs. dynamic" debate
 
Similar Threads
Why learn Ruby ? what's the benefits over other languages ?
Benefits/Advantage of BDD?
What does BDD in Action give me
Pros and cons of BDD against TDD
Clean Code: TDD and BDD