Download Working Effectively With Legacy Code PDF

TitleWorking Effectively With Legacy Code
TagsMethod (Computer Programming) Constructor (Object Oriented Programming) Class (Computer Programming) Models Of Computation Computer Programming
File Size589.2 KB
Total Pages47
Document Text Contents
Page 24


Hidden dependency: Solution

Parameterize constructor

Big improvement? (Yes)
Allows for introducing a fake mail service

Extract interface for mail_service

Introduce fake class that senses the things we do

(mail_service *service) : status(MAIL_OKAY)

Similer Documents