Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Stubbles Blog:
On annotations and logic
Jan 28, 2011 @ 18:29:40

On the Stubbles blog there's a recent post that talks about a feature they introduced into the framework - annotations - with high hopes it would give them more flexibility in how things worked. As Frank Keline says, though, "it's not such a good idea at all".

The most simplest reason for this is the idea that annotations are markup. They mark (or, to keep the notion, annotate) code as being special or to be treated in some special kind of way, depending on the scenario where the code is used in. [...] From a design point of view this makes it clear why annotations should not contain logic. If annotations contain parts of such logic, it becomes splitted and possibly cluttered throughout different classes.

He goes on to talk about a second reason why he doesn't think they should be considered first-class in an application - it doesn't promote code reuse. For example, if you define them on a method, there's no way to use that method without them. He puts this into the perspective of the Stubbles framework that currently uses them and how he's changed the logic to live in special classes instead. He considers other changes like places annotations can be used and having different annotation classes.

tagged: annotation logic framework stubbles opinion

Link:

Stubbles Blog:
Stubbles 0.5.0 released
Feb 01, 2008 @ 19:37:00

Frank Kleine has announced on the Stubbles blog that the latest version of the framework, Stubbles 0.5.0 has been released.

A last day of a month - time to release a new Stubbles version. The release does not feature that much new features, we focused mainly on infrastructure and code quality improvements. The most important change of course is the change of the package separator.

Instead of the dots they've gone with the more standard double-colon that PHP already uses. There were also code quality improvements and a move away from SimpleTest out to the popular PHPUnit unit testing package.

You can download this new package from the Stubbles project site.

tagged: stubbles framework release simpletest phpunit package seperator

Link:

Stubbles Blog:
Exception is an Inheritance Nazi
Aug 07, 2007 @ 14:21:00

Frank Kleine has voiced his disapproval with what he calls the "Inheritance Nazi" exception handling PHP has natively.

The built-in Exception class in PHP is total crap. It is an inheritance nazi preventing you from doing useful stuff in your own exception classes. Whoever made its get*() methods final and the trace property private did not thought any second about how exceptions may be used or that people need to implement their own stack trace handling.

The reason for the rant is due to a project he's currently working at where he cannot overload the stack trace of an exception instance then throw the exception. This forces him to create his own exception handling, pointless when the PHP one should be able to handle what he wants.

Suggestions/thoughts in the comments sympathize with him and suggest an alternate exception method - an interface that would allow for more customization.

For more information on the exception handling PHP has, check out the manual page for it.

tagged: stubbles exception handling class custom throw inheritance stubbles exception handling class custom throw inheritance

Link:

Stubbles Blog:
Exception is an Inheritance Nazi
Aug 07, 2007 @ 14:21:00

Frank Kleine has voiced his disapproval with what he calls the "Inheritance Nazi" exception handling PHP has natively.

The built-in Exception class in PHP is total crap. It is an inheritance nazi preventing you from doing useful stuff in your own exception classes. Whoever made its get*() methods final and the trace property private did not thought any second about how exceptions may be used or that people need to implement their own stack trace handling.

The reason for the rant is due to a project he's currently working at where he cannot overload the stack trace of an exception instance then throw the exception. This forces him to create his own exception handling, pointless when the PHP one should be able to handle what he wants.

Suggestions/thoughts in the comments sympathize with him and suggest an alternate exception method - an interface that would allow for more customization.

For more information on the exception handling PHP has, check out the manual page for it.

tagged: stubbles exception handling class custom throw inheritance stubbles exception handling class custom throw inheritance

Link:

Stubbles Blog:
Stubbles 0.2.0 released
Jul 04, 2007 @ 15:32:00

The Stubbles group has released the latest version of their PHP framework - version 0.2.0 of Stubbles:

The Stubbles team is proud to announce the release of Stubbles 0.2.0. This release is another alpha version and contains the basic MVC structure as well as support for JSON-RPC, utility packages for working with datespans, URLs and a cache package. Additionally the build system has been enhanced and a lot of bugs have been fixed. For a complete list of changes see the changelog. The release can be downloaded from our downloads page.

Other enhancements in this new version include updates to the build system, the inclusion of more examples, changes to several packages including the JSON-RPC, Util and XML functionality.

tagged: stubbles framework mvc jsonrpc datespan url changelog stubbles framework mvc jsonrpc datespan url changelog

Link:

Stubbles Blog:
Stubbles 0.2.0 released
Jul 04, 2007 @ 15:32:00

