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.


Longevity Now Persists Events and Views

Longevity 0.6.0 release is now out! There are no new features in this release, just a wide selection of API fixes and improvements. You can read the CHANGELOG for a complete run-down, but there is one API change that I would like to focus on today: Longevity now persists events and views - and whatever else you might want - and not just aggregate roots.


Longevity is Like Hibernate … Except that it’s Not

Longevity is like Hibernate, except that it’s not. The two projects share one major goal: provide persistence support for your domain entities in your enterprise application. But they are more different than same.
While Hibernate is for Java and relational databases, Longevity is for Scala and document databases. Hibernate is also an Object-Relational Mapper (ORM), and longevity is not. Let’s break that down.


Longevity Builds Database Integration Tests For You

Longevity - a persistence framework for Scala and NoSQL - provides a variety of tools to help you test your database application. In tests where you don't want to mock your repositories, but you want to avoid the overhead of persisting to a real database, longevity provides you with a suite of fully functional in-memory repositories. There is also a test class that you can extend to test your database queries - you basically just have to build your queries, and the base class does the rest of the work for you. Finally, longevity provides you with a test class that will exercise all the basic CRUD operations for all your repositories against a test database. In this article, we'll take a look at how we go about setting up the CRUD tests.


Longevity Now Has a Cassandra Back End

Longevity release 0.5 is out! The central focus of this release is the shiny new Cassandra back end.

Longevity is a DDD-oriented persistence framework for Scala and NoSQL. It was originally built with a MongoDB back end, but I've always planned on supporting more kinds of databases. Longevity is mature enough at this point to add a second back end, and I chose Cassandra for a few different reasons.


Longevity: A Persistence Framework for Scala and NoSQL

Longevity is a Domain Driven Design persistence framework for Scala and NoSQL. We currently support MongoDB, with a Cassandra back end coming soon. After having been working on this project for over a year, I am so excited to finally share it with you! I've been working hard to put in a core set of features that would make the tool feasible for you to use in a real application. The result is our MMP release, which we just put out yesterday.


Discontinuing the Introducing Emblem Series

It's been a while since my last post in the Introducing Emblem series, and having had some time to mull it over, I've decided to discontinue the series. It seems silly to be writing what is essentially user documentation as a series of blog posts, when I could be writing user documentation in a more suitable place, such as the wiki for the project's GitHub page.

I've migrated the useful content from the previous blog posts into the wiki. I've also added two new wiki pages there, which would otherwise have made up this blog post. In the new pages, I cover TypeBoundMaps, and how to use emblem's maps with types that do not have exactly one type parameter.

I'll put out a note on Twitter or wherever when I add significant new content to the wiki in the future.