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: Macros
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…
Quicklens: traversing options and lists
Quicklens is a small library which allows to modify deeply nested fields in case classes e.g.: modify(person)(_.address.street.name).using(_.toUpperCase), without the need to create dedicated lens objects. I got some very good feedback on the initial release – thanks! There’s also a spin-off implementation, using a different syntax. One problem that I…
Introducing Supler: a Functional Reactive Form Library
Let’s face it. Creating websites with complex forms is a pain. Writing the HTML in the frontend, the supporting javascript, defining mappings in the backed, server-side validation, and – let’s not forget, it’s 2014 – corresponding client-side validation, cause a lot of duplication of code and effort, and result in…
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…
Java Zone 2013 trip report
This year I had the chance to attend JavaZone 2013. So far I mainly knew JavaZone from their conference trailers (e.g. Javapocalypse or Java 4-ever). But now as my talk got accepted to the conference, I could see for myself how the real thing looks like. First of all, the…
Automatic generation of delegate methods with Macro Annotations
Macro Annotations are a new type of macros, which are one of the candidates for inclusion (see also comment by Eugene below) in the upcoming Scala 2.11 release. However, thanks to the recently released Macro Paradise Scala 2.10 compiler plugin, with an extra option in the compiler/SBT settings, you can…
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…
Implementing factories in Scala & MacWire 0.3
Factories are useful when we need to create multiple instances of a class at run-time, usually providing some parameters, but still without using new explicitly; we want to make some complex object creation abstract. The created object may depend both on runtime-provided data (the parameters), and some other “services”. MacWire…