From: Chad Perrin Date: 2008-12-30T13:47:28+09:00 Subject: Re: eRuby/erb outside of Rails --EuxKj2iCbKjpUGkD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Dec 28, 2008 at 08:43:45PM +0900, Dave Bass wrote: >=20 > An advantage of this approach of separating content from presentation is= =20 > that the Perl/Ruby script can be developed independently of any web=20 > considerations. I use a little Perl script as a CLI. I've done some of that sort of thing myself, both with Perl and with Ruby, in the past. It works well, as long as you think through the consequences of your development choices. >=20 > FWIW, I developed one particular script originally in Perl, then in Java= =20 > and finally in Ruby. The Ruby version is both the shortest and the=20 > tidiest. For future developments I might call a compiled C program from= =20 > Ruby, if Ruby turns out to be too slow for the number-crunching I'll=20 > need to do. I like the idea of using the appropriate language for each=20 > part of the job. Considering the templating capabilities of Ruby using some kind of eruby implementation (some of which can just be deposited in the cgi-bin directory, if you can get Ruby working with CGI), I find myself thankfully needing PHP less and less when I choose the appropriate language for each part of a job. Sometimes, Web templating code is a trifle more succinct in PHP just because of the tremendous volume and variety of core functions in the language, but if I find myself writing any actual program logic beyond a simple linear step-by-step imperative approach, Ruby makes the entire exercise much more pleasant. PHP is, in short, rapidly becoming an irrelevancy in my life. --=20 Chad Perrin [ content licensed OWL: http://owl.apotheon.org ] Quoth Alan Kay: "I invented the term 'Object-Oriented', and I can tell you I did not have C++ in mind." --EuxKj2iCbKjpUGkD Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAklZp84ACgkQ9mn/Pj01uKWABwCfW5rjc8SyaDpmincwCyxP9R8O bE8AoIubxe84hdG13hK38fPcKzdR1SGZ =NNnx -----END PGP SIGNATURE----- --EuxKj2iCbKjpUGkD--