From RPM Wiki
| Table of contents |
Summary
Frequently asked questions on refactoring.
What is refactoring?
Wikipedia (http://en.wikipedia.org/wiki/Refactoring)
- Refactoring is the process of rewriting a computer program or other material to improve its structure or readability, while explicitly keeping its meaning or behavior.
In other words, redoing parts of the RPM code.
What are the benefits?
We refactor for a few main reasons
- Improve performance
- Fix bugs with the code design
- Make the code cleaner and easier to develop on
- To make an existing architecture compatible with new features
What are the risks?
A pessimist's definition of refactoring might be "breaking things that were working". A big risk with refactoring is introducing bugs in areas of the application that were working fine.
There are also two business risks. First, the time cost of refactoring is very hard to estimate. Second, we are spending time doing work that doesn't directly result in new functionality.
Can't we avoid refactoring by better design in the first place?
The main reason we need to refactor code is because the problem the application now needs to solve has become larger or different from the problem the application originally set out to solve. An apt example in RPM is process management, originally intended to track 5 or so fields for opportunities. We now have customers using it to manage most of their business including dozens of templates with hundreds of fields each. You can only keep bending and patching that original architecture for so long before it becomes necessary to demolish it and build a new foundation.
Other causes have been differences in programmer capabilities, .Net framework upgrades, and new versions of Windows and Internet Explorer.
How much refactoring do we do?
We usually perform at least minor refactoring in every version of RPM. This is especially true since often when fixing a bug or implementing a new feature, we find ways the existing code can be improved along the way.
There have been a few times where we have worked solely on refactoring for a month or more. See our RPM version history (http://rpmsoftware.com/rpm/history.php):
- This page was last modified 21:02, 30 Mar 2006.
- This page has been accessed 724 times.
