You can use batman.js with any backend!
Prevent and allowAndFire for asynchronous operations on a Batman.Set
Batman.js’s prevent
and allowAndFire
make it easy to fire a callback when you’re finished working on the members of a Batman.Set.
Property Caching in Batman.js
Batman.js objects (Batman.Object
instances) have properties defined with @accessor
. These properties are cached until one of their sources busts their cache.
Using Gulp.js to build Batman.js apps without Rails
If the batman-rails gem isn’t an option, gulp.js is a good candidate for compiling batman.js apps for production.
Batman.Model Lifecycle Callbacks
A Batman.Model
has a lifecycle
object that fires events on the record when it’s being dirtied, cleaned, loaded, saved or destroyed.
Loading Child Records from Embedded IDs in Batman.js
Batman.js provides a powerful model associations inspired by Ruby on Rails. But, if you’re loading child items from ids, it’s not going to work out of the box.
Tips for Batman.RestStorage and Batman.RailsStorage
Just a few things I’ve picked up about Batman.RestStorage
and Batman.RailsStorage
.
Christian Life as a Lazy Enumerable
Living a day at a time sounds a bit like lazy enumeration.
Reload HTML for Batman.Views
When working on HTML for Batman.View
s, it can be annoying to refresh and navigate back to wherever you were. Hacking into Batman.HTMLStore
enables you to reload HTML without refreshing
Dynamically-Generated Headers for ActiveResource Requests
Need to add a header to an ActiveResource request? If you need to do it at dynamically at request-time, redefine .headers
.