Session
Assembling the Infinity Gauntlet: DI and IoC with Decorators in Vanilla JavaScript
Dependency Injection (DI) is a key pattern for building maintainable, scalable, and testable software, but it is often associated with heavyweight frameworks and complex runtime infrastructure. From a Lean Web perspective, this raises a simple question: can we keep the benefits of DI while staying close to the platform?
This talk explores how metaprogramming, specifically ECMAScript Decorators, enables a DI approach in pure Vanilla JavaScript. We will review the current TC39 Decorators proposal (Stage 3) and focus on Parameter Decorators (Stage 1).
We will demonstrate how to build a minimal Inversion of Control (IoC) container that aligns with Lean Web principles, defining injectable services with a custom decorator and annotating constructor parameters to collect the metadata required for dependency resolution.
The goal is to show how upcoming ECMAScript features make it possible to implement clean, declarative DI using the platform itself without relying on complex frameworks.
Giorgio Galassi
Senior Frontend Engineer @ Freelancer | GDG Roma Città Organizer
Rome, Italy
Links
Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.
Jump to top