Gio Lodi 8/11/2015

Explicit Dependencies for Code with No Surprises

Read Original

This technical article uses an analogy of a messy childhood box to discuss hidden dependencies in code. It demonstrates how a simple interface can conceal complex internal dependencies, making systems harder to reason about. The post provides a concrete example in Objective-C, showing a refactored design where dependencies (like Parser, AppStateService, NetworkService) are explicitly injected via an initializer, improving clarity and testability.

Explicit Dependencies for Code with No Surprises

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

1
The Beautiful Web
Jens Oliver Meiert 2 votes
3
LLM Use in the Python Source Code
Miguel Grinberg 1 votes
4
Wagon’s algorithm in Python
John D. Cook 1 votes