Re: [TFUI] Dialogs and EventHandlers

Cory Foy <[email protected]> Tue, 08 Nov 2005 02:04:12 -0500
Newsgroups gmane.comp.programming.test-first-user-interfaces
Message-ID <[email protected]>
Anthony Williams wrote:
> I just posted an entry on my blog about this, describing what I would do
> differently:
> 
> http://www.livejournal.com/users/anthony_w/8000.html
> 
> The key difference is that I believe the GetFontFromUserSelection function
> does not belong on the MyForm class, so I would extract it to a collaborator
> instead of mocking the FontDialog.

Hi Anthony,

Thanks for the feedback. Extracting out the presentation and business 
logic is almost always going to create better testable solutions. So I 
think you were on the right track.

I'm not sure if I would have extracted a class that early. I also had 
the benefit of seeing (which I didn't post) that the original question 
that was emailed had two event handlers, one that pulled up a Font 
dialog, and one that pulled up a color dialog.

But, in the end I believe it would have started to head along the same 
paths.

Thanks!

Cory



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~-> 

To unsubscribe, email:
TestFirstUserInterfaces-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/TestFirstUserInterfaces/

<*> To unsubscribe from this group, send an email to:
    TestFirstUserInterfaces-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/