Jakarta Velocity Tools 1.0 Released
Nathan Bubna writes "Jakarta Velocity Tools is a newly released project from the Apache Software Foundation. It provides servlets and tools for rapid, clean, MVC web development with Velocity, tools for using Velocity
with the Jakarta Struts framework, and a set of generic tools to help with any Velocity project."
I'm considering building a WebApp using JBoss + Tomcat + MySQL. However I'm still undecided on how to develop the frontend...I'm thinking JSP + something. Has anyone had any success with Velocity in a real-world product?
Keep going!! Given todays news and extrapolating I think if you masturbate MORE than five times a day (the recommend allowance) you will cure all your ailments.
I was told this by a travelling salesman - I looked like a sensible man he said!, then he was gone - with 40 of my dollars. But I, I had the information....
I messed with Velocity but found it to be somewhat of a pain in the butt. I much prefer FreeMarker. Similar features to Velocity, just easier to use. Oh and the documentation kicks ass, which is one area I found lacking in velocity.
And no, I am not a freemarker developer, just a happy user.
If you haven't used JSTL I strongly suggest that you give them a look as well. Very simple to use, very extensive and really make JSP alot faster to develop and maintain.
Yet Another Template Language. Or is there a YATL out there already? VTL at a glance does not look very intuative or powerful (at a glance). If I am going to have code mixed with html, might as well make it Java, cause thats what the back end is. I'll stop trolling now, it's probably OK once you get used to it. (but so is hypothermia) Ok, now I'll stop trolling.
TallGreen CMS hosting
Hey, don't knock donkey balls!
You can partially separate logic and presentation. How much separation is appropriate depends on the project...actually on individual instances within the project of logic/presentation relationships.
There are lots of people out there who do too little separation of presentation and logic. They'll end up with a better end result if they use Velocity, Freemarker or webmacro. There may also be people out there who produce overly bland user interfaces because they try too hard to separate presentation and logic. They would benefit from JSP, BRL, Tea, PHP, CF, or somesuch. Although with BRL it's easier to extricate the logic from the presentation if you start out with too little separation.
OK, enough ranting. It's just that this "100% separation" fiction is one of my pet peeves.
You can use BRL that way. See the testsuite directory in the source distribution for how to process BRL files without any web framework. Additionally, there's a builtin function for LaTeX-escaping strings, in case you want really nicely formatted PDF reports, as I do. Additionally, when you embed code to generate an email within a file that generates a web page, the same nice template syntax is used as at the top level, unlike any similar technology that I'm aware of.
Since people are talking here about the separation of presentation and logic code, I'd simply like to throw in another toolkit which achieves this wonderfully: Janx (demo here).
While total separation is not the goal, the fact that after only a couple of hours of me explaining the basics of flow control and context to purely HTML/Interface folks they were able to take full control of the user interface development and maintenance of an active online magazine.
Mod me as a troll if you will, but I've yet to find a toolset as simple as Janx (powerful too, though it does need some updating).
I've used jsp, WebMacro, jsp+struts, and a few other other presentation layers. I really like Velocity because it enforces the separation between the controller and the view (unlike jsp-based templating languages, which often get abused to include business logic by poor programmers who don't know what they should be doing). Since you have to explicitly put something in the velocity context via the controller, the view can only display what has been put in its context.
The other advantage of velocity is its very simple scripting language. It's a lot easier than some of the tag-based templating tools I have seen. For a developer, it's not a big selling point, but if you're working with a designer, it can make a big difference.
- Vincit qui patitur.
I'd love to hear what you'd suggest. You sound like you know what you're talking about.