Can You Refactor Instead of Design?

for RuBoard

Another area in which I think refactoring is of questionable value is as an alternative to up-front design. There's a school of thought that says up-front design can be minimized because you can always change the design as you go along through refactoring. [19] The proponents of XP are often portrayed as favoring refactoring over initial design.

[19] Ibid. Page 67.

This approach is fraught with pitfalls and unresolved issues. First, what happens if the coders happen not to be very good designers? Can refactoring save them? I doubt it. When XPers who've been tasked with designing a complex system turn out to be extremely bad designers, the word extreme suddenly takes on a whole new meaning. Second, how would one effectively task a large team of coders without a design from which to work? How do we know that the database team needs to build an OLEDB provider that can return market data to the GUI if that particular portion of the app hasn't even been conceived of yet, let alone designed? Should we just make it up as we go?

Third, and most important, refactoring that is used to supplement a lack of initial design is really not refactoring at all because it changes the observable behavior of the application. In this use, refactoring has gone from being a tool to improve the internal design of a system to a tool for improving it externally. It is being used to define new functionality in the app. In this sense, refactoring is merely a thinly veiled excuse to hackto code with no particular design strategy in mind, in the hope that somehow we'll make it to the finish line without knowing how to get there or where the finish line even is.

for RuBoard


The Guru[ap]s Guide to SQL Server[tm] Stored Procedures, XML, and HTML
The Guru[ap]s Guide to SQL Server[tm] Stored Procedures, XML, and HTML
ISBN: 201700468
EAN: N/A
Year: 2005
Pages: 223

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net