I will join in too on this one...

What it sounds like you've done is put business logic in your actions, when
actions should simple call interactions between business delegates or
business facades. (See Sun's J2EE Patterns).

By mingling business logic in your actions, you've forever committed your
development within the Struts framework-- hence your probable need to now
expose your work via web services.

The action code should be only a few lines if done correctly, simply acting
as an adapter to some business provider.  That would leave the code in your
action to simply pull data from ActionForms, or validate flows.

If you want to do Web Services, have the services talk to your business
providers, the same ones your actions would talk to.

Jacob Hookom

-----Original Message-----
From: Michael Rasmussen [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 04, 2004 12:41 PM
To: [EMAIL PROTECTED]
Subject: Re: Struts Web Services Enablement Project

>Frank forgive me here, but playing Devils Advocate, if you have clean MVC 
>separation then surely the last thing you want to do is to expose Actions 
>as Web Services.
>It is reasonable to want to expose Business Service Providers such as EJB, 
>or TopLink beans as Web Services but that's up in the model layer, what's 
>the point in pushing the access point down into the Controller code?
>

I guess I see this another way.  Business logic should be just that, 
business logic.  Shouldn't a web service just provide another view of your 
business logic.  And as another view shouldn't it be relying on your 
controller to provide the manipulation of the logic to get to its view?

isn't this exactly the right place to put this kind of thing?

>Or do you see here a solution for all those folks who've not followed best 
>practice and have intermingled Controller functionality with Business 
>logic..?
>


Aren't you just intermingling the view with the model if you expose your 
logic?


Just playing devils advocate of course. ;-)

>Regards
>
>Duncan Mills
>Senior Principal Product Manager
>Oracle Application Development Tools
>
>
>
>Frank Zammetti wrote:
>
>>Hello devs!  This is my first time posting here, and my first attempt at 
>>contributing to an Apache project.  I hope I'm going about it properly! :)
>>
>>In short, I have a little project going with the stated goal of allowing a

>>Struts developer to expose any existing business logic, as implemented in 
>>Struts Actions and their subordinate helper classes, as Web Services, and 
>>do this with NO changes required to any existing application code, and as 
>>little change to Struts itself as possible.  Simplicity is the key to 
>>this!
>>
>>Today I released a second version of this project to the user's mailing 
>>list, and after some feedback I think it's at a point where I'd like to 
>>make you all aware of it, and get some higher-level feedback.  It's 
>>certainly far from complete at this point, but I think even now it's in a 
>>useful form.
>>
>>My hope is that eventually it will be good enough to be included in the 
>>base Struts distro, but that's obviously a long way off, if ever.
>>
>>With all that in mind, please at your convenience visit 
>>http://www.omnytex.com/strutsws
>>
>>There you will find some more detailed technical information and a 
>>download which contains everything you need, including a simple sample 
>>webapp demonstrating the whole mess.
>>
>>I thank you in advance for any time you spend on this!
>>
>>Frank W. Zammetti
>>
>>_________________________________________________________________
>>Looking to buy a house? Get informed with the Home Buying Guide from MSN 
>>House & Home. http://coldwellbanker.msn.com/
>>
>>
>>---------------------------------------------------------------------
>>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]
>

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/


---------------------------------------------------------------------
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]

Reply via email to