Velocity Templates

I've never really used Velocity templates before.
Sure I checked them out, but I have written my own template engine, Jostraca, so I've never seen the need to use Velocity.

Well, Velocity templates are really pretty easy to pick up. One thing that I did find was that they are rather messy. Now, I know, JSPs and PHP are even messier. In fact, it's all rather ugly. That's one of the reasons I added a general replacement function to Jostraca, so that the template code would look natural, and not much like a template at all – you can code things like: FirstName LastName instead of <%=firstName%> <%=lastName%>. It's not so important for HTML, but it makes source code templates a lot easier to read. But hey, Velocity's not so bad! (Maybe I'll add Jostraca support to Roller, [evil laugh]).

I decided to create my own theme, instead of customising via the web interface. For a start, I get to edit the files in a normal editor, and secondly, it seems like the best way to have a more permanent record of the design. Anyway, it seems to work for the moment – you just hit F5 to reload on the theme preview page and you can check your changes right away. For content however (such as the text of the about page) I am sticking with the web interface, and thus storing that in the database.

I've started with Roller 1.2, which does not have Atom 1.0 support. So I went over to the Roller source and grabbed the latest version of the atom.vm flavor and used that after a bit of tweaking. I'm hoping it will all be OK once I upgrade to 2.0

This entry was posted in Java. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *