Re: [TFUI] What's wrong with Struts?
Dave Rooney <dave.rooney-JZ+f107kGBmw5LPnMra/[email protected]> Mon, 19 Sep 2005 05:59:03 -0400
| Newsgroups | gmane.comp.programming.test-first-user-interfaces |
|---|---|
| Organization | Mayford Technologies |
| Message-ID | <[email protected]> |
Phlip wrote:
>TFUIers:
>
>In a private correspondence, a correspondent with a serious economic stake
>in unit-testing all things Java and servletish confessed he avoids Struts
>whenever possible.
>
>I haven't used it yet. Why would someone in a position to benefit both from
>its joys and its concerns avoid it?
>
Craig McClanahan doesn't seem to get the concept of interfaces. As a
result, your bean classes all have to inherit from ActionForm and the
event handling Action classes have hard couplings to the HTTP Request
and Response, an ActionForm instance, and an ActionMapping instance.
So, testing the Actions is a pain at best, although it isn't impossible
when you use CGLIB for mocking those classes. 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.
If you aren't doing TDD, then Struts is a great way to get a web
application started and running. However, it really doesn't lend itself
to TDD or even unit testing very well. IME, at least.
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/