Ideally, you would want to create a subsystem that your perform() or
execute() method interfaces with. Usually this subsystem consists of a
business delegate that returns data usable by any view, an optional session
facade and either ejbs or a collection of classes for retrieving data,
called Data Access Objects or DAOs. I glossed over the entire architecture,
but you can read up on J2EE design patterns at :

http://java.sun.com/blueprints/corej2eepatterns/

The simplest progression for you would be to move your business logic and
data access into a delegate and call the delegate from within your perform()
or execute() method. After you get that working, you can approach delegating
some of the work done by the business delegate into other classes or by
using advanced design principles.

John
----- Original Message -----
From: "Billy Ng" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, October 04, 2002 12:27 PM
Subject: Business Logic Bean Question


Hi folks,

I have been reading some articles briefly talking about the business logic
beans.  The way I build my Struts app is to use the Action's perform or
execute method to do the business logic.  Then, I set the data into a bean
and pass it off to the JSP.  It works just fine.  However, my question is if
I should do the business logic in Action?  Am I supposed to hand down the
job to a business logic bean?  It will be helpful if anyone can provide me
samples or links for how a business logic looks alike.

Thanks in advance!

Billy Ng


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

Reply via email to