1
votes

I've started using Scala, Play Framework and currently I'm discovering other technologies from Typesafe Reactive Platform. However, I'm just little bit confused about persistence layer technology which to use. There is Anorm from Play Framework, which is part of the Reactive platform, and Slick, which is part of the platform too. Are there any future plans to prefer one of them in the whole platform (for example to leave Anorm and recommend Slick as major Scala DB technology in Play)? Is it possible to say that one of them is currently under more active development, with brighter future? Or is there any recommendation by Typesafe which one to use with the Typesafe Reactive Platform?

Thank you.

1
They're both totally different projects under active development. What it really boils down to is, do you or do you not like ORMs? - Michael Zajac
@m-z Slick is not an ORM - Gabriele Petronella
But it's "ORM-like". - Michael Zajac
@m-z it's a data persistence layer. It shares some concepts with ORMs, but once you start using it you realize it's a complete different beast. Treating it like an ORM will lead to poorly designed data layers and unexpected behavior (I speak by experience) - Gabriele Petronella
@m-z I'm primarily Java EE developer experienced with JPA/Hibernate, so I'm still trying to learn how Slick differs from classical ORM concept - xwinus

1 Answers

3
votes

This is rather a subjective question, but some objective data can be found:

That being said, they have a different approaches. Anorm is agnostic about the underlying database and it only provides a nicer way to write SQL queries; on the other hand, Slick is db specific and it provides a scala-like syntax for queries.


Personal opinion

I've been actively working on SQL projects in scala over the last two years and my team has moved from Anorm to Slick for new projects. We're also considering moving from Anorm to Slick in existing code bases. Part of the reasons come from personal taste, and part from the objective data above, that make me think Anorm will be progressively discontinued.