> Based on what you've described, I don't agree with you.  
> Personally, I 
> think of frameworks such as xwork/webwork can be thought of a 
> sophisticated 
> adapter.  They adapt my business logic to the web, swing, 
> jms, what have 
> you.  When I'm working on presentation or other layer 
> integration issues, 
> I'm dealing directly with the framework.  However, when I'm 
> working on 
> business logic, I want the framework to get out of my way.

Sure I totally agree that the environment should be gotten out of the way as
much as possible. But exactly how transparent the environment can be is the
subject of my post. 

> 
> Can you provide a more detailed example of framework features 
> you want to 
> get access to directly from your business logic?
> 
> M

In the discussion so far there are two examples of things I need to do to in
my business code that are mandated by the environment. Neither of these is
in any way related to the business rules implemented by my model classes:
1. Somehow mark the methods I want called (configured) when the object is
instantiated. Currently this requires creating an artificial constructor.
2. Allow the object to work in a servlet environment that manages reloading
by serializaton/deserialization. I suspect clustering solutions may also use
serialization for distributing objects.

Even if you offload item 1. to yet another configuration file (files?) you
still need to address item 2. in some fashion. The current direction
(picocontainer) breaks Serialization which I think is a bad thing. It
requires an artificial constructor (also a bad thing IMO). Objects may have
to re-set themselves into a session (another environment aware behaviour) in
order to be shared in a cluster. 

My proposal is the least invasive sort of thing I have seen proposed so far.
You just create your BO's knowing they may be distributed (serialized) and
that certain things will be supplied by the invoking environment. The things
you want to be supplied by the environment get specified twice (once
internally with the transient keyword and once with an xDoclet tag) but in a
very non-verbose way. xDoclet could potentially be set up to produce wrapper
classes for just about any IoC framework. 





-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to