[OT] Choosing a scripting language. - Mailing list pgsql-general
From | Scott Chapman |
---|---|
Subject | [OT] Choosing a scripting language. |
Date | |
Msg-id | 200310240851.27902.scott_list@mischko.com Whole thread Raw |
In response to | Re: HTML generation with PL/PgSQL (Richard Huxton <dev@archonet.com>) |
Responses |
Re: [OT] Choosing a scripting language.
("scott.marlowe" <scott.marlowe@ihs.com>)
|
List | pgsql-general |
On Friday 24 October 2003 01:28, Richard Huxton wrote: > Python is very well respected, and Perl has modules to do anything you want > and many things you don't/shouldn't/are bad for your health. > > You might want to look at PHP (http://www.php.net) which has a syntax which > is quite close to what you want. > A word of warning - it's very easy in PHP to mix your code and HTML. For > anything but the smallest project you don't want to do this. There are lots > of templating options, but smarty (http://smarty.php.net) is quite popular > and flexible. I don't want to start a flame war on the different scripting languages available out there, ok, but I do want to share my reasoning on scripting languages in case it's helpful. Insightful comments are welcome! I looked at Python initially but the guy I was going to work for didn't like it because it was not known to him. So I looked further. When I started evaluating scripting languages, PHP was becoming popular. I decided against it because it only did web pages. It's not (or wasn't then) a general purpose scripting language. I didn't want to climb that learning curve for a single use. It also didn't have a consistent database interface across different databases (which I understand has been fixed now). Since then, I've bumped into documentation on Rackspace's attempt to use PHP and their move to Python (http://python.oreilly.com/news/python_success_stories.pdf) and felt I'd made the right choice. Then I switched to Perl. Perl has CPAN which keeps you from reinventing the wheel. It's Perl's ace in the hole. I programmed a Postgres-driven web application over a 3-year period, in EmbPerl (because it allowed me to embed Perl in the HTML (like PHP) - which I later learned is not such a Good Thing but it got the job done). Perl is "mind-share king", I think, in the Linux web space. It got the job done. I was using procedural programming mostly; having not climbed the Object Oriented trail yet. I know Perl can do OO but see below. I began looking for an alternative to Perl and studying OO. Python got a second look and I decided to implement my next project in Python. It's OO from the ground up, not having OO "bolted on" later like C -> C++. That makes it more comfortable to program in. I also love the indentation to differentiate code blocks rather than the junk I'd been used to seeing in Perl and previous languages. It also has a very nice set of modules in it's standard library and more out on the Net so CPAN's "ace" status is being eroded for Perl. Those are my ramblings on scripting languages. Take a good look at your options before you jump! Cordially, Scott
pgsql-general by date: