Longevity Framework Cares About Code Quality

We care a lot about code quality here at longevity framework. You can rest assured that longevity is well-designed, has clean code, and a robust test suite. As of now, code coverage comes in at 95.02% statement, and 93.44% branch, as measured by sbt-scoverage. What software projects do you know of that have that kind of coverage?


Longevity Getting Started Guide Now Available

I'm happy to announce that the Getting Started Guide for longevity is now available. It walks through a sample application called Simple Blogging, which uses longevity on the back end, and Akka HTTP on the front.

This guide will walk you through the basics of using longevity within a real application.


Longevity Now Has a Streamlined API!

I'm very excited to announce the 0.9.0 release of longevity, which features a whole slew of API improvements that make longevity much easier to use and understand. Here are the three most significant changes:

  • Shorthands are gone
  • Assocs are gone
  • The API for Key and KeyVal has been reworked for significant ease-of-use improvements
I'll discuss each of these changes in more detail below.


Longevity Now Supports Querying with Akka Streams

I'm excited to announce longevity release 0.8, which features streaming queries with Akka Streams! Prior to this release, longevity queries returned a list of results wrapped in a future, which was sort of only half-way reactive, and definitely wouldn't work in the face of query results that were too large to fit into memory. I was never particularly happy with this, but I had enough to do at the time with designing and implementing the query DSL.


Longevity Release 0.7.0 - Entity Polymorphism

Longevity release 0.7.0 is out! The major focus of this release is support for entity polymorphism - that is, subtyping - in your domain model. This is a critical usability feature. It's also hopefully the last of what I might call "core features": those features that require me to go back and rework the core code of the longevity engine, consequently causing major ripple effects throughout the project. So this is a big release for me! It's a critical feature, and hopefully the last feature in a while that takes me a month to complete!

From the outside looking in, it may not seem like supporting subtyping in your domain model should be such a big deal. To understand why this is, I need to step back and discuss some of the key principles and design decisions I made in this project.


An API Design Conundrum

Over the past months, I've been working through a tricky API design problem in the longevity project. After a number of trials, I think I've finally come up with something that does not feel kludgy, and is easy for the user to understand and use. In this post, I will describe the problem I was having, and what makes it difficult. I will show some of my solutions that didn't work so well, and finally, present the solution I've landed on. It's not perfect, and never will be, so I am eager to hear any thoughts you might have on it.