|
|
Author
|
Topic: Perl CGI and the database decision
|
|
|
|
Scott Jentsch
Phenomenal Film Handler
Posts: 1061
From: New Berlin, WI, USA
Registered: Apr 2003
|
posted 05-11-2007 10:19 AM
I concur on using a database system over the flat file systems you mentioned. Way back in the mid 90's, we used quasi-databases with hashed files (sorry if I'm mis-speaking this, many cobwebs), but nothing replaces the functionality provided by a database server.
Perl vs. PHP is a preference thing. I have found that people that have cut their teeth on Perl have a very hard time transitioning to PHP, but I took the plunge on PHP and haven't looked back. I dread every time I have to go back into some of the remaining Perl scripts I have to make changes.
PHP and MySQL can handle millions of transactions per day without breaking a sweat, and that's on relatively modest hardware. Well-designed applications are very possible, and unless you know Perl inside and out, I have found PHP to be much easier to maintain due to the many functions and PEAR libraries available.
I roll my own code whenever possible, but then, I'm a bit of a control freak about stuff like that, so there has to be overwhelming advantages to using pre-canned applications. The flip-side is you become the system administrator of the application, and you need to have the time and resources to do the job right. If that describes you, you're all set.
By all means, if your application needs a database, use a database server to do those tasks.
| IP: Logged
|
|
|
|
|
Kyle McEachern
Expert Film Handler
Posts: 165
From: San Francisco, CA
Registered: Feb 2004
|
posted 05-18-2007 01:16 PM
I'll agree with Daryl:
PHP 5 is the easiest solution, especially with the introduction of PDO with PHP 5, it's the PHP Group's implementation (for all intents and purposes) of Perl DBI, but when plugged into the PHP framework, makes life very easy to use.
Don't worry about cross-platform functionality really in the debate between the two languages, I don't really think either one has a clear advantage over the other. If either one is installed right, they'll work where you install it.
If you have to go with Perl, then DBI is the solution, combined with some form of SQL to go along with it, as managing a database based off of CSV/text file/etc. is just ASKING for trouble...the SQL servers (MySQL is my preference for stuff that's not super high volume, Postgres once you get into thousands of transactions a minute and tables pushing close to a billion rows) have daemons that you have to go through for a reason, cause they know how to handle these things! (If you want to *really* get it right, then use MySQL + InnoDB table structure in order to get ACID Compliance [translation: transaction-based queries so you can do a set of queries and they all run at once without getting messed up by another person using the database])
And yeah CPAN > PEAR in just about every way once you've seen how it works, but I don't think any language can much compare to http://www.php.net/ in terms of documentation of all the language's core functionality and what you can do with it.
The problem with Ruby (especially Ruby on Rails) is that it's not a scalable solution, at ALL. It's cool for the people who are all into it as the new hip thing, but at its current developmental stage (and it's EXTREMELY developmental still from all I've seen), you can't use it at any real high volume, and it doesn't have near the functionality that PHP/Perl do. ActiveRecords doesn't make a language, usability, scalability, documentation, ease of use, and ease of modularity do. Python + Django is more refined than Ruby on Rails, but it's still going to fail miserably on a scaling test vs. (especially Perl) or PHP. Same goes for using lighttpd instead of apache, for that matter. The new cool 'light' frameworks are all cool, but they aren't as developed for serious code use as the others are (twitter.com is an example of a Rails app that doesn't scale at all, they've had major issues with their site since they got popular).
| IP: Logged
|
|
|
|
|
All times are Central (GMT -6:00)
|
|
Powered by Infopop Corporation
UBB.classicTM
6.3.1.2
The Film-Tech Forums are designed for various members related to the cinema industry to express their opinions, viewpoints and testimonials on various products, services and events based upon speculation, personal knowledge and factual information through use, therefore all views represented here allow no liability upon the publishers of this web site and the owners of said views assume no liability for any ill will resulting from these postings. The posts made here are for educational as well as entertainment purposes and as such anyone viewing this portion of the website must accept these views as statements of the author of that opinion
and agrees to release the authors from any and all liability.
|