You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Paulo Silveira <Pa...@commworld.de> on 2002/02/10 21:28:11 UTC

Turbine pipeline, some questions (long)

Hello

This turbine 3 seems really promising, you are dealing with ALL problems
that we have with web applications.
Ok, here it go

Everytime that I enter in a web page, and I am using a Turbine webapp,
it goes directly through the Turbine class.
The doGet is invoked, then is starts some logs and checks. After this,
the Pipeline is started. The pipeline is just a queue of classes
(valves) that should have the invoke(RunData) method invoked.

The default turbine 3 case is: (can anyone help me and say if everything
makes sense?)

  <valve className="org.apache.turbine.pipeline.DetermineActionValve" />


Just takes the request, take a look at the posted parameter "action" and
sets the RunData action to it
QUESTION-> why dont we skip this valve and when getting the action from
the RunData we don simply use data.getParameters().getString( "action"
). This valve seems just a setter for the RunData, it could be done
inside the RunData constructor.

  <valve className="org.apache.turbine.pipeline.DetermineTargetValve" />

Same as DtermineAction, for the target template

  <valve
className="org.apache.turbine.pipeline.DefaultSessionTimeoutValve" />

Just to see if the session is ok, and so...

  <valve className="org.apache.turbine.pipeline.DefaultLoginValve" />

Performs login action and logout action.

QUESTION -> Why should these actions be in a special valve? Shouldnt it
be run from the DefaultActionValve.

  <valve
className="org.apache.turbine.pipeline.DefaultSessionValidationValve" />


Calls the session validator action, it seems to be empty for now

  <valve className="org.apache.turbine.pipeline.DefaultACLCreationValve"
/>

Autenticates the user, using AccessController action

  <valve className="org.apache.turbine.pipeline.DefaultActionValve" />

If there is an action set in the RunData object, find the ACTION module,
then tries to find the action that has this name, then try to invoke its
execute method.

QUESTION -> where do I set to a Action Name to a class, I mean, how
turbine knows that for the action "LOGIN_USER", it should look the class
org.apache.turbine.modules...blah.blah.

  <valve className="org.apache.turbine.pipeline.RunModulesValve" />

QUESTION -> I dont understand what is this about!!!

  <valve className="org.apache.turbine.pipeline.DefaultTargetValve" />
or
  <valve className="org.apache.turbine.pipeline.DirectTargetValve" />

Find the target template, and merge it with the context. Well, it is a
render call, for example a velocity one.

QUESTION -> the same as the other one, where do I set that for the
target "user_logged_in", it should use "login.vm"?
QUESTION -> What is the difference by using directRender and Render. I
know that render just mix the context to the template, without printing
it to the output, but what are the difference between these approaches,
if not none? Why puting the renderer inside the context????

QUESTION -> the pull method can only be used inside turbine? I mean, I
know it is a concept, but the classes inside services.pull seems to be
turbine dependent.

One more thing, are these valves COMPLETELY independent? I mean, if I
remove one of the valves, everything should at least run (probably not
work, but run). I mean, if I just want the defaultaction and default
target, is it ok?

Some names of the valves are kinda misleading for me, for example,
DefaultTargetValve is a Default Valve for Targets, right? And not a
default_target Valve....

This pipeline idea for a webapp is SOOOOO coool, congratualtions

Thanks a LOT
Paulo


-----Original Message-----
From: Jason van Zyl [mailto:jvanzyl@zenplex.com]
Sent: Sonntag, 10. Februar 2002 14:25
To: Turbine Users List
Subject: Re: Turbine pipeline, how is th screens linked to
velocitytemplates and actions


On 2/9/02 8:13 PM, "Paulo Silveira" <Pa...@commworld.de> wrote:

> Hello
>
> I am discovering many things of turbine, and a lot of things are
> helping me a lot. I just used Torque and Velocity for sometime. But
> now I would like to try the whole TDK.
>
> Where can I find out more about the turbine pipeline?

This is strictly a t3 feature, you can find a little information here:

