Re: [OS-webwork] Velocity Views

2003-02-07 Thread Joseph Ottinger
On Fri, 7 Feb 2003, Kelvin Tan wrote:

 Interesting.

 flamebaitI happen to come from the Turbine + hardcore Velocity (JSP sucks,
 mostly) camp, so would be interested to know why you choose JSP + Velocity, and
 not either. /flamebait

 Does it have anything to do with WebWork support for either?

Probably has something to do with view neutrality and the fact that
WebWork is a COMPONENT and not a way to force people into doing things in
ONE WAY and ONE WAY only. Come on, man, think. If you're going to troll,
try harder. Even Struts is view-neutral (for the most part).

-
Joseph B. Ottinger [EMAIL PROTECTED]
http://enigmastation.comIT Consultant



---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



Re: [OS-webwork] Velocity Views

2003-02-07 Thread Marco Papini
I'm actually using Velocity for everything.
For data retrieving, I created a generic Action class (that extends 
ActionSupport) which is extended by all actions.
I've placed a getAction() method that returns the action itself so it 
can be accessed from the velocity template as $action.
For instance, if I need to retrieve a particular user I'll put:

#set($aUser = $action.getUser($userId))

Hope this can be of any help.

Kelvin Tan wrote:
Thanks. Thought as much...

I'm guessing most WW users don't use Velocity?

KT


--

Marco Papini



---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



Re: [OS-webwork] Velocity Views

2003-02-07 Thread Scott Farquhar
What advantage does this have over the included WebworkVelocityServlet?

In this model, you don't have access to the valuestack?

Cheers,
Scott

Marco Papini wrote:

I'm actually using Velocity for everything.
For data retrieving, I created a generic Action class (that extends 
ActionSupport) which is extended by all actions.
I've placed a getAction() method that returns the action itself so it 
can be accessed from the velocity template as $action.
For instance, if I need to retrieve a particular user I'll put:

#set($aUser = $action.getUser($userId))

Hope this can be of any help.

Kelvin Tan wrote:

Thanks. Thought as much...

I'm guessing most WW users don't use Velocity?

KT





--

ATLASSIAN - http://www.atlassian.com
Expert J2EE Software, Services and Support
---
Need a simple, powerful way to track and manage issues?
Try JIRA - http://www.atlassian.com/software/jira



---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



Re: [OS-webwork] Velocity Views

2003-02-07 Thread Rickard Öberg
Scott Farquhar wrote:

What advantage does this have over the included WebworkVelocityServlet?


He never said that he wasn't using the WebworkVelocityServlet. The 
method he describes is mostly just to get access to the action as a 
Velocity object. Otherwise it would be impossible to call methods, as he 
described.

/Rickard

--
Rickard Öberg
[EMAIL PROTECTED]
Senselogic

Got blog? I do. http://dreambean.com



---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


Re: [OS-webwork] Velocity Views

2003-02-07 Thread Scott Farquhar


Rickard Öberg wrote:

He never said that he wasn't using the WebworkVelocityServlet. The 
method he describes is mostly just to get access to the action as a 
Velocity object. Otherwise it would be impossible to call methods, as he 
described.

I'm confused.  Isn't the action at the top of the valuestack after it is 
called?  so $abc calls action.getAbc() ?

--

ATLASSIAN - http://www.atlassian.com
Expert J2EE Software, Services and Support
---
Need a simple, powerful way to track and manage issues?
Try JIRA - http://www.atlassian.com/software/jira



---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


[OS-webwork] Velocity Views

2003-02-06 Thread Kelvin Tan
For JSP views, its simple enough to simply forward to them, since they are able
to retrieve the required data to render.

Velocity templates are dumb and operate on a push-basis (except for the use of
velocity tools), in the sense that they require objects to be placed in the
context for them. What's the best practice for accomplishing this if forwarding
from an action?

Regards,
Kelvin


The book giving manifesto - http://how.to/sharethisbook




---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



Re: [OS-webwork] Velocity Views

2003-02-06 Thread Scott Farquhar
Kelvin,

See the velocity examples that ship with webwork, and also compare the 
velocity templates (in /template/xhtml) with the JSP templates in the 
same directory.

Velocity uses the velocity servlet, which allows the values to be looked 
up on the stack if they are not found in the context.  You may want to 
have a look at the source for the WebWorkVelocityServlet.

Cheers,
Scott

Kelvin Tan wrote:
For JSP views, its simple enough to simply forward to them, since they are able 
to retrieve the required data to render. 

Velocity templates are dumb and operate on a push-basis (except for the use of 
velocity tools), in the sense that they require objects to be placed in the 
context for them. What's the best practice for accomplishing this if forwarding 
from an action?

Regards,
Kelvin


The book giving manifesto - http://how.to/sharethisbook




---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld http://www.vasoftware.com
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


--

