Kerry,

I am fairly new to using Avalon.  I think the framework is great and I
am trying to integrate the framework into a web application that I am
building.

You know then that Framework and Excalibur are the subprojects of Avalon that you are going to use. Pheonix itself os not really best used in a webapp. I guess you knew that,

I am still trying to wrap my brain around the idea of components and
which classes I have written should become components and what should
not.  I have read through "Developing with Avalon" thoroughly.

The first Component I moved over was a DataSource component.  Pretty
straightforward.  But now, in order to access my DataSource component,
do all classes that perform a database operation need to be a composable
component?  On the same thought, do any classes that need to access the
logging facility also need to be components?

No, not all classes need to be components.

I am using the Command pattern and have already created a number of
commands that perform simple to complex database operations.  One
example might be something like an ApproveCompany(int companyid) that
changes the status field of a company record in the database.

We have a "command stream" in use for AvalonDB. :

http://cvs.apache.org/viewcvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/transport/

The commands are not components, they are simple beans. But they they are only serializable messanges. The handlers that process them are components (primarily for loggable capability).

If I now have to make my Command classes into components, then I can't
use the constructor anymore to define parameters. Should I then use set
methods to set the paramters before calling execute()? If I do this, I
feel I am losing some of the conciseness and clearity of the command
objects I was using.


Don't worry dude, leave your commands are is and seperate processing logic to other classes (handlers).

I'll also have to check that the parameters have
been properly set or not.  I am also worried that making command object
like these into components might be a misuse of the component framework
and would like to check this.

Another thought I had is to build some kind of command invoking
component.  This might be useful as I have a number of command classes
to do various maintenance activities on the database.  I would
appreciate any thoughts on this or suggestions from those who may have
implemented something like this already.

Again in the DB project we have a ....

    Reply processRequest(Request request) throws XXXException;

....that is the central hub for handling of requests...

Any clearer?

Regards,

- Paul H


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



Reply via email to