News Feed
Sections




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

Harry Roberts' Blog:
Flexible PHP Interfaces
June 11, 2008 @ 13:40:10

In an effort to breathe as much life into an old bit of software he was having to update, Harry Roberts worked up a list of things that he sees can make things a bit more "programmer friendly" when it comes to using classes, methods and interfaces in your code.

His list of four is:

  • Doc Comments
  • Flexible Parameters
  • Use method Entry contracts
  • Be Stateful and Refactor

The "Doc Comments" is pretty obvious, but some of the others need a bit more explaining. Being flexible with your parameters is more about requiring the least from a developer, "entry contracts" being the restrictions to let the developer know what you're expecting and refactoring commonly used functionality into a easy, single point of contact.

0 comments voice your opinion now!
flexible interface comments parameters entry contracts stateful refactor


blog comments powered by Disqus

Similar Posts

Evert Pot's Blog: Integrating with Zend's OpenID

Charles Rowe's Blog: The Four Major Benefits of MySQLi

Adam Trachtenberg's Blog: PHP 5 + COM + Skype Help Wanted

Ilia Alshanetsky's Blog: Taking suggestions for the filter extension

NetTuts.com: Refactoring Legacy Code - Part 10: Dissecting Long Methods with Extractions


Community Events





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


framework list tips language opinion introduction api community release laravel update deployment package library podcast symfony interview install zendserver series

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