ATLASSIAN - http://www.atlassian.com
Expert J2EE Software, Services and Support
---
Need a simple, powerful way to track and manage issues?
Try JIRA - http://www.atlassian.com/software/jira



---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



Re: [OS-webwork] Velocity Views

2003-02-06 Thread Kelvin Tan
I have checked them out, but the context is no different from the stack. At
some point, the objects you need have to be placed on the stack. The question
is, what is the best practice for where these objects should be added? In the
action?

I've found that its often advantageous, when working with templating engines
especially (which require two components- servlet + template), to separate view
logic (retrieval of data to display) from action logic (which actually does
something, ie modify data, etc). Wondering how WebWork supports this...


Regards,
Kelvin


The book giving manifesto - http://how.to/sharethisbook


On Thu, 06 Feb 2003 23:27:21 +1100, Scott Farquhar said:
Kelvin,

See the velocity examples that ship with webwork, and also compare
the velocity templates (in /template/xhtml) with the JSP templates
in the same directory.

Velocity uses the velocity servlet, which allows the values to be
looked up on the stack if they are not found in the context.  You
may want to have a look at the source for the
WebWorkVelocityServlet.

Cheers, Scott

Kelvin Tan wrote:
For JSP views, its simple enough to simply forward to them, since
they are able to retrieve the required data to render.

Velocity templates are dumb and operate on a push-basis (except for
the use of velocity tools), in the sense that they require objects
to be placed in the context for them. What's the best practice for
accomplishing this if forwarding from an action?

Regards, Kelvin


The book giving manifesto - http://how.to/sharethisbook




