Tutorials
Recipe-style tutorials for DDI — pricing-tier routing, quota-aware degradation, multi-tenant impl selection, feature flags, mocking without Mockito.
These tutorials are organised by use case, not by API. Most show the same
mechanism (ClassResolver) applied to a different problem — that’s the point.
SaaS policy with DDI + jSentinel
The commercial use cases: cross-cutting plan / role / quota / entitlement logic
expressed as resolver code instead of if ladders inside services.
- (coming soon) DDI + jSentinel quickstart — wiring
SecurityContextinto a resolver. - (coming soon) Pricing-tier routing — Free / Pro / Enterprise → different impls per
@Inject. - (coming soon) Quota-aware degradation — limit reached →
ThrottledImplautomatically. - (coming soon) Role-based impl selection — Admin vs. User without
if (role == ...). - (coming soon) Entitlements as injection — add-on purchased? Resolver returns the premium impl.
Runtime-dynamic DI (platform use cases)
The same idea, applied to platform concerns: flags, cohorts, tenants, canaries.
- (coming soon) Feature flags with
ClassResolver— V1 vs. V2 driven by a flag provider. - (coming soon) A/B testing via DDI — cohort routing per
@Inject. - (coming soon) Multi-tenant impl routing — tenant context → tenant-specific impl.
- (coming soon) Canary & shadow traffic — N % to a new impl without a service mesh.
- (coming soon) Strategy pattern at scale — strategy selection as a DI concern.
Tests & quality
- (coming soon) Mocking without Mockito — the same resolver, applied to tests.
- (coming soon) DDI with JUnit 5 — test lifecycle and
clearReflectionModel(). - (coming soon) Mutation-testing your DI graph — keep resolvers honest with PIT.
Integration & migration
- (coming soon) DDI in AWS Lambda — cold-start-friendly DI.
- (coming soon) DDI with Vaadin Flow — UI services injected per session.
- (coming soon) Producers vs. resolvers — when to use which.
- (coming soon) Writing a custom scope — building a request-scoped lifecycle.
- (coming soon) Migrating from CDI / Weld.
- (coming soon) Migrating from Guice.
Want one of these prioritized? [Open an issue]({{ .Site.Params.github }}/issues) and tell me which one — or sponsor the project and bring it forward.