Skip to main content
jon8
Inspiring
October 28, 2009
Question

php frameworks

  • October 28, 2009
  • 10 replies
  • 1579 views

what's your favorite php framework and why?

This topic is closed to new replies. Start a new post to keep the conversation going.

10 replies

David_Powers
Inspiring
October 29, 2009

I have been reluctant to use PHP frameworks for two reasons:

  1. There's usually a learning curve involved.
  2. If the framework stagnates or is abandoned, you face major problems in migrating to another solution.

The second problem is exactly the dilemma faced by fans of ADDT, which uses its own framework, but is entirely dependent on a specific version of Dreamweaver. Adobe decided to drop ADDT, so it won't work with CS5. Of course, sites made with ADDT will continue to work for many years, but eventually, they will need to be completely rebuilt.

However, the advantage of a framework is that you're not constantly reinventing the wheel. I now use the Zend Framework for specific features, without going the whole hog of converting sites to use it exclusively. I chose Zend because it's got the backing of the company mainly involved in the development and maintenance of PHP, so is likely to survive. Another factor was that it works exclusively with PHP 5, so its classes don't suffer from the need to be backwards compatible with PHP 4, which uses a completely different object model.

I might change my mind in future, but I don't see the advantage of relying entirely on a framework.

Günter_Schenk
Inspiring
October 29, 2009

David_Powers wrote:

Of course, sites made with ADDT will continue to work for many years, but eventually, they will need to be completely rebuilt.

Regretfully the pressure of having to migrate to other solutions has become much stronger by now, because ADDT´s underlying PHP functionality has proven to be largely incompatible with PHP version 5.3.0 due to its strong dependency on a variety of features (in particular "call-time pass-by-reference") which are now deprecated.

Cheers,

Günter

David_Powers
Inspiring
October 29, 2009

Günter Schenk wrote:


ADDT´s underlying PHP functionality has proven to be largely incompatible with PHP version 5.3.0 due to its strong dependency on a variety of features (in particular "call-time pass-by-reference") which are now deprecated.

The deprecated warnings in PHP 5.3 are simply telling you that a feature is no longer recommended, and will be removed in the next major version (presumably PHP 6). To avoid problems with deprecated error messages, you can add the following to .htaccess:

php_flag display_errors off

Alternatively, you can add this at the top of the main script:

<?php error_reporting(E_ALL ^ E_DEPRECATED); ?>

However, the fact that ADDT relies so heavily on call-time pass-by-reference indicates the age of its underlying code. Ever since the release of PHP 5, the official recommendation has been not to use call-time pass-by-reference. PHP 5 is now five years old, so the writing has been on the wall for a long time.