Recently we released MacWire 2.0, with a number of new features and general code cleanup. The majority of the work was done by Bruno Bieth – thanks! If you don’t know what MacWire is: a lightweight and non-intrusive Scala dependency injection library, and in many cases a replacement for DI…
Category: Dependency Injection
MacWire 1.0 is here!
A couple of days ago MacWire 1.0 was released! If you don’t yet know what MacWire is: a light-weight and non-intrusive Scala Dependency Injection library. In fact, it’s more of an approach to DI (see the step-by-step guide), than a library. Another good thing – it’s definitely not a framework…
In today’s post-OO world, is dependency injection still relevant?
It’s 2015. Most of the new popular languages are more or less functional. The old ones, like Java, gain functional programming elements. In Scala, people are increasingly leaning towards the pure side, using more FP and less OO. So – Dependency Injection? Really? You could say that DI is just…
MacWire 0.8.0: towards 1.0, tagging, anonymous functions support
A couple of days ago MacWire 0.8.0 got released. It contains a couple of changes and new features. But first, I’d like to thank Marcin Kubala for his contributions. All of the changes are reflected in the guide to DI in Scala. Tags/qualifiers If you have multiple objects of the…
MacWire 0.7: dynamically accessing the object graph
MacWire is a Lightweight and Nonintrusive Scala Dependency Injection library. While it would be great to be able to define in a type-safe way the whole object graph for an application upfront, there are cases when it is necessary to access and extend it dynamically. That’s why MacWire 0.7 contains…
Using Scala traits as modules, or the “Thin Cake” Pattern
I would like to describe a pure-Scala approach to modularity that we are successfully using in a couple of our Scala projects. But let’s start with how we do Dependency Injection (see also my other blogs). Each class can have dependencies in the form of constructor parameters, e.g.: 1 2…
BuildStuff 2013 is over – looking forward to ’14!
I just came back from the BuildStuff conference in Vilnius, Lithuania (actually this was almost a week ago, but I was writing that back at the airport ;) ). Although it’s not so well known, and it’s only the second edition, I must say that it was a really great…
MacWire 0.5: Interceptors
Interceptors are very useful for implementing cross-cutting concerns. Classic use-cases include security, logging or transaction support. Since version 0.5, MacWire contains an implementation of interceptors which can be applied to arbitrary object instances in a Scala-friendly way, and which plays nicely with the traits-as-modules approach. No compile-time or load-time bytecode…
Dependency Injection in Play! with MacWire
The most recent release of MacWire (0.4) (a Scala macro to generate wiring code for class instantiation, DI container replacement) comes with new utilities which make it easier to integrate with frameworks which require by-class instance lookup. An example of such a framework is Play!, which is quite quickly gaining…
MacWire 0.2: Scopes are simple!
MacWire generates new instance creation code of given classes, using values in the enclosing type for constructor parameters, with the help of Scala Macros. DI container replacement. Version 0.2 has just landed! First things first … First, some bad news. Due to limitations of the current macros implementation in Scala…