although i haven't done much of web frameworks development i recommend against turning you actions, into the actuall pojos, develop as much pojos as you can, with only pure java elements (or commons utils for allready been there done that fame of mine), test them as though they are alone in the planet, and use the actions around them. the reason for this, is that in my opinion, is that sooner or later you may need to have frameworks' interfaces,utils, or abstract classes to make it easy for you,maybe becouse of a bug in the framework itself (like databinding in timepicker), but when you do that, when you let a single import of opensymphony's creep into you pure java code, then you allready coupled your core model into A framework.

allow your actions to be the convergence of "dirty" code, the meeting place between business and web actiions, use as much of the framworks abilties ONLY there (anntoatins, abstract classes etc...) and let everything else be taken care of by pure java.



From: "Frank W. Zammetti" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <user@struts.apache.org>
To: "Struts Users Mailing List" <user@struts.apache.org>
CC: "Struts Users Mailing List" <user@struts.apache.org>
Subject: Re: Are S2 actions POJOs?
Date: Thu, 10 May 2007 16:07:56 -0400 (EDT)

Your Actions *can* be POJOs... they also *can* implement certain
interfaces, and they *can* extend certain base classes... implementing the
interfaces or extending the base classes gives your Actions certain
inherent abilities, or marks them as being usable by the framework in
certain ways it otherwise wouldn't know it could.  When you read that
WW/S2 Actions are POJOs, that's true, but to be more accurate it should
say they *can* be POJOs... unlike in S1 where you had to extend Action,
that is no longer required, but you'll give up some things if you don't,
or if you don't extend some interfaces.

Frank

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of "Practical Ajax Projects With Java Technology"
 (2006, Apress, ISBN 1-59059-695-1)
and "JavaScript, DOM Scripting and Ajax Projects"
 (2007, Apress, ISBN 1-59059-816-4)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

On Thu, May 10, 2007 4:01 pm, Rick Schumeyer wrote:
> It's quite possible I'm confused, but I thought that actions in S2 were
> now POJOs.  In Webwork in Action, for example, we see:
>
> public class HelloWorld implements Action
>
> but in the blank application we see
>
> public class ExampleSupport extends ActionSupport
>
> Is this an example where Webwork in Action is out-of-date, or can you
> still do something like that with S2?  If so, is there a reason why I
> *would not* want to use POJOs with an Action interface?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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


_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


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

Reply via email to