Steven Woody wrote:
Ted,

1)
How do you implement the Action Adapter?  Derived from Action and make it composite a 
substential Action Adaptee object which know nothing about web stuff? If this is the 
case, I want to know what the Action Adaptee's execute() return?  Actually, I want to 
know if or not the Action Adaptee get knowledge of forwarding.  Thanks.

There's this, for example.


http://cvs.apache.org/viewcvs/jakarta-struts/contrib/scaffold/src/java/org/apache/struts/scaffold/ProcessAction.java?rev=HEAD&content-type=text/vnd.viewcvs-markup

Though as adapters go, the ProcessAction is rather extreme. :)

Basically, you bundle everything into a transfer object and hand that down to the business layer. Then the business layer hands another transfer object back.

The (relatively new) Commons Chain Context is an ideal transfer object for this sort of thing.

http://jakarta.apache.org/commons/sandbox/chain/



2) I think I like the WebTest. Before use it, I still want to get some opinion from you about how do you compare WebTest and HttpTest. Thanks in advance.

HttpUnit is a good thing if you have code based on the http package to test. I have very little of that of my own now-a-days, so HttpUnit isn't something I feel a need to use.


WebTest exercises the actual pages. You can start using it from page one of your first storyboard. (Matter of a fact, started a new one today, and first thing I did was setup the WebTest.) Since it's run by an XML script, it's very easy to keep the WebTest up-to-date. And, it's something anyone can do, not just the Java engineers.

HTH, Ted.



--
Ted Husted,
  Junit in Action  - <http://www.manning.com/massol/>,
  Struts in Action - <http://husted.com/struts/book.html>,
  JSP Site Design  - <http://www.amazon.com/exec/obidos/ISBN=1861005512>.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to