http://jakarta.apache.org/turbine/turbine-3/pipeline.html

These docs will be fleshed out during this week, there will probably be
a lot of movement next week. James, Daniel, Eric, Gonzalo and myself are
all looking at t3 features at the moment so we will probably make some
headway with the pipeline, new security model and the revamped rundata
and pull mechanism. There will be docs to explain all these thing :-)
The docs are sketchy right now but they won't be for long.

> Because I was no
> able to guess how it works perfectly, I have a lot of .vms, and I also

> have the actions, screens and layouts, but I do not know where the
> screens are tied with the velocity templates...

You definitely won't be able to guess how it works ;-) But we'll try to
rememdy the situation with some good documentation. I only barely just
started but I'll get something in their this week and there will be a
status report this coming Friday with a summary of what's going on.

> If anyone has an example to attach to the already done newapp, it
> would be very good. Any hello world page, with an action, screen and
> template.

The TDK has a small working sample app, and the testbed in turbine3 has
an example of how to use the pipeline.

>
> Thanks a lot
>
> -----Original Message-----
> From: dlr@finemaltcoding.com [mailto:dlr@finemaltcoding.com]
> Sent: Sonntag, 10. Februar 2002 01:28
> To: Turbine Users List
> Subject: Re: status report
>
>
> "Dave Everson" <dj...@mygolftrac.com> writes:
>
>> Can you please provide more instruction on how to configure
>> turbine-torque with turbine-2?  Going off the minimal documentation
>> provided, I keep getting the following error:
>>
>> [Fri Feb 08 23:59:19 CST 2002] -- ERROR -- torque could not be
>> initialized!
>> Exception:  java.lang.ClassCastException:
> org.apache.torque.Torque
>> Stack Trace follows:
>> java.lang.ClassCastException: org.apache.torque.Torque
>> at org.apache.turbine.Turbine.loadSubsystems(Turbine.java:861)
>> at org.apache.turbine.Turbine.init(Turbine.java:243)
>> at
>> org.apache.turbine.util.TurbineConfig.init(TurbineConfig.java:175)
>> at
>> com.smartdatasolutions.common.Framework.startup(Framework.java:23)
>> at
>> com.smartdatasolutions.handler.Rcm.initFramework(Rcm.java:190)
>> at com.smartdatasolutions.handler.Rcm.process(Rcm.java:44)
>> at com.smartdatasolutions.handler.Rcm.main(Rcm.java:210)
>>
>> What maybe causing this error?  My applications that worked before no

>> longer work.  I can't figure it out and with no documentation, I
>> don't
>
>> have a clue as to where check next.
>
> Looking at Turbine.java line 861 would be a good start.
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>

--

jvz.

Jason van Zyl

http://tambora.zenplex.org
http://jakarta.apache.org/turbine http://jakarta.apache.org/velocity
http://jakarta.apache.org/alexandria
http://jakarta.apache.org/commons



--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Turbine pipeline, some questions (long)

Posted by Jason van Zyl <jv...@zenplex.com>.
On 2/10/02 3:28 PM, "Paulo Silveira" <Pa...@commworld.de> wrote:

> Hello
> 
> This turbine 3 seems really promising, you are dealing with ALL problems
> that we have with web applications.
> Ok, here it go
> 
> Everytime that I enter in a web page, and I am using a Turbine webapp,
> it goes directly through the Turbine class.
> The doGet is invoked, then is starts some logs and checks. After this,
> the Pipeline is started. The pipeline is just a queue of classes
> (valves) that should have the invoke(RunData) method invoked.
> 
> The default turbine 3 case is: (can anyone help me and say if everything
> makes sense?)
> 

You have to remember that the pipeline you are analyzing is a mimic of the
classic pipeline and not necessarily ideal. That pipeline is an attempt to
represent the way turbine2 works, what falls out as standard in turbine3
remains to be seen.

I will take all your questions and attempt to answer them while I'm writing
documentation this week.

You also have to remember that anything that's there is also not cast in
stone and may still change.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>