News Feed
Sections




News Archive
feed this:

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

Lukas Smith's Blog:
Why bother?
October 25, 2011 @ 08: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).

0 comments voice your opinion now!
opinion interfaces common tool java


DevShed:
User-defined Interfaces in PHP 5 - Building a Page Generator
January 10, 2006 @ 07: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...

0 comments voice your opinion now!
user-defined interfaces page generator object-based user-defined interfaces page generator object-based


Andi Gutmans' Blog:
Fluent Interfaces
December 30, 2005 @ 07: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...

0 comments voice your opinion now!
fluent interfaces thoughts intuition read well error handling fluent interfaces thoughts intuition read well error handling



Community Events





Don't see your event here?
Let us know!


developer code threedevsandamaybe community api bugfix symfony list interview series podcast install library release application language configure laravel introduction wordpress

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework