aspose file tools*
The moose likes Other Open Source Projects and the fly likes velocity vs jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "velocity vs jsp" Watch "velocity vs jsp" New topic
Author

velocity vs jsp

Mary Wallace
Ranch Hand

Joined: Aug 25, 2003
Posts: 138
Will velocity overtake jsp?

I read an article saying the velocity outperforms jsp by 35 to 45 percent.
Karthik Guru
Ranch Hand

Joined: Mar 06, 2001
Posts: 1209
The author has answered a part of your question here

As for velocity overtaking jsp is concerned, i cant see how irrespective of how fast and easier velocity is, it can kill jsp. Some of us here are'nt even aware of the velocity features, and am sure there are a lot more developers / technical leads taht are;nt aware of this too. Infact its the book promotion that made me go the jakarta website and dig out of information and now I have a fair idea. What i best liked was that it didnt take much time to learn the basics of velocity. At the same time I guess JSP is a ubiquitous standard.

I think we need to go through this book , have a good understanding and then convince management to get a project done using velocity. May be can implement some in-house stuff using velocity and then move on to some live projects.
Rob Harrop
Author
Ranch Hand

Joined: Nov 03, 2004
Posts: 44
I'm sad to say that I agree with Karthik, I just can't see how Velocity could ever replace JSP. JSP is known by many developers and has the benefit of being the standard - it will be difficult with Velocity to compete with that. Plus, JSP isn't actually so bad that it doesn't work - Velocity is just simpler and faster.

That said, I think Velocity will start to enjoy greater usage thanks to support in frameworks such as Spring which bring the existence of the engine to developers who would otherwise have been unaware that it existed.

Plus, I dont' really want to see Velocity kill JSP, I like the fact that there is a choice and that at least two of the choices are suitable for the job.

Rob
Mary Wallace
Ranch Hand

Joined: Aug 25, 2003
Posts: 138
Hi Rob,
I am referring to this article.

In that article author is saying Performance � my initial tests indicated that for simpler pages, Velocity outperforms JSPs by between 35 percent ad 45 percent. For more complicated pages, the difference starts to diminish (and after you add all the other factors that go into an average dynamic web page, it can sometimes drop to only a 5 percent difference), but the improvement is there for the taking.

But I agree with you.
Karthik Guru
Ranch Hand

Joined: Mar 06, 2001
Posts: 1209
Originally posted by Mary Wallace:
For more complicated pages, the difference starts to diminish (and after you add all the other factors that go into an average dynamic web page, it can sometimes drop to only a 5 percent difference)


thanks for this!
Mary Wallace
Ranch Hand

Joined: Aug 25, 2003
Posts: 138
But still 5% is 5%
Alexandru Popescu
Ranch Hand

Joined: Jul 12, 2004
Posts: 995
Originally posted by Rob Harrop:
I'm sad to say that I agree with Karthik, I just can't see how Velocity could ever replace JSP. JSP is known by many developers and has the benefit of being the standard - it will be difficult with Velocity to compete with that. Plus, JSP isn't actually so bad that it doesn't work - Velocity is just simpler and faster.


Rob I have to disagree with you in big lines: actually JSP isn't bad at all, just some practices are wrong (this may be true also when using Velocity). Moreover I do not think that Velocity provides the power of JSP ( + custom tags).

./pope


blog - InfoQ.com
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
I've heard more than one Velocity user say that the thing that they most like about Velocity is exactly that -- Velocity doesn't have enough power to let you shoot yourself in the foot.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Alexandru Popescu
Ranch Hand

Joined: Jul 12, 2004
Posts: 995
LOL. (maybe they should go basic way :-) ... being not rude, just kidding).

./pope
Karthik Guru
Ranch Hand

Joined: Mar 06, 2001
Posts: 1209
Originally posted by Ali Pope:

Moreover I do not think that Velocity provides the power of JSP ( + custom tags).


Can you elaborate on this. I mean what are the issues with velocimacros?
Alexandru Popescu
Ranch Hand

Joined: Jul 12, 2004
Posts: 995
I haven't said that there are issues . What I really meant is that behind custom tags in JSP you can have a lot functionality which is not the case for Velocity templates (if I go deeper, I think that you can do something in this direction using calls to java objects from the template, but I might be wrong).

./pope
Rob Harrop
Author
Ranch Hand

Joined: Nov 03, 2004
Posts: 44
There is nothing you can do with JSP tags that you can't do with Velocimacros or custom drectives. Velocity has one advantage over JSP in that you can actually build dynamic snippets of VTL and have your template evaluate them if you have some particularly complex rendering needs - try that with JSP!

Rob
Alexandru Popescu
Ranch Hand

Joined: Jul 12, 2004
Posts: 995
Rob I am not quite familiar with this. Can you provide a very, very short example? thanks.

./pope
Eusebio Floriano
Ranch Hand

Joined: Mar 07, 2004
Posts: 237
I�ve never tried Velocity.
Is it very popular in enterprise applications ?

Regards,


SCJP 1.4 / 5.0 - SCBCD 1.3 - SCWCD 1.4 - IBM 484
Alexandru Popescu
Ranch Hand

Joined: Jul 12, 2004
Posts: 995
I am not quite sure what you mean by popular in enterprise applications. I can tell you that I am using it and I am satified. More, you can find a list of tools/site using Velocity here.

./pope
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
My impression has been that Velocity is very popular in code generation and "open sourceish" applications, but rarely used in big "corporate" applications.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: velocity vs jsp