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 15:39

Michael Fesser wrote:
> .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
>
> Micha

And that's where I disagree with the author of the refactoring site.
But that's one person's opinion. Other people who have written about
refactoring

Changing the name of a function which is externally available is
changing the behavior. It means changing every piece of code which
calls the function.

For instance, between Apache 1.x and 2.x, the Apache foundation changed
some of the function calls. This causes problems with any modules which
call those functions.

By your argument, ZEND should change the fopen() call to be file_open().
How much code would that affect?

Rather, they might change the code to make it more efficient and not
change the function name. This is refactoring.

But the author is correct - there is very little information available
on refactoring. In some ways the site is good. But in other ways it
contains incorrect information.

As to the Wikipedia page - I have no idea who wrote this page. Was it
the same person? Or someone else without a good idea about it? Anyone
can create a page there. I could create one which says the sun rises in
the west. Does this make it so?

--
==================
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

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