5 ms·
>Snap is like Servlets+JSP (especially wrt templating, besides that it is quite similar to Yesod) Snap offers heist as a default template engine. It is nothin
by papsosouid 15y ago
>Snap is like Servlets+JSP (especially wrt templating, besides that it is quite similar to Yesod)
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.
- cies 15y ago> 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!
- papsosouid 15y agoAre 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.