You are here: Re: Best Coding Practice « PHP Programming Language « IT news, forums, messages
Re: Best Coding Practice

Posted by Jerry Stuckle on 08/25/07 12:08

Dikkie Dik wrote:
>> No, refactoring is changing the implementation without changing the
>> interface.
>
> Please read the book before you utter nonsense.
>
> Refactoring is changing the _structure_ of the code without changing the
> _behaviour_ of that code. So interface changes can be refactorings.
>

I have read the book - many times. And I've been involved in
"refactoring" since long before the term ever came up. The interface IS
the behavior - and changing the interface changes the behavior.

Refactoring means you don't have to chance code outside that which you
are changing. For instance, you can change the body of the function
without changing the function name, parameter list and return value.
This requires no change outside of the function, and is refactoring.

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.

Pull your head out of your ass and learn what you're talking about
before showing what an idiot you are.

> <snipped more incorrect stuff>
>
>> Refactoring in OO would mean you would not have to change anything
>> outside of the class itself.
>
> I think you confuse with the Open Closed Principle. The Open Closed
> Principle and refactoring are perpendicular ways to adapt code in a
> _controlled_ fashion: The Open Closed Principle leaves the structure
> intact, while refactoring makes sure the code behaviour remains the same
> while you are restructuring it.

Not at all. But you have no idea what you're talking about.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация