The future of AMS

João Moura
Aug 24, 2015 · 6 min read

Thank you

First of all, I’d like to thank you everyone that have been helping AMS and all amazing open source projects out there. I can’t name you all, but is great to see good developers helping each other.

For those that doesn’t know AMS stands for ActiveModel::Serializer, it’s part of Rails-API. It’s an open source project started by amazing developers, and it integrates with Rails. Its goal is to help bring convention over configuration to JSON rendering. You can check more about the project itself on our Github.

I started using AMS some years ago, and got involved with it, I started contribute to it, and since then I’ve been dedicating myself into make it better. Now it’s time to talk about its future.

The Past

If you already used AMS, you noticed that we had two versions 0.8.x and 0.9.x. Both are pretty different from each other, have some different features, and different needs.

A while ago Steve Klabnik, creator of AMS, decided to start 0.10.x. I got involved into it and committed myself to push it forward, while he moved on with other amazing projects like JSON-API (that now is integrated on AMS) and Rust.

It seems to me that AMS has become more popular on the last months. I’ve being on several conferences talking about it and meeting people interested on its new features and versions. And it feels that I become a kind of spokesperson of it.

Some awesome people that have being helping us a lot are approaching me to know about the AMS future, the priorities and vision. After talking with some of those people, Steve Klabnik and I agreed that I should have wrote this article a while ago and that it’s time for me to do it.

There are three main goals I want to achieve with this article:

  • Give people some perspective about what is being done.
  • Commit with some schedule and pipeline.
  • Help people to contribute, not only with code itself, but share their concerns as well.

The Present

First things first. Before moving into the plan for the future let’s check the current status.

0.8.x and 0.9.x support is iced. I know a lot of you might use the older versions, but we can’t keep supporting it and rushing with 0.10.x at the same time right now.

In the other hand, 0.10.x is rushing like never before, I’ve being working on it almost everyday, and a bunch of people are contributing to it.

The idea is to create a whole environment around 0.10.x that will make it easier for everyone to migrate to it. Then we can start deprecating the older versions and lookup to new ones.

I’d estimate we have around 70% — 80% of 0.10.x done, but if you are a developer you might already know how estimations works, so let’s not get attached to it.

If you haven’t checked AMS repository lately bear with me along some of it’s new features:

  • Adapters Pattern
  • JSON-API support
  • New Cache + Fragment Cache
  • Automatic Pagination (work using JSON-API)
  • New and up to date Docs & HowTo

All this is already implemented on master branch (dedicated to 0.10.x), and some of this features are on RC2.

But there still a whole bunch of smaller features already and even some bigger ones to come. You can check a little bit more about some features itself on my talk on RailsConf 2015 (linked here and video bellow).

In case you are wondering, RC2 is stable, some people are already using it on production, I as well am using a fork of it. Master is also stable, and we plan to keep it across all 0.10.x development, so I recommend for everyone to give it a try and share this doubts and issues.

The Future

All right, this is what a lot of people might be waiting for, some clarification around AMS future.

Some of you might already know but Rails-API and AMS itself have been dating Rails 5 for a while. Rails-API was merged into it on June 11th, and took AMS with it.

This means that the under-development version of Rails 5 uses AMS by default (The 0.10.x RC2 version). YAY!

This is something we are excited about, but there is also a lot of responsibility and pressure involved. Some of Rails crew helped us into figuring out some cool features we all wanted to have included, and it become part of 0.10.x development roadmap.

We also need to take some important decision, because right now we are becoming more tied to ActiveRecord and ActiveModel. So we may need to decide to embrace it for now and work on fallback for PORO later. I know some of you want to use 0.10.x on PORO so share your concerns, please.

Before going into features and details, it’s time to set up a due date to 0.10.x. I would like to start by comitting to have a new RC on September 10th, followed by a final release on on October 29th.

But to achieve these dates I need to clarify what exactly we want to include on the next version and what are the priorities. Here is a list of things that are missing and need to get done by November 29th.

  • Deserialization (for both JSON-API and JSON).
  • Docs describing new features.
  • Docs describing how to update form 0.8.x and 0.9.x versions.
  • A better AC/Serializers integration API (it might need some work on Rails).
  • Provide better naming for JSON Adapter.
  • Add support to all conventions on JSON-API, including all level links.
  • Bring Filter back from older version.
  • Russian Doll Cache (use #fetch_multi).
  • Start handle nested associations (still need some discussion).

This will be the 0.10.x missing features pack from now on, unless I’ve forgot something or something important come up.

Most of those feature already have their owners, some might have issues or maybe a PR in place, but there is still a lot of work to do.

What will follow the 0.10.x release is a clean up. There are a bunch of old issues and old PRs that need to be reviewed, deleted or bumped. After that we will discuss deprecate and stop supporting older versions and make 0.10.x the 1.0.

To achieve all this we count on the community that have being supporting us so far. I’ve being following the amazing work some of you are doing and I’m sure this new version will be awesome, thanks to all of us.

Nowadays I’ve have being active at #rails-api channel on IRC, but I know that a lot of people are not used to IRC. So taking into consideration that Rails-API organization might join Rails, I decided to create a Slack organization to make it easier to everyone to stay in touch while developing 0.10.x. I’m still not sure if we will keep it activated after 0.10.x release, but from now on I’ll be online on it and on IRC as well.

Slack link:

All right, this is longer than I expected already and I think that the main goals were achieved. I’ll organized the Github repository by flagging the features and issues I mentioned and also update the milestone.

I’ll try to read to most of the comments you end up writing in this article but the best way to share your thoughts and concerns is through IRC or Slack.

1 P.S. If you want to know more about AMS new version and also have interest on some Elixir, would be nice to see you on RubyConf Brazil, I’ll be speaking about both there. But I’ll probably also show up on RubyConf Colombia and RubyConf Us as well :)

2 P.S. Also make yourself comfortable to reach me through @joaomdmoura on twitter.

This is it.

Again, thank you so much for everyone contributing to all kind of open source projects around, you’re the real MVP.

Thanks to Guillermo Iguaran

João Moura

Written by

I'm an Engineering Manager at Toptal, specialized in Data Science, I'm also a Passionate international Speaker that loves Open Source

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade