Martin Fowler is an independent software consultant. he specializes in helping corporations use object technology for business information systems; both with introducing object technology and helping clients with complex projects. his principal work lies in building business objects: from requirements sessions with customers and users, to design and programming with software developers. he also consult on the UML, patterns, refactoring, and project management for incremental development. His Clients clients have included Citibank, Chrysler, the UK National Health Service, and, Andersen Consulting.
Over the last couple of years Software Patterns have become one of the most important areas for software development. Instead of describing abstract techniques to build software, they highlight useful examples which can be adapted and used again by developers.
Although most known for object-oriented design, patterns are also a valuable technique for analysis. This tutorial looks at a selection of the patterns Martin Fowler has collected and published in his book "Analysis Patterns: Reusable Object Models". The tutorial selects two areas: it first outlines patterns first discovered in health care which were then used for corporate financial analysis - a prime example of how pattern reuse can cross traditional vertical domains. It then moves to accounting, showing how a financial system can be built as a network of accounts and posting rules which contain the rules for transferring the amounts between the accounts.
Almost every expert in Object-Oriented Development stresses the importance of iterative development. As you proceed with the iterative development, you need to add function to the existing code base. If you are really lucky that code base is structured just right to support the new function while still preserving its design integrity. Of course most of the time we are not lucky, the code does not quite fit what we want to do. You could just add the function on top of the code base. But soon this leads to applying patch upon patch making your system more complex than it needs to be. This complexity leads to bugs, and cripples your productivity.
Refactoring is all about how you can avoid these problems by modifying your code in a controlled manner. Done well you can make far reaching changes to an existing system quickly, and without introducing new bugs. You can even take a procedural body of code and refactor it into an effective object-oriented design. With refactoring as part of your development process you can keep your design clean, make it hard for bugs to breed and keeping your productivity high.
In this tutorial I'll go through much of things you need to know to succeed with refactoring. We'll start with a live example where we'll watch some code get refactored, so you can get a sense of how the process goes. We'll move on to discuss where refactoring came from, when and where to use it, and how to set up a proper test base. We will also look in detail at the "bad smells" that you find in code, and what refactorings you should use to fix them