Framework-less Scala Dependency Injection frameworks by Adam Warski @adamwarski

Using a DI framework/container may seem obvious, especially in web development. But *why* do you really need one? After all, "dependency injection" is just a fancy name for passing arguments to a constructor.

In the *live-coding-only* talk (no slides!) we'll walk through some of the features of DI containers and see if we can replace (and improve!) them with pure, type-safe Scala code. We'll start with "manual" DI, followed by using MacWire to generate the wiring code for us. With one simple `wire[]` macro, we can save a lot of typing and still use only Scala language features for creating the object graph at runtime.

Having solved the basic problem, we’ll proceed other features of DI containers and web frameworks: scopes and interceptors. We’ll see how to implement an interceptor, and that it’s far easier than it may seem.

Finally, we'll see what "Thin Cake Pattern” is, and how to use traits to create and compose modules (similar to the module concept known from Guice, but better).

As a bonus - I’ll have some not-only-Scala-related stickers.

Join or login to comment.

People in this
Meetup are also in:

Imagine having a community behind you

Get started Learn more

We just grab a coffee and speak French. Some people have been coming every week for months... it creates a kind of warmth to the group.

Rafaël, started French Conversation Group

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy