Merging project repositories

Hey folks,

It’s been over 2 years since first usable version of rom was released and we’ve learned a lot during that time. One thing that we value a lot is proper separation of concerns, with good abstractions that allow us to grow the whole system easily. This requires some level of experimentation and learning and it feels like we’ve done enough to know how rom project should be organized so that developing, maintaining and using it is simpler. Originally rom repository on github provided core APIs and adapter API, then rom-sql was the first usable adapter built on top of Sequel. Later on rom-repository project was started, we also went through an intermediate phase where some APIs were part of rom-support project (now discontinued as we distributed its functionality across other gems, including dry-core). Recently Changeset API was added to rom-repository, and it’s growing pretty fast, and it should become a separate gem too.

Right now rom has a big set of distinct APIs, it’s very easy to classify them as either core, adapters, extra plugins or additional functionality which you may or may not need. It’s also (finally!) easy to define what rom stack should be, and where certain functionality should live. Apart from implementation details, there’s also the aspect of maintenance/development burden, as well as how easy it is to report issues and/or contribute to rom. With these things in mind, and based on our experience so far, we’ve decided to merge main projects into a single repository, and turn rom gem into a meta gem which will bundle most common functionality.

When it comes to code and gem organization, here’s what we’ve come up with:

  |- core
    |- rom-core.gemspec # new gem - core APIs for all adapters and extensions
  |- mapper
    |- rom-mapper.gemspec # built-in mappers
  |- repository
    |- rom-repository.gemspec # built-in repository abstraction that exists already
  |- changeset
    |- rom-changeset.gemspec # new gem based on existing functionality extracted from rom-repository
  |- rom.gemspec # meta gem combining core+repository+changeset

This change in organization means few things:

  • issues not related to any adapter will live in the same repo
  • developing rom will be simpler as we won’t have to jump between projects
  • contributing should become simpler too
  • releasing gems will be simpler and more consistent
  • most people won’t have to care about individual gems, just add rom and an adapter that you need to Gemfile and you’re done

We’d like to do this as part of rom 4.0 release.

Important: if you think this is a stupid idea please tell us why. I talked about this with Nikita and Tim so far, they like the idea, but we’re open to feedback (as always).



Update: gem merging has been done, check out rom-rb/rom to see the new structure.