|
Posted by Jerry Stuckle on 08/25/07 03:03
Sanders Kaufman wrote:
> Jerry Stuckle wrote:
>
>> But that's not refactoring. You changed the interface. Refactoring
>> does not change the interface - just the internal workings.
>
>
> What happened was that I had that Database->Baseclass->Implementation
> structure going on, but I oopsed and put some features in the baseclass
> that belonged in the database class.
>
> Since the whole project relied on that wrong way of doing things, I had
> to go to every page that extended the baseclass and modify it to reflect
> the array way instead of the csv way.
>
> That's refactoring, right?
>
> btw - I just finished fixing up a working implementation and it's at
> "http://www.kaufman.net/bvckvs/bvckvs_publication.php".
>
> Except for a lot of cosmetology to do, I think it's what I wanted.
No, refactoring is changing the implementation without changing the
interface.
IOW, you change HOW you do things, but not WHAT you do. You changed the
interface.
An example of refactoring would be to change a class so that it gets its
data from a relational database instead of a flat file. The function
calls (interface) remain the same, but the code in the functions
(implementation) changes.
Refactoring in OO would mean you would not have to change anything
outside of the class itself.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[Back to original message]
|