Perl with HTML::Mason or Ruby with Eruby?

hello

I told a friend how cool Ruby is and he imediatelly liked it.
but now he switched to Perl again because of HTML::Mason
(http://www.masonhq.com)

I am now Mason Guru and told hin that there is Eruby.
but Mason seems to have more cool features like Eruby (according to him).

Is there something like HTML::Mason for Ruby ??

I generally think that mixing HTML and Programm Code is no good
idea but it has it’s advantages.
and using XML/XSLT is often complicated and performance is bad.

what are your experiences with Eruby and maybe with HTML::Mason ??

Mason seems to be cool and I really like Perl but using Ruby
would be even more fun :slight_smile:

and Python has webware (http://webware.sf.net) which has even more
cool features including Python Server Pages.

any thoughts or hints are welcome.

one more thing would be something where I could write my owns tags
like TagLibs for Perls Axkit (http://www.axkit.org)

markus

Amrita is very cool, and simple to use.

CRMとは何だろう

Div and CGIKit are great if you need to do more complex web aps.

-a

···

On Thu, 21 Nov 2002, Markus Jais wrote:

hello

I told a friend how cool Ruby is and he imediatelly liked it.
but now he switched to Perl again because of HTML::Mason
(http://www.masonhq.com)

I am now Mason Guru and told hin that there is Eruby.
but Mason seems to have more cool features like Eruby (according to him).

Is there something like HTML::Mason for Ruby ??

I generally think that mixing HTML and Programm Code is no good
idea but it has it’s advantages.
and using XML/XSLT is often complicated and performance is bad.

what are your experiences with Eruby and maybe with HTML::Mason ??

Mason seems to be cool and I really like Perl but using Ruby
would be even more fun :slight_smile:

and Python has webware (http://webware.sf.net) which has even more
cool features including Python Server Pages.

any thoughts or hints are welcome.

one more thing would be something where I could write my owns tags
like TagLibs for Perls Axkit (http://www.axkit.org)

markus

====================================

Ara Howard
NOAA Forecast Systems Laboratory
Information and Technology Services
Data Systems Group
R/FST 325 Broadway
Boulder, CO 80305-3328
Email: ahoward@fsl.noaa.gov
Phone: 303-497-7238
Fax: 303-497-7259
====================================

I generally think that mixing HTML and Programm Code is no good
idea but it has it’s advantages.
and using XML/XSLT is often complicated and performance is bad.

Years and years ago, I used htmlpp, a Perl script to ‘preprocess’ HTML.
More recently (years ago) I used GTML, a similar deal. Nowadays I use
xsltproc, an XSLT processor based on the libxslt C library for GNOME.

It works very quickly. Generating 123KB of HTML (4693 lines in 13 pages
of mostly tables and lists) takes 448 ms. XML/XSLT is very
complicated, I agree. It’s like hitting that wee nail with a whopping
great mallet. But the power it affords means you’re never stuck for a
feature and it means more options slowly open up to you over time as you
bash your head against XSLT.

For example, I do a number of very tricky things in XSLT which would be
very difficult to do in Perl or Ruby embedded code as the code would
have to parse the HTML document and understand the layout of my
sections. Namely I say My Other Section to put a link in the
code to another section in my document, no matter what XML file it’s
stored in or HTML page it will be on in the output or whereabouts in the
HTML file it will be. XSLT processors also tell you when you’ve stupidly
mismatched your tags and such.

what are your experiences with Eruby and maybe with HTML::Mason ??

I’ve worked a bit with eRuby and PHP. Not HTML::Mason. Our major
university project was in PHP. I now hate it. :slight_smile: eRuby I played around
with on my PC’s HTTP server. I would say that it’s probably a better
choice than PHP due to the overwealming niceness of Ruby, although Harry
Ohlsen and I both noticed some strange anomolies with variables keeping
their values across page hits (I think). Somebody with more experience
with eRuby might know what that’s all about, or it might be discussed
somewhere else on this list.

Overall I’d say if you want dynamic content, use some sort of Ruby
solution (mod_ruby, eRuby…). If you want to generate static HTML
content on a small scale or short term use something like HTML::Mason or
on a large or long term scale, use XML/XSLT.

I hope that was remotely helpful. :slight_smile:

···

Markus Jais markusjais@yahoo.de wrote:


Greg McIntyre
greg@puyo.cjb.net
http://puyo.cjb.net

This Freshmeat article has some ideas I actually used to separate HTML
generation from the actual business logic of CGI scripts. I
incorporated some ideas into code that went into a fairly complex CGI
script I once wrote.

It’s not flexible enough to provide complete separation (I had to
generate a little HTML for things like tables), but it was able to
accomplish the job well enough. I’m working on further extending the
ideas here to add conditionals and iterators for web page templates. I
imagine we’d have something like:

condition is set

condition was not set

Condition value is:

AB

An rtmpl:if/ would just test the variable given and then output the
text inside rtmpl:then/ or rtmpl:else/ depending on whether the
variable is true or false. rtmpl:sub/ will simply be substituted by
the value of the variable given. rtmpl:iterate/ effectively runs an
iterator method associated with some object, binds some local variables
(the values yielded by the iterator), and repeatedly outputs its
children until the iterator is spent.

I’m working on writing this right now…

···

On Fri, Nov 22, 2002 at 12:35:36AM +0900, Markus Jais wrote:

hello

I told a friend how cool Ruby is and he imediatelly liked it.
but now he switched to Perl again because of HTML::Mason
(http://www.masonhq.com)

I am now Mason Guru and told hin that there is Eruby.
but Mason seems to have more cool features like Eruby (according to him).


Rafael R. Sevilla +63(2)8123151
Software Developer, Imperium Technology Inc. +63(917)4458925