I recently wrote about Event Sourcing and Free Monads. The natural next step is combining the two! How would a free monad adjusted for event sourcing look like? Please bear in mind that the below is just really a draft, not a complete solution. Hence any suggestions for improvements are…
Category: Languages
MacWire 2.0: composing modules & cleanup
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…
When & why to use Supler for web forms?
If you haven’t yet heard about Supler, it’s a Rapid Form Development library, working with your favorite Javascript frontend and Scala backend frameworks. It keeps the form definition centralized, taking care of client/server-side validation, form rendering, applying new values and serializing/deserializing. Star Supler on GitHub if you think that might…
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.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,…
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…
Traffic simulation game in Elm
A couple of weeks ago I read about Elm, a new functional language, which compiles to JavaScript and HTML. Elm is designed with the browser in mind, most notably by implementing Functional Reactive Programming (FRP). The syntax of Elm is Haskell-like, has only a few basic constructs and is very…
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…
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…
Verifying usage of 3rd party libraries using Veripacks
Veripacks already allows to specify and verify which classes should be visible outside of a package (in a package-transitive way) as well as require importing and import packages within a project. This makes it possible to eliminate some build modules, while still keeping their strict isolation (which can be checked…