[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

HTML template recommendations

Mark J. Reed

1/9/2005 1:06:00 AM

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?Htm...), 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?

6 Answers

Michael C. Libby

1/9/2005 1:37:00 PM

0

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.sourc...

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



Cameron McBride

1/9/2005 5:58:00 PM

0

> Amrita for templating. http://amrita.sourc...

+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


Sarah Tanembaum

1/9/2005 9:35:00 PM

0

Cameron McBride wrote:
>>Amrita for templating. http://amrita.sourc...
>
>
> +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

Mark J. Reed

1/10/2005 12:37:00 AM

0

"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.sourc...

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 []?

Dido Sevilla

1/10/2005 12:53:00 AM

0

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.
>

Well, if what you're looking for is an actual MVC system for Ruby
similar to Apache Struts, there is of course Rails
(http://www.rubyon...). I've managed to create web applications
using Rails that are shorter than the XML config files for the
equivalent Struts application. ;)


Zev Blut

1/11/2005 8:17:00 AM

0

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