1.1. What Is Prefactoring?

 <  Day Day Up  >  

Refactoring is the practice of altering code to improve its internal structure without changing its external behavior. Prefactoring uses the insights you have gleaned from your experience, as well as the experience of others, in developing software. The expertise gained in refactoring is part of that experience.

I have condensed my ideas and the ideas I have heard from many developers over many years into the prefactoring guidelines we will explore in this book. Take them as a starting point to developing your own guidelines. Many guidelines relate to basic design principles, but they are expressed in different fashions . Other guidelines revolve around the concepts of Extreme Abstraction, Extreme Separation, and Extreme Readability. I will talk about those concepts later in this chapter.

Another facet of prefactoring is a concentration on interfaces. By considering interfaces ”what components can do for you, instead of how they work ”you further the goal of abstraction. Refactoring is also concerned with interfaces; the ones for which you do not change the external behavior, while you are altering the internal implementation.

Applying the guidelines in this book does not guarantee that you will never need to refactor your design or code. You might decrease the amount of refactoring that is required. Can you foresee everything? No. Are the decisions you make today final? No. It is practically impossible to think of everything or know everything in the beginning of a project. You will learn more things as a project goes along. However, you can use your experience and the experiences of others to guide you in a certain direction. You can make decisions today that might minimize changes tomorrow.

 <  Day Day Up  >  


Prefactoring
Prefactoring: Extreme Abstraction, Extreme Separation, Extreme Readability
ISBN: 0596008740
EAN: 2147483647
Year: 2005
Pages: 175
Authors: Ken Pugh

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