Slide 7
Slide 7 text
class Controller(
private val service: Service,
private val formatter: OutputFormatter) {
fun doSomeWork() {
val results = service.getResults()
render(formatter.format(results))
}
}
class Service(private val source: DataSource) { }
class DataSource(
private val logger: Logger,
private val tracker: ErrorTracker,
// other dependencies
)
class OutputFormatter { }