|
|
|
good chemistry is complicated, and a little bit messy -LW |
|
| PerlMonks |
Re^2: Test Driven Development example + design questionby mascip (Monk) |
| on Jul 01, 2012 at 12:49 UTC ( #979299=note: print w/ replies, xml ) | Need Help?? |
|
Thank you for you two answers. You are both saying : "your program is simple, just do things one after the other, you probably don't need objects." (and giving me examples of how you use TDD, thank you)
Practically I agree, BUT When i will build a bigger, more complex program, i will have the same question again : should i first start building low-level objects (bottom-up approach), thus basing my design on assumptions about external inputs? Or shall i go "outside-in", first interacting with my external peers, and then delegating responsibilities to new lower-level classes when i see that i need to.
The programer who wrote this article prefers a top-down approach , because he doesn't like to base a design on assumptions, and thus write useless code. These questions are important to me. Sure, i don't want to become a "purist", and to make my life complicated on simple problems all the time. But i am just trying to learn how to design highly maintainable, loosely-coupled code. And if there are several ways to do it, i'd rather learn about them.
~ ~ ~ PS : thank you for pointing at Test::XT
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||