velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Williams <adamsgeem...@gmail.com>
Subject Re: [ANN] Viento - WHY?
Date Fri, 07 Oct 2005 19:53:40 GMT
On 10/7/05, Jonathan Revusky <revusky@wanadoo.es> wrote:
> Well, you're getting some feedback, I'd say.

Yes, this is fun! I haven't seen this many messages on one subject in a while.

> It's impressive that you've
> gotten so far with so little time invested. You must be a talented guy.

I'd say. He went from knowing pretty much nothing about parsing
anything to having a simple template language that does quite a bit in
a very short period of time.

> Nonetheless, talented, energetic people often underestimate the full
> long-term time commitment in projects. If you really are serious about
> this, you're going to put in a lot more time, and I would have to say,
> that it's going to be a lot more than leveraging an already-existing
> codebase would have been.

Has he underestimated the cost of maintaining the project? Yes - he
/is/ a developer. Alas, he is not alone.

>
> Of course, the end result is that you get exactly what you want and so
> on, but surely, it's a lot more work.
>
> > So far, I've heard that we need a better
> > explanation of what's good about it. I could say the same for FreeMarker.
>
> Well, not really. C'mon... FreeMarker is an established, well regarded
> tool of a certain vintage, the project has been around for 6 years and
> has a lot of users -- people using it directly as a library and as a
> component in MVC web frameworks.  You have put out something completely
> new, which, by your own admission, has less than 40 hours of your time
> in it. As such, if you want people to give your stuff a try, there is a
> much, much stronger onus on you than on me, for example, to explain why
> they should do so. People have finite time to go try out software
> libraries. To argue that people should devote that time to trying out
> Sails rather than FreeMarker, say, you really have to provide some
> compelling arguments, because a rational person would tend towards the
> more mature, established, tested technology.
>
> (Side note: Maybe statements like the above are what are considered
> "abusive". And they may be harsh, but I say this in completely good
> faith, no malice, and I think it's completely fair.... also, what I am
> saying seems like common sense to me...)

I am learning to consider it all joy when I face various trials, as
all things work together for good for me. I certainly don't take
offense to anything you've said.

Sails is not a template language. It is a solution upon which dynamic
Web2.0 applications can be built. It has been using Velocity for 8
months. Austin and I both looked at changing it, and decided not to.
Viento is a name Austin put on the solution he had for the problems
/we/ are trying to solve for ourselves. Whether anyone else ever finds
it useful or not is obviously of question.

Consider Ant. Created to solve one guy's problems. Now the defacto
build foundation of Java. Good or bad? Some folks love it, some hate.
Some use it, some don't. Did it grow beyond it's creator? Absolutely.

I didn't take time to look at FreeMarker before we chose Velocity,
before Viento, and not much since this thread began. You would likely
never hire me, for lack of diligence in researching all the options.
Then, who has time to try out everything? It is a fact in my mind,
proven over and over, that things are often not what they appear -
especially when that appearance is created by those who created the
thing behind it.

>
> >
> > One of the primary differences, looking closer, is the philosophy of putting
> > real work in Java code, rather than template macros.
>
> Well, if I understand you, I think I disagree with this. Pretty
> strongly... If the macro is clearly display-related logic, why on earth
> should you want to maintain this in Java code?

Pragmatism. Refactoring support. Cleanliness (see your comment below
about 'whitespace-stripping filters' and FTL). Developers, that is,
those that I work with, are ALWAYS involved in making pretty HTML
dynamic. No, I don't believe it is because we have put String
generation in Java. Remember, MVC can be implemented in various ways,
accross more than one 'layer'.

You should look into Ruby on Rails if you write web applications. In
particular, consider all the little methods being called from the
templates. Look at their helpers. They enable RAD, clean AJAX,
understandability. God help me if I ever have to write that kind of
String generation in a Velocimacro, or in any template language. That
is why Apple's Web Objects, Microsoft's ASP.NET, Tapestry, Wicket, etc
etc all have the concept of Components. I don't enjoy programming
/that/ way, but is shows that *presentation logic* is implemented in
various ways, by smart folks.

> The whole point of a
> template engine is to get the display details out of your java code,
> isn't it?

No, not for me. I use a template language because I have to send
Strings to a browser. Writing Strings in Java sucks. No, if it was
easier, I would still use template langauges. A template language can
be thought of as an inversion of a programming language. In a
programming language, almost everything is logic. In a template
language, almost everything is a String.

>
> Still, even if I were to agree with you, it is not an argument against
> FreeMarker per se, since FreeMarker does allow you to implement these
> things on the java side, via the TemplateTransformModel API. It's
> basically the equivalent of what JSP calls filters. And of course,
> certain custom tags have to be implemented that way, such as
> whitespace-stripping filters and so on. They can't really be done
> cleanly on the FTL side.
>
>
> > We used to use macros
> > in Velocity, but soon found that tools were much more robust, easier to
> > maintain, etc.
>
> Well, was this inherently a problem with macros per se or simply because
> Velocity's macro system is quite flakey? I mean, for starters, in
> Velocity, you can't even define a local variable in a macro. Also, you
> can't put a set of macros in a separate mainspace. Any little helper
> variable you define is polluting your main namespace. I mean, in a large
> system, you'd be bound to hit glitches where different pieces of
> template code define a variable called $name or $display or whatever,
> and clobber some variable defined elsewhere.
>
> To say that macros are a bad idea, that the results are not robust,
> solely on the basis of your Velocity experience is not very convincing
> to me...

Granted. Though I still enjoy encapsulating duplication in something
that can be extended, changed, and otherwise arranged in such a
fashion as to make me /feel better/.

 adam williams

P.S. My apologies to those who are offended that this discussion
continues on this list. I plan to create user and developer lists over
at opensails.org. Perhaps we can migrate over there. In the meantime,
onsider it edifying or press delete ;)

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message