Eric, Peter,

one of the main problems of the current Turbine (this is for 2.3, I
don't know that much yet about the 2.4 core) is scope and usage. There
is no documentation in which scope an element is valid (see the idea
about changing the velocity context from an Action a few days ago) and
what the purpose of an object is. This basically is for "Session",
"RunData" and (Velocity)Context. From these stem the scope problems
with the Tools.

The problem with RunData is IMHO, that its scope was never exactly
defined and that it got lots and lots of senseless fields tacked
on. Stuff like getServletConfig(), getPage(), isPageSet(), hasAction()
and so on blur IMHO the real sense of the RunData: 

Being some sort of "super-short session object" for exactly one
purpose: Being created when the request comes in, transfer of
information through the request-response-cycle (for 2.4 these are
probably the pipeline stages) and destruction (!)  after the response
got sent out.

Due to the factory nature of the RunDataService, users started to
reuse RunData Information over the cycle; simply kept references to
the object in the session and did all kinds of bad things to the poor
objects. The net result are applications that behave strange, once you
deploy them and the get under load (the RunData factory starts to
churn out more than just the one lone RunData object, that is recycled
all over again when running under the debugger while developing. ;-) ).

IMHO, RunData should be a simple core container. It already has way
too much methods which severly reduces its flexibility. Best (and
Worst) thing IMHO is the TemplateInfo:

There is 

TemplateInfo getTemplateInfo()   (GOOD!)

and then 

getLayoutTemplate()     (BAD!)
setLayoutTemplate()     (BAD!)
getScreenTemplate()     (BAD!)
setScreenTemplate()     (BAD!)

which only do getTemplateInfo().<method>. Stuff, that IMHO is not only
not needed in the RunData but severely damages its usability (What if
my application uses no templates? is getTemplateInfo() == null? What
happens if I call data.getScreenTemplate()? Is the NPE acceptable?)

>I think that you are on the right track, as RunData is way too specific to
>Turbine and the turbine enviroment.  Instead, what I would like to see is a

Definitely.

>more generic PipelineData or PipelineRequest..   Not sure about Request

Think "session". Look at the HttpSession Interface from
javax.servlet.http. This IMHO points in the right direction. In the
end, don't be surprised if you end up with a HashMap with some scope
operators and a timeout. :-)

        Regards
                Henning

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
[EMAIL PROTECTED]        +49 9131 50 654 0   http://www.intermeta.de/

RedHat Certified Engineer -- Jakarta Turbine Development  -- hero for hire
   Linux, Java, perl, Solaris -- Consulting, Training, Development

"Fighting for one's political stand is an honourable action, but re-
 fusing to acknowledge that there might be weaknesses in one's
 position - in order to identify them so that they can be remedied -
 is a large enough problem with the Open Source movement that it
 deserves to be on this list of the top five problems."
                       -- Michelle Levesque, "Fundamental Issues with
                                    Open Source Software Development"

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

Reply via email to