Strategies for Mocking, Decoupling, and InnerSourcing.
The "Ferrari in Traffic" Problem
If you followed Parts 1, 2, and 3, you now have a high-performance Tiger Team.
- You use Tracer Bullets to validate paths instantly.
- You use CoScreen/RustDesk to mob remotely with zero latency.
- You deploy in 15-minute increments.
But then, reality hits.
You need an API change from the "Core Banking Team." You open a Jira ticket.
They reply: "Added to backlog. ETA: 3 weeks."
Your velocity drops from 100mph to zero.
This is the Asynchronous Warfare phase. Your internal speed is irrelevant if your external dependencies are blocked.
You cannot "agile" your way out of a dependency on a slow team. You must Decouple.
Here are the four tactical maneuvers to survive in a hostile, slow environment.
Tactic 1: Mock First, Ask Later (Consumer-Driven Contracts)
The Trap:
You wait for the dependency to build the API so you can consume it. This is "Integration Hell" in slow motion.
The Maneuver:
Do not wait. Define the contract yourself.
- Write the OpenAPI (Swagger) spec that you wish existed.
- Spin up a Mock Server (using WireMock or Microcks) that returns that exact response.
- Build your entire feature against the Mock. Deploy it to UAT behind a Feature Flag.
The Power Move:
When the Core Team finally wakes up, you don't ask them "Can you design an API?"
You hand them the spec and the tests: "Here is the contract we are already using. Your job is just to make the backend satisfy this test."
WireMock - flexible, open source API mocking
|
WireMock open source is supported by WireMock Cloud. Please consider trying it out if your team needs advanced capabilities such as OpenAPI, dynamic state, data sources and more. |
WireMock is the popular open source tool for API mocking, with over 6 million downloads per month and powers WireMock Cloud.
It can help you to create stable test and development environments isolate yourself from flaky 3rd parties and simulate APIs that don’t exist yet.
Started in 2011 as a Java library by Tom Akehurst, now WireMock spans across multiple programming languages and technology stacks. It can run as a library or client wrapper in many languages, or as a standalone server. There is a big community behind the project and its ecosystem.
WireMock supports several approaches for creating mock APIs - in code, via its REST API, as JSON files and…
Benefit: You shift the power dynamic. You define the standard; they just implement it.
Tactic 2: The Anti-Corruption Layer (ACL)
The Trap:
The Legacy Team finally delivers the API, but it's garbage. Column names are in French mixed with Hungarian notation (int_montant_ht_VAL), and the dates are strings.
If you use their data structures directly, your clean code becomes "infected" by their technical debt.
The Maneuver:
Build a hard wall. In Domain-Driven Design (DDD), this is an Anti-Corruption Layer.
- Their World: Dirty Data, XML, SOAP.
- The Wall (ACL): A distinct Adapter/Mapper class.
- Your World: Clean DTOs, Immutable Records, English naming.
Rule: Never let a legacy class name (e.g., T_USR_DATA_V2) leak into your domain logic. Map it at the border, even if it feels redundant.
Tactic 3: InnerSource (The "Nuclear Option")
The Trap:
The dependency team agrees the change is easy (e.g., adding one column), but they have "no resources" to do it.
The Maneuver:
Stop asking for a service. Ask for access.
"I understand you are busy. Give my team Write Access to your repository for 2 days. We will implement the change, write the tests, and you only have to do the Code Review."
Why this works:
- Scenario A: They agree. You do it yourself. You are unblocked.
- Scenario B (Most likely): They are terrified of letting "outsiders" touch their code. Their pride gets hurt. Result: They suddenly "find time" to do it themselves by tomorrow just to keep you out.
Either way, you win.
Tactic 4: Weaponized Economics (For The Sponsor)
The Trap:
The Infrastructure Team says: "Opening this firewall port takes 10 business days. It's the SLA."
The Maneuver:
This is where your Executive Sponsor (from Part 3) steps in.
Engineers argue about time. Managers must argue about money.
Do not say: "It's too slow."
Say: "The Cost of Delay for this feature is *€15,000 per week** in lost opportunity. If we wait 2 weeks for a firewall rule, are you signing off on a €30,000 loss?"*
Suddenly, the firewall rule gets opened in 1 hour.
Risk is the only language bureaucracy understands.
Conclusion: The Completed Guide
You cannot fix the entire organization. If you try to modernize everything at once, you will be crushed by the inertia.
Instead, build a Tiger Team:
- Isolate it financially (Part 1).
- Equip it with tools like
mrandRustDesk(Part 2 & 3). - Defend it with mocks and ACLs (Part 4).
Stop asking for permission to be efficient.
Decouple, Mock, Deliver.
This concludes "The Legacy Survival Guide". Good luck out there.
Top comments (0)