---
This SF.NET email is sponsored by: SourceForge Enterprise Edition +
IBM + LinuxWorld http://www.vasoftware.com
___ Opensymphony-
webwork mailing list [EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork






---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



Re: [OS-webwork] Velocity Views

2003-02-06 Thread Kelvin Tan
Not really. Velocity templates are dumb. They don't retrieve data to display
(not in the original push model at least. Turbine and Scarab came up with a
Pull model), they display data given to them in the context.

I see Velocity templates as containing presentation logic, not view logic.
Maybe I'm being pedantic, but I define presentation logic as containing the
formatting, positional and aesthetic elements, and view logic as retrieving the
data for the presentation logic to render.

Let me give you an example. Say we have a simple view logic class which given
a UUID, retrieves and materializes a User object from the database. Now, this
view can be reused by any template which requires the retrieval of a single
User, like a template for display a user's profile (read-only), a template for
display of user profile (as a form), perhaps a template which requires renders
various stuff on the same page, one of which is the display of user profile...

Do you see where I'm driving at?

Regards,
Kelvin


The book giving manifesto - http://how.to/sharethisbook


On Thu, 6 Feb 2003 17:33:00 -0800, Patrick Lightbody said:

Maybe I'm missing the question. The Action does something, the
velocity template retrieves data to display.

-Pat




---
This SF.NET email is sponsored by: SourceForge Enterprise Edition +
IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___ Opensymphony-webwork
mailing list [EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork





---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



Re: [OS-webwork] Velocity Views

2003-02-06 Thread Patrick Lightbody
Yup, makes sense. Sounds like you need action chaining possibly.

- Original Message -
From: Kelvin Tan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, February 06, 2003 5:46 PM
Subject: Re: [OS-webwork] Velocity Views


 Not really. Velocity templates are dumb. They don't retrieve data to
display
 (not in the original push model at least. Turbine and Scarab came up with
a
 Pull model), they display data given to them in the context.

 I see Velocity templates as containing presentation logic, not view logic.
 Maybe I'm being pedantic, but I define presentation logic as containing
the
 formatting, positional and aesthetic elements, and view logic as
retrieving the
 data for the presentation logic to render.

 Let me give you an example. Say we have a simple view logic class which
given
 a UUID, retrieves and materializes a User object from the database. Now,
this
 view can be reused by any template which requires the retrieval of a
single
 User, like a template for display a user's profile (read-only), a template
for
 display of user profile (as a form), perhaps a template which requires
renders
 various stuff on the same page, one of which is the display of user
profile...

 Do you see where I'm driving at?

 Regards,
 Kelvin

 
 The book giving manifesto - http://how.to/sharethisbook


 On Thu, 6 Feb 2003 17:33:00 -0800, Patrick Lightbody said:
 
 Maybe I'm missing the question. The Action does something, the
 velocity template retrieves data to display.
 
 -Pat
 
 
 
 
 ---
 This SF.NET email is sponsored by: SourceForge Enterprise Edition +
 IBM + LinuxWorld = Something 2 See!
 http://www.vasoftware.com
 ___ Opensymphony-webwork
 mailing list [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork





 ---
 This SF.NET email is sponsored by:
 SourceForge Enterprise Edition + IBM + LinuxWorld
http://www.vasoftware.com
 ___
 Opensymphony-webwork mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



Re: [OS-webwork] Velocity Views

2003-02-06 Thread Kelvin Tan
Thanks. Thought as much...

I'm guessing most WW users don't use Velocity?

KT

On Thu, 6 Feb 2003 17:47:30 -0800, Patrick Lightbody said:
Yup, makes sense. Sounds like you need action chaining possibly.

- Original Message -
From: Kelvin Tan [EMAIL PROTECTED] To: opensymphony-
[EMAIL PROTECTED] Sent: Thursday, February 06, 2003
5:46 PM Subject: Re: [OS-webwork] Velocity Views


Not really. Velocity templates are dumb. They don't retrieve data
to
display
(not in the original push model at least. Turbine and Scarab came
up with
a
Pull model), they display data given to them in the context.

I see Velocity templates as containing presentation logic, not view
logic.
Maybe I'm being pedantic, but I define presentation logic as
containing
the
formatting, positional and aesthetic elements, and view logic as
retrieving the
data for the presentation logic to render.

Let me give you an example. Say we have a simple view logic class
which
given
a UUID, retrieves and materializes a User object from the database.
Now,
this
view can be reused by any template which requires the retrieval of
a
single
User, like a template for display a user's profile (read-only), a
template
for
display of user profile (as a form), perhaps a template which
requires
renders
various stuff on the same page, one of which is the display of user
profile...

Do you see where I'm driving at?

Regards, Kelvin


The book giving manifesto - http://how.to/sharethisbook


On Thu, 6 Feb 2003 17:33:00 -0800, Patrick Lightbody said:

Maybe I'm missing the question. The Action does something, the
velocity template retrieves data to display.

-Pat




---
This SF.NET email is sponsored by: SourceForge Enterprise Edition
+ IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___ Opensymphony-
webwork mailing list [EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork





---
This SF.NET email is sponsored by: SourceForge Enterprise Edition +
IBM + LinuxWorld
http://www.vasoftware.com
___ Opensymphony-
webwork mailing list [EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



---
This SF.NET email is sponsored by: SourceForge Enterprise Edition +
IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___ Opensymphony-webwork
mailing list [EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork





---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



Re: [OS-webwork] Velocity Views

2003-02-06 Thread Kelvin Tan


On Thu, 6 Feb 2003 21:44:46 -0800, Patrick Lightbody said:
I use both. This is a total guess, but I'd say maybe 25% use
velocity.

-pat


So for V, do you use view logic in a separate action and action-chain, or do
you just place everything in one action (business + view logic)?

What about others on the list, how do you do it?

KT



---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



Re: [OS-webwork] Velocity Views

2003-02-06 Thread Kelvin Tan
Interesting.

flamebaitI happen to come from the Turbine + hardcore Velocity (JSP sucks,
mostly) camp, so would be interested to know why you choose JSP + Velocity, and
not either. /flamebait

Does it have anything to do with WebWork support for either?

On Thu, 6 Feb 2003 22:14:47 -0800, Patrick Lightbody said:
I do a few different things depending on the weather, how much I ate
that day, and the time of day:

1) not even use Actions for the deeper layers and just use normal
java objects for the business code 2) use Actions, but not chain and
instead call them with GenericDispatcher (a la OSWorkflow) 3) use
actiong chaining

-Pat

- Original Message -
From: Kelvin Tan [EMAIL PROTECTED] To: opensymphony-
[EMAIL PROTECTED] Sent: Thursday, February 06, 2003
10:11 PM Subject: Re: [OS-webwork] Velocity Views




On Thu, 6 Feb 2003 21:44:46 -0800, Patrick Lightbody said:
I use both. This is a total guess, but I'd say maybe 25% use
velocity.

-pat


So for V, do you use view logic in a separate action and action-
chain, or
do
you just place everything in one action (business + view logic)?

What about others on the list, how do you do it?

KT



---
This SF.NET email is sponsored by: SourceForge Enterprise Edition +
IBM + LinuxWorld
http://www.vasoftware.com
___ Opensymphony-
webwork mailing list [EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



---
This SF.NET email is sponsored by: SourceForge Enterprise Edition +
IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___ Opensymphony-webwork
mailing list [EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork





---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



Re: [OS-webwork] Velocity Views

2003-02-06 Thread Rickard Öberg
Kelvin Tan wrote:

Interesting. 

flamebaitI happen to come from the Turbine + hardcore Velocity (JSP sucks, 
mostly) camp, so would be interested to know why you choose JSP + Velocity, and 
not either. /flamebait

Does it have anything to do with WebWork support for either? 

I'm currently using Velocity for about 90%, and JSP for the rest. The 
10% JSP are usually forms, since the form tags are not available in 
Velocity yet.

/Rickard

--
Rickard Öberg
[EMAIL PROTECTED]
Senselogic

Got blog? I do. http://dreambean.com



---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork