Welcome to the Monastery | |
PerlMonks |
RE: Combining PHP and Perlby pandr (Acolyte) |
on Oct 15, 2000 at 12:44 UTC ( [id://36799]=note: print w/replies, xml ) | Need Help?? |
A lot of wise advise has been given already. There is one
additional point you may want to consider. It is somewhat
related to Tom's "GUIs Considered Harmful". The whole post
can be found at guis
but I will quote a small part here:
"It's all well and good to place a GUI wrapper around an existing tool, but to design a new application with only a GUI interface in mind is to forever limit that tool's flexibility." Because web programming is similar to gui programming you have the very same pitfalls. Consider a portal like site where users are allowed to create accounts. You may start by implementing this in pure PHP (the create_account.phtml page) and this typically involves DB access, password checking and what not. As your site grows you want to be able to administrate it in a more effecient manner, so you write a command line tool (in Perl) to allow quick (i.e. scriptable) handling of the accounts. This is were the pain begins. Now you have identical logic (SQL-statements, password checks, etc.) implemented in PHP and in Perl. Of course you know that is bad, but if you have thousands of lines of PHP code you are trapped! I am not saying PHP is bad. I use it myself from time to time. But I have seen people get burnt by the above scenario. (Yes, I know PHP can be used to create command line scripts, but that is definitely NOT where its strenghts are, IMO)
In Section
Meditations
|
|