Welcome to WebmasterWorld Guest from 188.8.131.52
Perl, PHP or something else -- and why?
Which would be best at:
1) handling high traffic and heavy loads
2) being reliable and trouble free
3) maintainable and manageable; easiest to refine and "grow"
4) fastest to develop all the "guts" of an e-commerce site or online store?
Thanks for sharing on this!
1. SPEED: perl might not be good if you have to use cgi. but if you have mod_perl, there's not much of a difference.
2. RELIABLE: they're both pretty solid. i'd say perl might have the edge because it's been in 5.x for years while php 4 is more recent, but the difference is negligible.
3. MAINTAINABLE: neither language forces you to write maintainable code, but it can be done easily in both languages. i'd say this is a tie.
4. DEVELOPMENT TIME: depends what you know better.
if it were me, i'd pick perl because i like it better and have more experience with it.
"Consultants" will get you to use things like J2EE/EJB or .NET. Depending on whether what you want to do can be achieved using hand-coded Perl/PHP/whatever, sometimes using these buzz-word technology might bring unnecessary bloat to your software.
>> 3. MAINTAINABLE: neither language forces you to write maintainable code, but it can be done easily in both languages. i'd say this is a tie. <<
I will say it is a tie too because I reckon you can easily write unmaintainable code in *both* Perl and PHP. Perl emphasises there are more than one ways to do things, but it does bring trouble when your way is different from your collegues' way. I write lots of PHP for work and private projects, and everytime I feel like I am making a hack instead of a good design.
Thanks for sharing! I won't be using any consultants. Basically, I'm wanting to learn how to *personally* develop, deploy, refine and manage high traffic, efficient, high performance e-commerce sites that are SEO'd, usable and effective business wise.
I realize the skill of using the tools matter most. But the tools and languages selected matter too.
I'm wondering what platform and development language(s) would be best. There is so much to learn -- and I'm doing this after hours and on weekends -- so I want to choose my tools well up front to avoid problems down the road.
BTW, the operating system will likely be FreeBSD; maybe Linux, too.
I'm a mainframe programmer/analyst in my day job -- no web stuff. I'm in the process of learning lots of stuff web wise on my own time. Ideally, it would be great to transition into web work, as jobs in the mainframe COBOL IMS DB/DC stuff I've been doing for the last 13 years are becomming increasingly sparse.
From my exposure to large system development and maintenance, I know how much early decisions on languages and platforms can make a huge difference either positively or negatively long term in lots of areas -- total life cycle cost, time and cost for maintenance efforts, ease of farming out work to others, how long it takes to develop an enhancement doing things one way .vs another, etc.
So I'm wondering what the merits are of spending time to develop mastery in one language .vs another for a person wanting to develop and manage the front and back end of high traffic e-commerce sites themselves, or as part of a small group they direct.
I figured some here would likely have experience with how various languages fare in real world situations over time. As most of us know, most information out there is either marketing spin or the opinion of someone who simply recommends what they like best or are most familiar with rather than a balanced, objective opinion on the relative pros and cons of the various language and tool choices.
To me, nothing trumps real world experience gleaned in the trenches; especially while one's brain is engaged thinking of how "X" works out in practice compared to "Y" or "Z". I figured some here have thought about these things and would be willing to share their thoughts.
BTW, what about JAVA? My impression is JAVA would require much more robust hardware and more software "pieces" (i.e. app server, etc) with a resulting more complicated and fragile architecture to handle the same level of traffic on an e-commerce site as a Perl or PHP setup would. Anyone know if this is true?
Thanks one and all for sharing on this issue! I appreciate your input!
First of all it is *built for the web* as opposed to Perl - a general text processing language.
It is slower than mod_perl but a lot faster than the CGI Perl (which is more popular), PHP is more popular as a module.
You'll have more trouble with CGI, permissions, obscure error messages - PHP has a lot nicer messages (although they are not the best).
You can't do everything in 5 or more ways (like in Perl) so other people's code is easier to read.
I'll also strongly recommend using php-recommended.ini instead of php-dist.ini for the deafult setup - enforces cleaner, faster, and more secure coding ;-)