From: Brian Wisti Date: 2004-09-16T02:12:19+09:00 Subject: Re: Ruby equiv of Perl's HTML::Template module? --- Chris wrote: > Gavin Sinclair wrote: > >>Hopefully someone here fairly familiar with Perl can point me to a > Ruby > >>HTML templating system that works like Perl's HTML::Template. The > next > >>closest perferred equivalent would be Perl Template Toolkit. But I > >>really like HTML::Template a lot. > >> > >>I'm relatively new to Ruby (very slight dabbling since v1.6 circa > 2001), > >> so my opinions may not hold water, but I don't really consider > eRuby a > >>templating system. Maybe someone can help me see how it's not > anything > >>more than PHP or ASP except Ruby is used instead of PHP or > VBScript...? > >> > >>Anyway, my main interest is in finding something like Perl's > >>HTML::Template. Hopefully it exists somewhere in the Ruby world. > > > > > > I don't think there's a direct port, but there are some Ruby HTML > > templating libraries around (RDoc, cs/template, Amrita, ...). Can > you > > describe the benefits of the Perl solution? > > I'm not sure I am able to accurately articulate what I perceive the > benefits to be. The main "advantage" that I feel -- it's kind of a > "gut" thing -- is that the templates are, in a logical way, truly > only > markup. There is no "code" per se, loosely speaking. Strictly > speaking, I realize there are the loop and conditional tags, but > still > it "feels" like only HTML markup. I really like that because the > separation between logic and presentation is about as good as it > gets. > > All my opinion of course but those that use HTML::Template in the > Perl > world, I think would agree. I'm definitely going to check out some > of > the suggestions. I've held this infatuation with Ruby for a long > time, > and even adopted some "Ruby ways" in my Perl coding for a few years > now. > I've decided the only real way to bridge the gap is to force myself > to > stop using Perl (which I still really like) and just use Ruby full > out. > So I'm trying to find things that ease the transition, like > HTML::Template. I can't afford a lot of downtime, which has been the > > biggest strike against using Ruby -- I'm pretty fast, tight and > accurate > in hitting targets using Perl (if I may be so bold). But there are > several "Wow!" factors in Ruby that keep me hanging around... > wishing... :-) > > -ceo You can always take a poke at my own PageTemplate library. It was a sort of self-instructional project designed (ha! "Designed"? Right!) to address the homesickness I felt when using Ruby kept me away from HTML::Template. http://coolnamehere.com/products/pagetemplate/ You may find that it is incredibly raw and simplistic, and it might not even be what you were thinking of, but hey - what's one more templating library out there? Feel free to poke at it all you want :-) Kind Regards, Brian Wisti http://coolnamehere.com/