Skip to Main Content
Prefactoring
book

Prefactoring

by Ken Pugh
September 2005
Intermediate to advanced content levelIntermediate to advanced
240 pages
6h 28m
English
O'Reilly Media, Inc.
Content preview from Prefactoring

1.1. What Is Prefactoring?

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

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Understanding Unittest.Mock

Understanding Unittest.Mock

Mario Corchero
Java™ Performance

Java™ Performance

Charlie Hunt, Binu John

Publisher Resources

ISBN: 0596008740Supplemental ContentCatalog PageErrata