Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
~hm
The problem is that using JSP's will lead even good programmers to take shortcuts. Plus it is harder to teach JSP (even the right way) to someone who designs web sites. When I wrote my own view framework many years ago, one of my key goals was that I should be able to explain it completely to an HTML expert in less than one hour. Velocity passes this test. JSP does not. Plus a Velocity page actually looks sort of like the end resulting page in a broswer. Take my last template example and display it in a browser. It's actually quite easy to see what the resulting page is going to look like without having a Java programmer near by.Originally posted by Gregg Bolinger:
Doesn't JSP 2.0's EL try and do pretty much the same thing as Velocity now? I mean if I do something like...
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
The problem that I have with "features" is tbat all they really add is complexity. I haven't looked at FreeMarker in any detail but one thing is defintely wrong on their comparison page. Development of Velocity has not been abandoned as they claim.Originally posted by Gregg Bolinger:
Tom, have you ever looked at FreeMarker? It appears to be pretty much the same as velocity with a few extra features.
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Thanks,<br />Durgaprasad<br />SCJP1.4, SCWCD1.4, SCBCD1.3,<br />SCEA
Originally posted by Thomas Paul:
The problem is that using JSP's will lead even good programmers to take shortcuts. Plus it is harder to teach JSP (even the right way) to someone who designs web sites. When I wrote my own view framework many years ago, one of my key goals was that I should be able to explain it completely to an HTML expert in less than one hour. Velocity passes this test. JSP does not. Plus a Velocity page actually looks sort of like the end resulting page in a broswer. Take my last template example and display it in a browser. It's actually quite easy to see what the resulting page is going to look like without having a Java programmer near by.
Originally posted by Durgaprasad Guduguntla:
This article is simple and nice. But when I tried this example on Tomcat, I am getting an exception:
I placed hello.vm in the WEB-INF/templates folder only. Does anyone get this error. Please advise.
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Thanks,<br />Durgaprasad<br />SCJP1.4, SCWCD1.4, SCBCD1.3,<br />SCEA
I'm alergic to Mondays
Originally posted by Greg Nudelman:
Good article! We've been using Velocity for the last year in production and found it a "superb" development environment. As to Velocity vs. JSP question, V is a much better solution, because it has:
1) Natural, easy to read, learn, and remember syntax (no curly braces, no XSLT, or goofy loops...)
2) Template is easily visible as HTML in the browser
3) No import statements, or any other junk in the template
4) quick reload (no compilation step as in JSP)
5) Error reporting is superb (JSP often points to line 1000 of your 500-line template, forcing you to go find and debug the compiled template)
6) No temptation of putting Java code in the template.
7) Excellent foreach construct and null object handling
Velocity does just one thing, but it does it "superbly". I truly believe using it shaved several months off our total effort, and made development a pleasure again. Anyone interested in solid MVC development practices should check it out.
Thanks again for getting the word out!
Greg Nudelman
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |