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

Lukas Smith's Blog:
Why bother?
Oct 25, 2011 @ 13:33:44

Lukas Smith has put together a recent post to his blog with some thoughts on standardization of interfaces in PHP applications to help improve code quality and interoperability.

In my previous blog post I was brainstorming the possibility of collaboration between various frameworks to define a set of common interfaces. But I kind of failed to explain why this would be useful. Herman's "rebuttal" made this omission on my part quite clear. [...] That being said the open questions left in my previous blog might still prevent this idea to take off, even if I manage to convince the general community that the above mentioned negative effects are not such a significant concern.

He talks first about some of the things he sees PHP as having done right (citing its popularity) and contrasts it to Java based on the standards they impose. He goes on to mention how interfaces, introduced early enough in the process, can help with the "best tool for the job" idea (with an example involving Symfony2, Zend Framework and Doctrine).

tagged: opinion interfaces common tool java

Link:

DevShed:
User-defined Interfaces in PHP 5 - Building a Page Generator
Jan 10, 2006 @ 13:29:09

DevShed has posted thier final part in the "User-defined Interfaces in PHP" series today - "Building a Page Generator".

In this final part of the series on user-defined interfaces in PHP 5, Alejandro puts all of the classes created in the previous articles together to work as a page generator. This allows complex page generation to be translated into a more flexible process through an object-based solution.

With reference to this final part of the series, I shall put all of the classes to work together into a full-featured example, by including the already familiar (X)HTML widgets in conjunction with the pair of MySQL-processing classes, in order to integrate both types of objects into a page generator class. As a result, complex web page generation can be translated into a more flexible process tackled through an object-based solution.

Combining the efforts from the two previous articles in the series, they build a class that takes in the data it needs and builds out the page accordingly. The PageGenerator class does all of the work for you, making object-based pages a simple process...

tagged: user-defined interfaces page generator object-based user-defined interfaces page generator object-based

Link:

DevShed:
User-defined Interfaces in PHP 5 - Building a Page Generator
Jan 10, 2006 @ 13:29:09

DevShed has posted thier final part in the "User-defined Interfaces in PHP" series today - "Building a Page Generator".

In this final part of the series on user-defined interfaces in PHP 5, Alejandro puts all of the classes created in the previous articles together to work as a page generator. This allows complex page generation to be translated into a more flexible process through an object-based solution.

With reference to this final part of the series, I shall put all of the classes to work together into a full-featured example, by including the already familiar (X)HTML widgets in conjunction with the pair of MySQL-processing classes, in order to integrate both types of objects into a page generator class. As a result, complex web page generation can be translated into a more flexible process tackled through an object-based solution.

Combining the efforts from the two previous articles in the series, they build a class that takes in the data it needs and builds out the page accordingly. The PageGenerator class does all of the work for you, making object-based pages a simple process...

tagged: user-defined interfaces page generator object-based user-defined interfaces page generator object-based

Link:

Andi Gutmans' Blog:
Fluent Interfaces
Dec 30, 2005 @ 13:21:53

With so many talking about fluent interfaces today, Andi Gutmans has tossed his hat into the ring with this new blog post with some of his thoughts.

I'd like to add to Paul's and Mike's posts regarding fluent interfaces.

I very much agree with them that this kind of method chaining allows to create very readable and intuitive interfaces. The million dollar question is when to actually use this kind of programming style.

Of course there are no definitive answers but I suggest to consider the following points: Use your intuition, If you don't have all of the data - reconsider using them, It really has to read well in your language (e.g. English), preferably as a complete sentence, and make sure that the base error handling it forces you to use is enough for your purposes.

And, of course, he's open to suggestions/comments on the subject, as well as any proposals for guidelines that might need to be set out there...

tagged: fluent interfaces thoughts intuition read well error handling fluent interfaces thoughts intuition read well error handling

Link:

Andi Gutmans' Blog:
Fluent Interfaces
Dec 30, 2005 @ 13:21:53

With so many talking about fluent interfaces today, Andi Gutmans has tossed his hat into the ring with this new blog post with some of his thoughts.

I'd like to add to Paul's and Mike's posts regarding fluent interfaces.

I very much agree with them that this kind of method chaining allows to create very readable and intuitive interfaces. The million dollar question is when to actually use this kind of programming style.

Of course there are no definitive answers but I suggest to consider the following points: Use your intuition, If you don't have all of the data - reconsider using them, It really has to read well in your language (e.g. English), preferably as a complete sentence, and make sure that the base error handling it forces you to use is enough for your purposes.

And, of course, he's open to suggestions/comments on the subject, as well as any proposals for guidelines that might need to be set out there...

tagged: fluent interfaces thoughts intuition read well error handling fluent interfaces thoughts intuition read well error handling

Link:


Trending Topics: