Here Here
I say code it right and if people want performance they can get an op-code
cache.
Kevin
----- Original Message -----
From: "Willie Alberty" <[EMAIL PROTECTED]>
To: "Zend Framework General" <fw-general@lists.zend.com>
Sent: Monday, December 18, 2006 3:27 PM
Subject: Re: [fw-general] Re: Do we really need Zend::exception()?
On Dec 18, 2006, at 10:57 AM, Richard Thomas wrote:
Thats just another file and class that needs to be loaded and parsed
adding to the overall overhead.
As is right now to use the very basic features, registry, class loading
and all require just a single file which is nice.
Zend.php already includes Zend/Exception.php. Line 25:
require_once 'Zend/Exception.php';
I'm also not a fan of this new approach to throwing exceptions. One theme
that comes up repeatedly in this list is that ZF is to provide an example
of 'best practice programming' in PHP. By burying exception object
construction inside some factory method, I think that sends a message
that PHP's exception handling mechanisms are somehow flawed, and we need
this rather unconventional approach to work around it.
The root of the problem seems to be the impact of parsing and including
the various exception class files, and the performance issue with
require_once on PHP versions prior to 5.2. But none of the exception
subclasses anywhere in the framework actually do anything -- they only
exist so that there are unique class names. So we've got dozens of
essentially empty files that (potentially) must be parsed and included.
If we're worried about the performance impact of including all of these
individual files, why not lump all of the exception classes, which again
do nothing special, into one Zend/Exception.php file? Yes, this would go
against the recommended coding standard of one class per file, but if
there's no code in any of the classes, is that really that big a deal?
Especially for exceptions...
--
Willie Alberty, Owner
Spenlen Media
[EMAIL PROTECTED]
http://www.spenlen.com/