Re:Yesod 1.0 - a robust, friendly, high performance web fram...
by cies on Monday April 09, 2012 @07:15PM
(#3819785)
> Snap offers heist as a default template engine. It is nothing like JSP at all, it is a pure html template engine like lift or zope's templates. There is no embedding any sort of logic or code in the template at all.
As a reference: also think Zope's templates and Lift are like JSP. But after closer inspection is see your point that JSP allows some in-template arithmetic that other don't.
> Yesod over-uses it where it is entirely unnecessary. You lose composability and have to learn another language.
I think we can safely agree to disagree on this one. :) Small DSL is not another language in my book; "templates" do not need the same kind of composability that "code" benefits so much from. As you say, it reduces "boilerplate and works well for that purpose" -- great!
Re:Yesod 1.0 - a robust, friendly, high performance web fram...
by papsosouid on Monday April 09, 2012 @07:38PM
(#3819858)
Are you saying JSP and meaning something else? I can't figure out any way you could think that other than confusion over what JSP is. JSP is where markup and code are mixed together, using a special delimiter to start and end code parts. Just like ASP and PHP and hamlet and virtually all template engines. Lift/heist/zpt are the exceptions to the rule.
Snap offers heist as a default template engine. It is nothing like JSP at all, it is a pure html template engine like lift or zope's templates. There is no embedding any sort of logic or code in the template at all.
>How is that a problem? I say: "Template Haskell and Quasi-Quoting FTW!"
Using is fine, it is intended to reduce boilerplate and works well for that purpose. Yesod over-uses it where it is entirely unnecessary. You lose composability and have to learn another language.