News Feed
Jobs Feed
Sections




News Archive
David Gardner's Blog:
Why you should always use PHP interfaces
November 25, 2010 @ 11:46:37

David Gardner has a suggestion for your development that he thinks can help keep things neat and tidy - using interfaces.

This post was sparked by a very simple question from an ex-colleague: "Why bother with PHP interfaces?" The subtext here was that the classes themselves contain the interface definition (through the methods they define) and hence interfaces are not needed, particularly where there is only one class that implements a given interface.

He talks about two reasons he things that interfaces could be beneficial - they help you think about things "the right way" of planning out structure before implementation and that it makes things more "future proof" the code by forcing future elements into the same mold as the current use.

0 comments voice your opinion now!
interface opinion structure design planning futureproof


blog comments powered by Disqus

Similar Posts

Blue Parabola Blog: What's a Senior Developer?

Noupe.com: Beautiful Forms - Design, Style, & make it work with PHP & Ajax

The Codist Blog: Followup To: I Will Never Understand the Appeal Of PHP

Reddit.com: In Web Development is it better to be a Expert or All-arounder?

DevShed: User-defined Interfaces in PHP 5 - Introduction to Core Concepts


Community Events











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


language series testing example phpunit functional usergroup release zendframework2 interview opinion symfony2 rest introduction conference podcast framework database community development

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