The Stubbles group has released the latest version of their PHP framework - version 0.2.0 of Stubbles:

The Stubbles team is proud to announce the release of Stubbles 0.2.0. This release is another alpha version and contains the basic MVC structure as well as support for JSON-RPC, utility packages for working with datespans, URLs and a cache package. Additionally the build system has been enhanced and a lot of bugs have been fixed. For a complete list of changes see the changelog. The release can be downloaded from our downloads page.

Other enhancements in this new version include updates to the build system, the inclusion of more examples, changes to several packages including the JSON-RPC, Util and XML functionality.

tagged: stubbles framework mvc jsonrpc datespan url changelog stubbles framework mvc jsonrpc datespan url changelog

Link:

Stubbles Blog:
Stubbles 0.1.0 released
Apr 30, 2007 @ 18:07:00

The Stubbles framework team has released the latest version of their framework today - Stubbles 0.1.0:

The Stubbles team is proud to announce the release of Stubbles 0.1.0. This release is a first alpha version and contains the basic features of Stubbles like the Extended Reflection API, XML handling with XMLStreamWriter and XMLSerializer, Logging, Event handling, support for filtering and validating user input and session handling. The release additionally contains parts of packages that we announced to be in the next milestone 0.2.0.

The Stubbles framework is one that seeks to "combine your favorite features from other programming languages and frameworks" and is flexible enough to allow for easy interfacing with other frameworks/components like PEAR or the Zend Framework.

tagged: stubbles version release reflection xml log event filtering session stubbles version release reflection xml log event filtering session

Link:

Stubbles Blog:
Stubbles 0.1.0 released
Apr 30, 2007 @ 18:07:00

The Stubbles framework team has released the latest version of their framework today - Stubbles 0.1.0:

The Stubbles team is proud to announce the release of Stubbles 0.1.0. This release is a first alpha version and contains the basic features of Stubbles like the Extended Reflection API, XML handling with XMLStreamWriter and XMLSerializer, Logging, Event handling, support for filtering and validating user input and session handling. The release additionally contains parts of packages that we announced to be in the next milestone 0.2.0.

The Stubbles framework is one that seeks to "combine your favorite features from other programming languages and frameworks" and is flexible enough to allow for easy interfacing with other frameworks/components like PEAR or the Zend Framework.

tagged: stubbles version release reflection xml log event filtering session stubbles version release reflection xml log event filtering session

Link:

Terry Chay's Blog:
serialization without pity
Mar 21, 2007 @ 17:02:00

In response to a post from the Stubbles blog, Terry Chay has posted some of his thoughts about the serialization solution presented in the other post.

Frank Kleine writes a PHP 5 framework called Stubbles. I have a long-standing view about frameworks that hasn't changed one bit. But instead of arguing about the Sysaphean task Frank is engaging in, I'll show what my approach is to one small component (while being a bit jealous that he can actually develop in PHP 5).

Frank's solution involves storing the objects in the session, serializing them first. The issue comes up when the class(es) the object needs aren't included into the page. Terry offers a different sort of solution - one also using __autoload, but using it combined with unserialize_callback_func.

Terry compares this with Frank's approach and notes that his method "closes off" the system from the very PHP functions that could make his life simpler (making a separate handling system). He also includes a method for doing the same when all you know is the class file's name (non-PEAR format).

tagged: serialization pity stubbles framework article response autoload unserializecallbackfunc serialization pity stubbles framework article response autoload unserializecallbackfunc

Link:

Terry Chay's Blog:
serialization without pity
Mar 21, 2007 @ 17:02:00

In response to a post from the Stubbles blog, Terry Chay has posted some of his thoughts about the serialization solution presented in the other post.

Frank Kleine writes a PHP 5 framework called Stubbles. I have a long-standing view about frameworks that hasn't changed one bit. But instead of arguing about the Sysaphean task Frank is engaging in, I'll show what my approach is to one small component (while being a bit jealous that he can actually develop in PHP 5).

Frank's solution involves storing the objects in the session, serializing them first. The issue comes up when the class(es) the object needs aren't included into the page. Terry offers a different sort of solution - one also using __autoload, but using it combined with unserialize_callback_func.

Terry compares this with Frank's approach and notes that his method "closes off" the system from the very PHP functions that could make his life simpler (making a separate handling system). He also includes a method for doing the same when all you know is the class file's name (non-PEAR format).

tagged: serialization pity stubbles framework article response autoload unserializecallbackfunc serialization pity stubbles framework article response autoload unserializecallbackfunc

Link:


Trending Topics: