[TFUI] Re: [TDD] Re: A better way to test the GUI?

"Phlip" <[email protected]>
Newsgroups gmane.comp.programming.test-first-user-interfaces,gmane.comp.programming.test-driven-development
Message-ID <000d01c50815$48199a20$0102a8c0@DF619121>
Charlie Poole wrote:

> > Is my estimate correct that there is no widespread, commonly
> > available canvas control available for the Java GUIs and C# GUIs?
> >
> > This is not rocket surgery. If you don't need super-advanced
> > real-time visualizations, then you don't need raw paint
> > commands. The effort to mock those commands exceeds the
> > effort to build a simple canvas control, like Tk Canvas.
>
> I'm not entirely sure what you mean by a canvas control. I was
> responding
> to the notion that it's relatively simple to mock the Graphics object.
> Maybe
> that's not what you meant though...

Divide all of TFUI into two kinds: Reusing controls that animate data (such
as edit fields and combo boxes), and building new controls that animate data
(such as heat maps, contour maps, etc.).

To build a new control, you can use a canvas control, or you can use raw
paint commands. The latter is typically "non-retained", so you must work
extra to retain those graphic commands, so tests can query they were on
track.

When a canvas control treats graphic commands as objects, it can, for
example, create a rectangle, and then seamlessly move that rectangle around,
change its attributes, etc. The canvas handles the low-level details,
including retaining commands. The rectangle is an object, with properties to
query. This makes test-first very very easy.

Try this sample code: Learning the Ruby to support it is easier than
learning to retain graphic commands for raw paint events.

http://www.rubygarden.org/ruby?SvgCanvas

-- 
  Phlip
  http://industrialxp.org/community/bin/view/Main/TestFirstUserInterfaces



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/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.