News Feed
Jobs Feed
Sections




Recent Jobs

News Archive
Sameer Borate's Blog:
Refactoring 2 Extract Method
January 12, 2009 @ 20:18:35

Sameer has posted the second part of his series looking at refactoring with a spotlight on the Extract method.

The 'Extract Method' is one of the most common refactorings you will ever do. It is also one you will frequently see implemented on the Refactor tool menu on various IDE's. What this method basically does is to take a group of related code and convert it to a function with a appropriate name that easily explains the purpose of the code.

He gives a code example - converting hotel room price to points based on the currency its requested in - both with and without the Extract method in use.

0 comments voice your opinion now!
refactor extract method example convert hotel price points



Similar Posts

php|architect: The Magic __set_state Method

Tim Koschuetzki's Blog: Composing Methods: Remove Assignments to Parameters

William Candillon's Blog: Running Zorba with PHP

Andries Seutens' Blog: Zend Framework, just get me started, okay?

Vinu Thomas' Blog: PHP functions in Javascript using PHP.JS


Community Events









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


windows microsoft facebook apache extension feature release job podcast wordpress codeigniter symfony developer drupal conference opinion framework zendframework performance hiphop

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