Batman 0.8.0 released: Association support, pagination, and stability.
posted on 22 November 2011
Batman 0.8.0 is available on github and npm now.
The main new features:
Serious association support
You can now tell your models about their associated records and they will lazily fetch them, reload them, and deserialize them from inline JSON.
The objects returned by the association getters are smart enough to know if they have already been loaded, and they define a
load function which you can use to reload them. Association can be loaded via inline JSON (like in the Shopify API) and they save themselves by serializing into their parent’s JSON, which means they work out of the box with Rails models which
accept_nested_attributes_for their children.
Batman can now paginate a large server side set without much work from you. You just have to tell it what parameters to send to the server, and then interpret them on the server side.
A huge swath of bugs have been squashed, so batman should be even easier build awesome apps with. Batman uses a whole lot less memory now as well, so it should be that much faster. For more information on what bugs have been fixed, see the changelog. As always, if you want to help squash some yourself, you can head over to Batman on Github and help us out!
We’d also like to thank all the people on GitHub which have helped us get to this point so far: Pieter van de Bruggen, Damir, Willem van Bergen, Marcin Ciunelis, Brian Beck, Paul Miller, David Mosher, Tobias Lütke, Kyle Finley, Morita Hajime, Fernando Correia, Erik Behrends, cj, Richard Hooker, Rasmus Rønn Nielsen, and Jonathan Rudenberg. Air high five!
It takes about 10 seconds to get a bare app generated and running on localhost, so it’s easy to start exploring. Take a look at the documentation and examples, build some cool stuff, and tell us all about it :)