The other thread I started (Managing Database Migrations), I was asking about manging database updates between releases. I’d like to start a discussion here about choosing a framework to manage our persistence of our custom domain objects that we’ll be developing for our apps. Examples: Protocol Definitions, Cohort Definitions, Concept Sets, User Profiles (if we create our own), basically anything that we’re going to need to define to support our applications.
I’d also like to draw a line here between sql that runs analyses, or cohort building logic, or special method logic, vs. the sql that our apps use to save state to the database. I’d like to not use sqlRender to manage the CRUD operatons that we will need in our apps. I think there’s better tools that abstract the database layer for us.
So, on the note of dabase abstraction layers, it seems the Java Persistence API (JPA) is the way to go, and there is a few recent implementations of it that supports the latest standard (which I believe is 2.1). There also seems to be some variation in the functionality of the implementations out there, from simple and easy to implement to robust (think: lazy loading, relations support, etc) but could be a bit trickier to manage.
I do have experience with Entity Framework, and while that’s not a Java technology, it has similar concepts such as entity repositories, annotiaons to describe field mappings, etc.
I’d like to hear what people would recommend to use, and what they think would be the quickest to implement. We’re at the point in CIRCE and HERACLES development that we’re going to need to save/load data from the database, and I’m not sure a decision has been made yet on how that will happen.
-Chris