Chapter 2. Hello, Mikado Method!
Listing 2.2. Launcher.java with parameterized setStorageFile(..)
Listing 2.5. The UI.java code, somewhat reduced
Listing 2.6. Changing FileDB to Database, with compilation errors in bold
Listing 2.7. The call to the FileDB constructor is changed.
Listing 2.8. The call to the FileDB constructor is changed in UI.
Listing 2.9. Database interface
Listing 2.10. Use the interface in UI
Listing 2.11. Error in Launcher
Listing 2.14. Pulled construction to App
Listing 2.15. FileDB pulled all the way up to Launcher
Chapter 5. Breaking up a monolith
Listing 5.1. The handle method in LoanHandler.java
Listing 5.2. Helper methods in LoanHandler.java
Listing 5.3. The stubbed response
Listing 5.4. The stubbed HttpServletRequest
Listing 5.5. The stubbed Request
Listing 5.7. The slightly changed LoanHandler.java
Listing 5.8. The slightly changed setUp() in LoanHandlerTest.java
Listing 5.9. Contents of the RequestHelper class
Listing 5.10. Contents of the ApproveHandler class
Listing 5.11. Contents of the LoanHandler class
Chapter 6. Emergent design
Listing 6.1. A piece of code that does too much
Listing 6.2. Responsibilities distributed
Listing 6.3. What will happen if you add another game?
Listing 6.5. Composition approach for Square with a new interface
Listing 6.6. Rectangle should also implement the new interface
Chapter 7. Common restructuring patterns
Appendix C. Dealing with dynamically typed languages
Listing C.1. The initial loan_server.js code
Listing C.2. The initial repository.js code
Listing C.4. The test is growing.
Listing C.5. An ever-growing test