• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

BDD and the "static vs. dynamic" debate

 
Joel Neely
Greenhorn
Posts: 9
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 43
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 814
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Burk Hufnagel
Ranch Hand
Posts: 814
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 814
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 43
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 814
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic