You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by "Langley, John" <la...@telcordia.com> on 2006/08/25 20:45:11 UTC
JSP vs. Velocity?
Although the docs on the website suggest that JSP pages could be used as templates for Jetspeed layout... has anyone tried this? Is it really practical?
It appears that psml (which as I currently understand is intimately related to velocity, but then I haven't poked around too much) would be lost, which means you'd lose the current customizer functionality, etc. Right?
I'm just trying to get a handle on how big a job it might be to do an alternative layout scheme and what would have to be "re-coded".
Naturally my problem is the additional effort related to learning Velocity, etc. when what I really want to do is work with JSF/JSP and a Portal and not get hung up in things like "Where is $site.getMenu() defined and why I find it?"
Thanks in advance for any insights people can provide.
Langley
RE: JSP vs. Velocity?
Posted by Scott T Weaver <sc...@binary-designs.net>.
> Scott, I know we've had this discussion before and I'm not knocking
> velocity, I'm just saying that to many folks they just don't want to
> learn yet another technology and would prefer to work with what they
> know.
Yeah, I know. But JSPs are just so...icky ;-) Honestly, I would like to
see us get away from scripting languages entirely, and go with some sort of
tag-rewriting, component-based mechanism like Wicket and Tapestry use. I
actually have already written one I use primarily for URL rewriting. If I
get courageous I may try and write "Yet Another Theme Engine(tm)" using it.
-scott
> -----Original Message-----
> From: Aaron Evans [mailto:aaronmevans@gmail.com]
> Sent: Friday, August 25, 2006 3:19 PM
> To: Jetspeed Developers List
> Subject: Re: JSP vs. Velocity?
>
> John,
> I have the same issue. I have learned to live with Velocity for the
> moment, but I plan on replacing my velocity templates with JSP when I
> have time.
>
> One beacon of hope: If you look at the SVN head, the desktop theme
> decorators have been implemented using JSP and I think that should
> provide an adequate guide to writing a regular decorator in JSP (I
> hope!).
>
> Scott, I know we've had this discussion before and I'm not knocking
> velocity, I'm just saying that to many folks they just don't want to
> learn yet another technology and would prefer to work with what they
> know.
>
> -aaron
>
> On 8/25/06, Langley, John <la...@telcordia.com> wrote:
> > Although the docs on the website suggest that JSP pages could be used as
> templates for Jetspeed layout... has anyone tried this? Is it really
> practical?
> >
> > It appears that psml (which as I currently understand is intimately
> related to velocity, but then I haven't poked around too much) would be
> lost, which means you'd lose the current customizer functionality, etc.
> Right?
> >
> > I'm just trying to get a handle on how big a job it might be to do an
> alternative layout scheme and what would have to be "re-coded".
> >
> > Naturally my problem is the additional effort related to learning
> Velocity, etc. when what I really want to do is work with JSF/JSP and a
> Portal and not get hung up in things like "Where is $site.getMenu()
> defined and why I find it?"
> >
> > Thanks in advance for any insights people can provide.
> >
> > Langley
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
Re: JSP vs. Velocity?
Posted by Aaron Evans <aa...@gmail.com>.
John,
I have the same issue. I have learned to live with Velocity for the
moment, but I plan on replacing my velocity templates with JSP when I
have time.
One beacon of hope: If you look at the SVN head, the desktop theme
decorators have been implemented using JSP and I think that should
provide an adequate guide to writing a regular decorator in JSP (I
hope!).
Scott, I know we've had this discussion before and I'm not knocking
velocity, I'm just saying that to many folks they just don't want to
learn yet another technology and would prefer to work with what they
know.
-aaron
On 8/25/06, Langley, John <la...@telcordia.com> wrote:
> Although the docs on the website suggest that JSP pages could be used as templates for Jetspeed layout... has anyone tried this? Is it really practical?
>
> It appears that psml (which as I currently understand is intimately related to velocity, but then I haven't poked around too much) would be lost, which means you'd lose the current customizer functionality, etc. Right?
>
> I'm just trying to get a handle on how big a job it might be to do an alternative layout scheme and what would have to be "re-coded".
>
> Naturally my problem is the additional effort related to learning Velocity, etc. when what I really want to do is work with JSF/JSP and a Portal and not get hung up in things like "Where is $site.getMenu() defined and why I find it?"
>
> Thanks in advance for any insights people can provide.
>
> Langley
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
RE: JSP vs. Velocity?
Posted by Scott T Weaver <sc...@binary-designs.net>.
> -----Original Message-----
> From: Langley, John [mailto:langleyj@telcordia.com]
> Sent: Friday, August 25, 2006 2:45 PM
> To: jetspeed-dev@jakarta.apache.org
> Subject: JSP vs. Velocity?
>
> Although the docs on the website suggest that JSP pages could be used as
> templates for Jetspeed layout... has anyone tried this? Is it really
> practical?
Well, Velocity works well because we can control the rendering engine
instances. With JSPs you have to send includes/forwards back to the server
and the buffering up the response. I have seen other projects actually use
instances of Tomcats JSP engine to accomplish the samething we currently do
in Velocity, but it seems like more work than it is worth.
>
> It appears that psml (which as I currently understand is intimately
> related to velocity, but then I haven't poked around too much) would be
> lost, which means you'd lose the current customizer functionality, etc.
> Right?
Nope. PSML has no ties whatsoever to the rendering engine/view layer. It is
just an xml file that describes the contents of a portal page (along with
some security stuff sprinkled in)
>
> I'm just trying to get a handle on how big a job it might be to do an
> alternative layout scheme and what would have to be "re-coded".
I actually did this, and based the template creation off of PHP CMS engines
like Drupal, Xoops, etc. My template engine also removed the need for the
layout to be a portlet. Now everything is self-contained under individual
theme directories.
For me, this took me about a week (I am still tweaking things here and
there) to complete. However, since I wrote most of the original themeing
APIs I have quite a head start on someone who is new to JS2.
>
> Naturally my problem is the additional effort related to learning
> Velocity, etc. when what I really want to do is work with JSF/JSP and a
> Portal and not get hung up in things like "Where is $site.getMenu()
> defined and why I find it?"
Well, $ siteMenu.class will indicate what class $siteMenu actually is. From
there you can search the source. I did write some documentation on this
prior to the 2.0 release, have a look see here:
http://portals.apache.org/jetspeed-2/guides/guide-decorators.html. In the
docs, I try to give you an idea what the objects are in the Velocity context
and where/when they are created.
>
> Thanks in advance for any insights people can provide.
>
> Langley
Since I just finished rewriting my own themeing/layout valves, the concepts
are quite fresh in my mind, so feel free to hit the list up with anymore
questions you might have.
HTH,
-scott
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org