From: Michael D. <mi...@mi...> - 2001-05-13 16:39:02
|
> What does php offer over perl? > At the end it boils down to personal preference and experience. I did a bit of perl back at the university but was never really good at it. The main difference from my experience is that perl has a steeper learning curve. PHP works like ASP or JSP so that you can include PHP code in your HTML page, it just has top be escaped with <?PHP ... your code... ?>. So it fits more with the most popular way of doing things at the moment. When you are using templates, this becomes a bit meaningless, of course. (And you can integrate Perl into the server as well) There is quite a bit code for PHP out there. The quality tends to be lower than what perl has with CPAN but it is generally more Web centric and there are some libraries which are excellent (e.g. phplib, http://phplib.netuse.de) I started my port to PHP mainly because I had allready some code written and because with phplib you get session handling (no hidden form fields anymore), db-abstraction and a simple authorization concept just by starting you HTML page with: <?php page_open(array("sess" => "Session", "auth" => "Auth", "perm" => "Perm")); $perm->check("service"); // Checks if the user has permission "service" $user_name = $auth->auth["uname"] ; $language = $auth->auth["lang"] ; ?> <HTML> ...... The ass. arrays work very similar to perl. Some comparison PHP-Perl: http://php.resourceindex.com/Documentation/Reviews_and_Analysis/PHP_vs._Perl/ http://www.koehntopp.de/php/faq-phpinterpreter.html#phpinterpreter-2 (in depth but in german) IMHO the best book on PHP is "Web Application Development With PHP" by Ratschiller, Tobias, and Gerken, Till. (http://www.phpwizard.net/book/) For the beginnings of a PHP port look at http://www.michaeldiehl.com/~michael/etc/ It is not really a port, only the reporting and GL functionality is a 1:1 port. The AR and AP part is done differently and handling of multiple companies is done via a key in all relevant db tables. regards, Michael |