An Architect's View

CFML, Clojure, Software Design, Frameworks and more...

An Architect's View


April 20, 2009 ·

The Adobe Developer Center has a great article on Test Driven Development in ColdFusion by Bill Shelton and Marc Esher of MXUnit fame. If this is a new concept for you, read this article! If this is a familiar concept for you but you want to feel better about what you already do, read this article! Seeing this sort of stuff on the Adobe Developer Center is very encouraging because it says a lot about what is considered current best practice!

Tags: adobe · coldfusion · tdd

4 responses

  • 1 Joshua Curtiss // Apr 24, 2009 at 6:21 AM

    TDD is one thing I haven't attempted to tackle yet. And I must admit, part of the reason is that I haven't found any tutorials or walkthroughs that are thoroughly helpful for a real-world application. When I read about assertEquals() and how you can test that your sum(1,2) method will return 3, that's great, but not applicable to the complexity of real-world apps that are returning more complex data like objects, working with DBs, filesystems, network directories, etc.

    Part 1 already appears more "real-world" based with their Twitter example. Hopefully this series will continue to expound as it progresses.
  • 2 Sean Corfield // Apr 24, 2009 at 9:59 AM

    @Joshua, yeah, the ever-present calculator example is not very helpful!

    I think the low-level approach is also off-putting. It's why I'm finding BDD and cfSpec so interesting because it lets you write "expectations of behavior" (tests) in the language of the problem domain and work top-down instead of bottom-up.
  • 3 Joshua Curtiss // Apr 25, 2009 at 12:13 PM

    Just ran across a post of yours on Jan 6 where I commented on cfSpec. Totally forgot about that. :-) Oy, it is hard to dedicate the time to the learning curve of not just TDD and BDD the concepts but then learning implementation with an actual tool like mxUnit or cfSpec. Especially since most projects I'm working on are typically short, 1-6 week projects.
  • 4 Sean Corfield // Apr 25, 2009 at 2:50 PM

    Yeah, it can be really hard to find the time to keep picking up new stuff all the time but our industry moves so fast that we can quickly get "out of date" - or at least lose track of the available options. It's why conferences are so important: they give us some time away from work to focus on the new and exciting stuff that other people get to play with - and a chance to exchange notes with our peers.

    In the past I've even taken unpaid leave and paid to attend a conference out of my own pocket if my company won't send me (last year, for example, I paid for all my own travel to attendee cf.Objective() and speak at Scotch on the Rocks, CFUNITED and A Wee Dram of Scotch!).