I'm a long time Perl programmer that has developed some pretty complex E-commerce sites using Perl CGI and mySQL. I have a brand new site development project which will also be a dynamic, mySQL driven site. I've done some reading about Perl versus PHP and it appears the main conclusions are PHP is easier to learn and faster (much faster than Perl CGI, about the same as mod_Perl) and it makes controlling the dynamic HTML presentation of the page a bit easier (as opposed to having to use a bunch of print statements or CGI.pm functions).
My key objective is to minimize my developement time as the project is a fixed fee so the quicker I complete it, the more money I make per hour. To date, I've found the thing to be most time consuming with Perl programming is the output of the HTML page -- I've been using a pipeline approach in which I include and/or parse HTML templates. I like this approach because of the fact the page logic (the code) is kept totally seperate from the page presentation. That way, I can have anyone and there Mom edit the HTML template and not worry about them messing up or quizzing me down about all the embedded code in the HTML file. However I can convert to an embedded code format if it is going to save me time in development.
So I'm at a crossroad and looking for some insight especially from someone (preferably a seasoned Perl programmer) who has passed this same crossroad. Performance is not really an issue since I can be careful to code this new site very strictly so I can use mod_Perl instead of Perl CGI. I'm embarassed to admit that I never looked into any of these templating systems that work with Perl such as Mason and embPerl. From what I've read though, it sounds like embPerl would be the better choice for my purposes.
And finally, my other consideration is portability. I know Perl and PHP will be around for quite some time to come and virtually all UNIX and Windows hosts now support it. This new site will be a virtual dedicated host, so we won't have total control over it. I don't want to go with a tool set that is going to cause me headaches in the long run when we migrate from server to server. Another consideration is that in many cases, what I developed will later be maintained by someone else. It appears there are 10 times more messages in the PHP forum here than Perl which means there are probably more developers out there than know PHP than know Perl . (of course I think that is because newer/younger developers are choosing the scripting language with the easiest learning curve since PHP is newer and designed specifically for website development.)
So, if development speed and portability is of the essence, what would you recommend?
A) Program in mod_Perl (what I alread know) and continue to use my own internal methods for utilizing HTML templates.
B) Program in mod_Perl and utilize embPerl or another templating tool (would HTML::Template be a better alternative?)
C) Take the time to learn PHP and switch to that?
For those who respond, please provide a little background info on your programming experience if possible so I know where you are coming from.