[Wtr-general] Best practices for structuring GUI models?
Chris McMahon
christopher.mcmahon at gmail.com
Wed Dec 13 18:42:44 EST 2006
In other words, details like
> the form to send a card having the following inputs:
>
> - Text field with name "to[0]"
> - Text field with name "to_email[0]"
> - Text field with name "from"
> - Text field with name "from_email"
> ...
> - Submit button with name "preview"
>
> don't belong in high-level test code.
>
> But where do they belong?
I'm going plug (yes, again!) Kevin Lawrence's article:
http://www.developertesting.com/archives/month200508/20050824-Grow-your-harness.html
Read it, understand it, then read it again. Then write us back. :)
For myself, I set out writing a purely procedural script. After a while
(50-80 lines or so) I've probably got several different code areas that
should really be in their own methods. I probably have some code
duplication I can extract into methods. After another 50 lines or so, I
might need to put my methods in a lib and require them from a controller
script.
I don't do much OO, it's usually overkill for the things I need to do. I
treat methods as if they were subroutines, which generally gets me where I
need to go.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20061213/144b6951/attachment.html
More information about the Wtr-general
mailing list