Forum: Ruby on Rails templating language questions

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Nicholas Faiz (Guest)
on 2009-05-20 19:33
(Received via mailing list)
Hello,

I'm experimenting with a xhtml templating language and have some
questions about ActionPack, particularly to do with compilable
templates. I'm mostly looking for further information about compilable
templates.

The templating language currently works, though it isn't a compilable
template handler. I've yet to benchmark it, but it seems to be running
quite fast (it's built on nokogiri, which is fast).

I noticed that the erb and haml templating integrations are compilable -
that is, they seem to return a string containing a representation of the
template with ruby statements to be evaluated against the local scope;
this string is stored as a method on
ActionView::Base::CompiledTemplates. The code is in
ActionView::Renderable. At any rate, my approach doesn't do this at all
- it simply interprets the template, renders it, then passes it back.
This is working very well for the prototype and I'm happy with it. I
wanted to ask if anyone had experience in this area, though, and if it
was a mistake to use a templating language which isn't compilable in the
ActionView::TemplateHandlers::Compilable sense?

The templating language is called Renshi, btw, and is loosely based on
Python's Genshi. It's not ready for general use yet, but hopefully it
will be presently.

http://github.com/biv/renshi/tree/master

Regards,
Nicholas Faiz
Marnen L. (Guest)
on 2009-05-20 19:42
Nicholas Faiz wrote:
[...]
> The templating language is called Renshi, btw, and is loosely based on
> Python's Genshi. It's not ready for general use yet, but hopefully it
> will be presently.
>
> http://github.com/biv/renshi/tree/master

Looks interesting.  May I suggest that you investigate the Kwartz
project?  It's got an almost identical template language, but with the
added feature that data is kept out of the markup altogether.

>
> Regards,
> Nicholas Faiz

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
removed_email_address@domain.invalid
This topic is locked and can not be replied to.