• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

TDD, design, and architecture

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Lasse,

What do you feel is the role of TDD in determining the design and architecture of an application?

You mention in a footnote that test-driven development, test-driven design, and test-first programming are all the same thing. I see clearly that test-driven development and test-driven programming are the same thing, but I feel that test-driven design is a broader issue.

At a certain level, TDD most definitely "drives" the design of the code, because of the refactoring that the tests enable you to do.

However, at a higher level of abstraction, there are architectural design decisions, patterns, and structures that--though they may and should evolve over time and during the project--are probably not best determined via the process of test-first programming.

Your thoughts?
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Allan Halme:
You mention in a footnote that test-driven development, test-driven design, and test-first programming are all the same thing. I see clearly that test-driven development and test-driven programming are the same thing, but I feel that test-driven design is a broader issue.

At a certain level, TDD most definitely "drives" the design of the code, because of the refactoring that the tests enable you to do.



Fully agreed. I consider all three names synonymous because the tests will affect and drive your design.

Originally posted by Allan Halme:
However, at a higher level of abstraction, there are architectural design decisions, patterns, and structures that--though they may and should evolve over time and during the project--are probably not best determined via the process of test-first programming.



Again, fully agreed. Well, mostly agreed.

The design I talk about in the context of TDD is low level design. It's about objects.

In addition to the everyday design that happens when test driving, in my opinion, you need to have an idea of the system or application architecture. While test driving, you simply work within the constraints of that architecture. When your code is telling you that the architecture is funky, it's time to revise the architecture. That, however, should be a team activity and not a decision of an individual developer.

The reason I said "mostly agreed" is because I consider design patterns to be in the domain of code, not architecture. Architectural patterns again is a bit different.

Originally posted by Allan Halme:
What do you feel is the role of TDD in determining the design and architecture of an application?


To summarize what I tried to say above, I see TDD's role being absolutely essential in determining the design of an application and less essential in determining the architecture of the application.

How does this thinking map to yours?
 
Happily living in the valley of the dried frogs with a few tiny ads.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic