|
Posted by Jerry Stuckle on 08/28/07 16:14
Steve wrote:
> "Michael Fesser" <netizen@gmx.de> wrote in message
> news:cng0d3dhkhm507nvjtg590i1gs1bl605ta@4ax.com...
> | .oO(Jerry Stuckle)
> |
> | >But if you change the function name, parameter list and/or return value,
> | >you have to change all of the code calling it. This is NOT refactoring.
> |
> | http://en.wikipedia.org/wiki/Rename_Method
> |
> | http://www.refactoring.com/catalog/renameMethod.html
>
> apparently, i'm not up on my lingo.
>
> so what if i change an interface with optional parameters? i then don't need
> to change *any* calling code, yet i've changed the interface. is this now
> refactoring? further, most php is not written in OOP but with proceedural
> code. so, the 'interface' would be a browser, in most cases. technically, i
> could change any and all code yet not be mucking with the 'interface'. and
> so that we're all clear...an 'interface' *only* exists as a communication
> point between a caller and an *OBJECT*. functions alone and of themselves
> are NOT interfaces.
>
OK, I should have clarified - you can't change the interface except to
*extend* it. Adding optional parameters would be extending the interface.
In this case, the "interface" wouldn't be the browser - the browser has
nothing to do with PHP. Rather, it would be the common function calls.
Interfaces existed long before OO programming! For instance, fopen()
is an interface to the file system.
> as far as i'm concerned, when i 'refactor', i'm doing whatever needs to be
> done to existing code to make it better for no other reason (new
> enhancement, new logical/business requirement, etc.) than to make it better
> (easier to maintain, bring it under standards of practice, make it faster,
> etc.). imo, it's not worth splitting hairs over. i suppose it is a good
> thing that when my boss and i talk about 'refactoring' some code, we
> understand each other...which is the whole point of a word.
>
Then how do you differ between "refactoring" and "rewriting"? There is
a difference!
> like i said before, there's no corner on any of this. 'extreme' programming
> is an *OLD* construct under a new, stupid name.
>
> but that's just my 0.02 usd and i appologise if i have stepped on someone
> else's sacred cow. ;^)
>
>
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[Back to original message]
|