On Sun, May 23, 2010 at 8:17 PM, Nikolay Elenkov <nick(a)sarion.co.jp> wrote:
I don't know how much better JSF2 is at this, but is it really a
good idea to
use JSF for the mail module? Wouldn't it be better to use a real templating
engine (like Velocity) and not depend on JSF?
Huh?! What on earth does velocity have that makes it a "real"
templating engine that facelets does not have? I have used both, and I
found velocity far, far poorer in both syntax and semantics.
Plus it would be easier
to edit templates if they are not xhtml files, but simple text files.
Why? Cos XML files are not text files? Cos #foo #end is easier to edit
than <foo></end>? I don't see how what you just wrote can possibly be
true.
The usual
use case for mail templating is to provide files your users can edit if they
want to customize how email looks like. And you can't really expect them to
understand xhtml.
They are XML files. I can't imagine a Java developer who doesn't know
XML. I do know several Java developers who find velocity syntax
nausea-inducing. I'm one of them.
The only reason for them to be xhtml files is if you are sending
HTML-format email.
Please try actually reading the Seam mail documentation:
http://docs.jboss.com/seam/1.1.5.GA/reference/en/html/mail.html
I don't see how most of the functionality could be achieved in
velocity, eg. <m:from>, <m:to>, <m:subject>, <m:header>.
--
Gavin King
gavin.king(a)gmail.com
http://in.relation.to/Bloggers/Gavin
http://hibernate.org
http://seamframework.org