B. Refactoring Done to Sample Application

THE FOLLOWING CODE, CONFIGURATION, AND SCRIPT excerpts show a few simple examples of how the sample application in this book was refactored as it was being built incrementally.

Note

The book’s code zip file contains two project directories for our sample application: timex/ and timex2/. The latter contains much of the refactored code discussed next.Because you have both versions, you can compare the two code bases to see how refactoring works in the real world. Remember, it isn’t about being perfect the first time—just good enough. Get everything working first; then optimize your code later. This is what refactoring is all about—continuous design and redesign, by improving code as necessary, versus ...

Get Agile Java Development with Spring, Hibernate and Eclipse now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.