Sort coupling moves
Classify design moves by their effect on coupling and clarity.
Sort each move into the coupling effect it most likely creates. Low-coupling improvement Hidden dependency Over-abstraction Inject PaymentGateway because production, sandbox, and fake implementations are all used Call ServiceLocator.current().paymentGateway() from inside every domain object Create StringTrimmerInterface for one line of local string cleanup Pass Clock into subscription renewal so tests can simulate time Read database credentials directly inside Invoice.calculateTotal() Add repository interface where tests and production use different persistence adapters Create UserInterface, OrderInterface, and InvoiceInterface only so every class has an interface Use a global mutable FeatureFlags.instance() in tests that run in parallel
Sign up free — one personalized lesson every day, matched to your role and goals.
Already have an account? Sign in