The struts design guidelines states that Actions perform the processing
required to deal with a request (such as saving a row into a database);
this can be done by logic code embedded within the Action class itself,
BUT should generally be performed by calling an appropriate method of a
business logic bean.

Now, in the example, the database is retrieved from the servletcontext
(why is this? one instance per user?) and the Action classes itselves
perform the database operations on the database directly.

This seems to me like poor reuseability..

Suppose i want to create a business logic bean, let's say UserHandler,
wich handles all the user savings and retrievings. So in the Action
class, i create an instance of UserHandler and let the UserHandler
perform all the work. If i want to do this, i should pass the database
along to a method, ex. 

userHandler.saveUser(UserDatabase database, String userName, String
email, ..)

But then i have to pass the database along, losing transparacy..
Or would this not make any sense at all?
thanx

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

Reply via email to