sgtmcd wrote:
Jonathan Revusky wrote:
sgtmcd wrote:
Will Glass-Husain wrote:
Ah, hi Jonathan how are you?
I think we discussed this issue extensively last time Jonathan was
on the
last a couple of years ago. Perhaps I might suggest the rest of the
Velocity community just refuse to be baited and stick to the topic
at hand?
(basically, ignore the temptation to have the last word).
As I remember, the topic was how new community members can help out.
Cheers,
WILL
[snip]
Cooler heads always prevail. I hadn't heard of freemarker until today.
Interesting.
I have too much already written in velocity and it all works.
You know, frankly, if you're in the market for a certain category of
thing, it makes some sense to survey what's out there.
three months ago, I googled for template engines, jsp alternatives,
template tools (I can't remember all the search terms) and freemarker
did not appear anywhere in the results.
You put me in an awkward position. I have to believe that you are saying
this in good faith, yet when I try obvious search strings on google,
FreeMarker comes up quite quickly.
For example, I justed googled: java template engine.
http://www.google.com/search?hl=en&q=java+template+engine&btnG=B%C3%BAsqueda&meta=
The first link is the Velocity main page. The second link is a list of
open-source template engines in java, which surely you would have looked
at had you googed that search term.
http://java-source.net/open-source/template-engines
And, there, FreeMarker, is the second one listed.
If you google: jsp alternative
http://www.google.com/search?hl=en&q=jsp+alternative&btnG=Search
The second link is a (admittedly outdated) article on FreeMarker.
But okay, it begs the question. You say Velocity is a great tool. What
else did you evaluate to draw that conclusion? You say it's a great tool
because it basically works -- modulo the various issues you have run
into and want to get involved so you can fix... But surely you realize
that any reasonably well known tool that you tried would basically work,
right? Just like any car you test drove would work...
It's funny about software. You know, in a regular market, how many
people buy the first item they come across without any comparison
shopping? Like, the very first car they ever test drove. "Well,
everything I tried to do in the car worked -- turning left, turning
right, reversing etcetera. So, I didn't look at anything else. I
bought it. A great car."
Yet this seems to be the norm in software.
there are things I would like to have better, so I decided to
volunteer my time.
In a way, that's to be commended. But isn't volunteering one's time to
add features still something of a last resort? Shouldn't one first
survey the space and see if another tool *already* does what you want?
yes and no. I using velocity. It is being used several places in
several applications. It is not my entire view layer. I use jsp's for
most of the view layer. I don't feel a template tool is the best fit
for interactive pages, etc. So, places that I have a model that I just
want to stick in a page pre formated, I create a template. I use
templates as bodies of emails, etc.
So, basically, I did research and found that velocity met my needs.
What I have found is that if I try and do something in velocity that
can't be done, it makes me step back and really think about all the
horrid logic I am trying to put into my view layer.
Well, sometimes it can and should be simplified. But other times, it is
just complex by nature. I would not automatically buy into this idea
that, just because Velocity can't handle your view logic, therefore, the
problems stems with you, your view is too complex. It could well be that
Velocity is just underpowered in terms of the problem you're addressing.
Or, put from another perspective, is there that much merit in
re-inventing the wheel?
not re-inventing the wheel. I am using a product that works and seems
to be adopted and accepted by a large portion of the j2ee community.
Well, if you spend time implementing features in Velocity that are
already available in another tool -- FreeMarker, say -- you are in a
sense re-inventing the wheel. There's already a tool that does it
out-of-the-box. If you want to do that it's up to you.
For example, your issue with comparing primitive types. Apparently, that
works in the latest Vel development build, but it has worked as you
would expect it to in FreeMarker in the stable public release for the
past several years.
I am digging through the wiki and source and will try my hand at
getting a patch done to fix an issue.
Velocity seemed dead to me, but still viable. It is highly
recommended in many j2ee/spring framework documents/books. In a
feature comparison, it does seem freemarker has a few more features.
However, what I couldn't do in the template, I did in my controller
and stuffed into the model. Not elegant, but it worked.
I am not one to let anyone give me the run around. I like to get
things done and see velocity as another great tool.
I don't really want to sound like such a mean guy, Shawn. But how on
earth do you know it's a great tool? By your own admission, you did
not know of the existence of FreeMarker -- probably Velocity's most
important competitor -- until today. So you did no survey of the
alternatives in this space. You have nothing to compare it to, yet
you're willing to say it's a great tool.
I don't take your comments as 'mean'. I do, however, think you are
frustrated that your product didn't get evaluated. I can respect that.
If I had found it via google as mentioned before, I would have evaluated
it.
Well, surely you found other things in Google. Did you evaluate them?
From what I am reading I am not sure it would have changed the
result. I wanted a fast, simple template tool, that by design is
feature poor. I use this phrase based on conversations that I have read
in several forumn archives.
The mantra that you want a presentation tool that is deliberately
underpowered is getting a bit stale at this point in history. It's a
line that is overused in this community, because like the "stability"
mantra, it is a ready-made rationalization for doing nothing. In fact,
you can do nothing, and point to what a wonderful job you're doing.
"Look how stable our product is. Look how feature poor it is. Isn't that
great?"
I think that, by now, most web app practitioners take that kind of thing
with a great big grain of salt. IMO, it's based on a misconception about
Model-view separation. The misconception is that presentation-related
logic is *necessarily* simple. Like any other programming logic, it is
*preferably* simple, and maybe *usually* simple, but not _necessarily_
so. Or _always_ either.
Having an underpowered presentation tool basically causes you to have to
put things that really are presentation logic in your java application
layer, and runs *against* MVC. That's what you're running into when you
say in an earlier note:
"However, what I couldn't do in the template, I did in my controller and
stuffed into the model. Not elegant, but it worked."
Jonathan Revusky
--
lead developer, FreeMarker project http://freemarker.org
Velocity-FreeMarker comparison page: http://freemarker.org/fmVsVel.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]