Re: [TFUI] What's wrong with Struts?
Dave Rooney <dave.rooney-JZ+f107kGBmw5LPnMra/[email protected]> Mon, 19 Sep 2005 10:24:28 -0400
| Newsgroups | gmane.comp.programming.test-first-user-interfaces |
|---|---|
| Organization | Mayford Technologies |
| Message-ID | <[email protected]> |
Phlip wrote:
>>... We try to move as much
>>functionality out of the Actions into simple helper classes. Also, we
>>found that there isn't an easy way to represent the view in a form
>>that's testable.
>>
>>There is StrutsTestCase, but we couldn't use it, and the reason why
>>escapes me for the moment.
>>
>>
>
>Repressed?
>
>
Heh heh... quite possibly. Actually, I believe it had something to do
with the unbelievably complex way our system is handling code tables as
classes with static initializers that have to load from an EJB in order
to load from the database. Don't get me started, or I'll unleash
another blog entry. ;)
>Technically, I can't figure out if it will mock the server, or will serve
>the pages and intercept them with HttpUnit. And while trying to learn that,
>I'm stuck in a Vicious Cycle of Incomprehensible Error Messages from any of
>the several layers involved. Expensive setup is a design smell.
>
>Humble Dialog Box to the rescue!
>
>
I've tossed around the idea of using FitNesse and a column fixture of
some sort to set up what the Action would need in order to run. That
ain't unit testing, but I don't think that what an Action does is really
a unit, IMHO, at least.
Of course, that doesn't help in testing the UI. I guess one approach
could be to use XML/XSLT for the actual presentation, and have XMLUnit
test what would be passed to the browser. You'd still need to fake
Struts into thinking that it's talking to something resembling a server
in order for it to send that XML to what it thinks is the client.
>There are those who think libraries that resist TDD will not survive our
>little revolution in their current form.
>
>
I certainly hope so. A bigger hurdle, though, is getting enough
developers to understand what a library needs to be in order to support TDD.
As a side note, in a conversation a little while back with either Colin
Sampaleanu or Keith Donald of Spring fame, it was mentioned that they
talked to Craig McClanahan about reworking Struts to be interface-based
rather than class-based. They even supplied concrete samples of how to
do it. He apparently thought it was a great idea, then went away and
came up with, I believe, Shale, which is just a different flavour of
Struts and still doesn't use interfaces. Go figure.
Of course, that's all heresay and is inadmissible in a court of law. :)
Dave Rooney
Mayford Technologies
http://www.mayford.ca
------------------------ Yahoo! Groups Sponsor --------------------~-->
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/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/