TL;DR: Quicklens: modify deeply nested fields in case classes, e.g.: modify(person)(_.address.street.name).using(_.toUpperCase). Similar to lenses, but without the actual lens creation. Lenses are very useful when you have to update a deeply nested field in a hierarchy of case classes. For example if we have: 1 2 3 4 5 case…
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…
Supler 0.2.0: docs and features added, bugs removed
Supler is a library which makes writing complex forms easier. It has a server-side (Scala) and a client-side (JavaScript) component. In December we announced the 0.1.0 release, so it’s about time for an update! The biggest improvement for Supler uses will probably be the brand new documentation. We now have…
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…
Supler 0.1.0: complex forms made easier
Supler aims to make complex web forms development easier, without tying you to a web framework. Supler provides a server-side DSL for defining forms, generating a JSON form representation, applying values received from the client, validating and running actions. It also provides a front-end renderer for the forms, client-side validation,…
Clustering reactmq with akka-cluster
In the last two posts on reactmq, I described how to write a reactive, persistent message queue. The queue has the following characteristics: there is a single broker storing the messages, with potentially multiple clients, either sending or receiving messages provides at-least-once-delivery; receiving a message blocks the message; unless it…
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…
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…
Making the Reactive Queue durable with Akka Persistence
Some time ago I wrote how to implement a reactive message queue with Akka Streams. The queue supports streaming send and receive operations with back-pressure, but has one downside: all messages are stored in-memory, and hence in case of a restart are lost. But this can be easily solved with…
Evaluating persistent, replicated message queues (updated w/ Kafka)
An updated and extended version of this post is available on SoftwareMill’s website. Below you can find the original content containing benchmarks from 2014. Update 17/07/2014: added Kafka benchmarks Update 20/03/2015: updated HornetQ replication description Update 4/05/2015: updated & extended version here Message queues are useful in a number of…