HTML template recommendations

Okay, right now I run my website with mod_ruby + eruby,
and I'm looking for something with a little more structure,
maybe something like Mason for Perl, or Struts for Java.

I found the Ruby Garden page listing some options
(http://www.rubygarden.org/ruby?HtmlTemplates), but it
doesn't really recommend one, and I'd like to hear from folks
with experience with one or more of the systems.

Suggestions?

I am unfamiliar with Mason or Struts (and your requirements, therefore,
seem a bit vague to me), but I am currently head over heels in love with
Amrita for templating. http://amrita.sourceforge.jp/

What I like about it is that it keeps the HTML in the template and the
Ruby in the script. To me that feels extremely clean (and because it's
well done it's also fairly flexible). Took literally minutes to learn to
use, too.

I've always balked at using template systems where the template looked
more confusing than Ruby code with CGI methods or hardcoded HTML. Amrita
was the answer to that.

-Michael

···

On Sun, 2005-01-09 at 10:06 +0900, Mark J. Reed wrote:

Okay, right now I run my website with mod_ruby + eruby,
and I'm looking for something with a little more structure,
maybe something like Mason for Perl, or Struts for Java.

Well, if what you're looking for is an actual MVC system for Ruby
similar to Apache Struts, there is of course Rails
(Ruby on Rails — A web-app framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern.). I've managed to create web applications
using Rails that are shorter than the XML config files for the
equivalent Struts application. :wink:

···

On Sun, 9 Jan 2005 10:06:25 +0900, Mark J. Reed <mreed@thereeds.org> wrote:

Okay, right now I run my website with mod_ruby + eruby,
and I'm looking for something with a little more structure,
maybe something like Mason for Perl, or Struts for Java.

Amrita for templating. http://amrita.sourceforge.jp/

+1 I'm also a big amrita fan.

What I like about it is that it keeps the HTML in the template and the
Ruby in the script. To me that feels extremely clean (and because it's
well done it's also fairly flexible). Took literally minutes to learn to
use, too.

Being able to design the look of a site in standard HTML and CSS, then
just dropping it into the correct file has felt clean and simple.
Since I'm usually time crunched, it's also a nice mental relief that
it's an easy fix if someone disagree's with my design choice (God
knows I've made some ugle things, I'm no artist). With Amrita, I can
just tell them to make a new template using what they know and just
put the correct 'id' tags in.

Like Michael said, the logic stays in ruby and the design stays in
HTML (fwiw, I use redcloth/bluecloth for content). no funky hybrid
templates.

Cameron

"Michael C. Libby" <mcl-ruby-talk@andsoforth.com> writes:

···

On Sun, 2005-01-09 at 10:06 +0900, Mark J. Reed wrote:

Okay, right now I run my website with mod_ruby + eruby,
and I'm looking for something with a little more structure,
maybe something like Mason for Perl, or Struts for Java.

I am unfamiliar with Mason or Struts (and your requirements, therefore,
seem a bit vague to me), but I am currently head over heels in love with
Amrita for templating. http://amrita.sourceforge.jp/

Amrita looks interesting. Haven't found much in the way of English doc on it,
but I'm still looking. I'm assuming the "model" can be any object that
implements hashish (heh) methods like ?

Cameron McBride wrote:

Amrita for templating. http://amrita.sourceforge.jp/

+1 I'm also a big amrita fan.

What I like about it is that it keeps the HTML in the template and the
Ruby in the script. To me that feels extremely clean (and because it's
well done it's also fairly flexible). Took literally minutes to learn to
use, too.

Being able to design the look of a site in standard HTML and CSS, then
just dropping it into the correct file has felt clean and simple. Since I'm usually time crunched, it's also a nice mental relief that
it's an easy fix if someone disagree's with my design choice (God
knows I've made some ugle things, I'm no artist). With Amrita, I can
just tell them to make a new template using what they know and just
put the correct 'id' tags in.

Like Michael said, the logic stays in ruby and the design stays in
HTML (fwiw, I use redcloth/bluecloth for content). no funky hybrid
templates.

Cameron

Amrita, how is the performace? And, how do you handle the security for a more serious interactive website? Thanks

Hello,

···

On Mon, 10 Jan 2005 09:41:22 +0900, Mark J. Reed <mreed@thereeds.org> wrote:

Amrita looks interesting. Haven't found much in the way of English doc on it,
but I'm still looking. I'm assuming the "model" can be any object that
implements hashish (heh) methods like ?

Download Amrita and take a look in the docs directory. There are a number
of good examples of usage in it in English.

Best,
Zev