How Batman.js can Help you Build Apps
shopify.com
shopify.com
Calling it Batman.coffee just didn't sound as cool.
Looks very nice! I'm certainly excited to try this out on mobile, as it sounds pretty perfect for that. I'd rather wait for pushState support as I dislike hangbangs. Looking at the source, it would likely be easy to create alternate storage adapters, which is something I'm interested in.
jQuery.extend is a function which copies references to properties out of later objects into the first argument.
CoffeeScript's extends is a language keyword which creates inheritance relationships in CoffeeScript's built in object model. (Which is similar but not identical to the object model in Backbone.js.)
var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) {
for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; }
function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype;
child.prototype = new ctor;
child.__super__ = parent.prototype;
return child;
};
Batman.extends = __extendsBatman.js, unfortunately, only evokes one image.
I think many here are thankful they're not working wherever it is you work.
(I'm still bummed SproutCore didn't take off, but there's little I can do to change things now.)
But I'm very happy with it. It makes some mundane things pretty delightful. Some of the best parts of it, IMO, are a powerful view tier and terse template style. A super easy macro for creating routes and reverse routes. A promising Filter type, that Github indicates is being improved.
Also, you don't need to use NPM to install it. If you're looking to just use it on the client side (I'm using it w/ Python and PHP), just clone the repo.
EDIT: I think what I just said is incorrect since the article makes a backbone comparison
But the server side stuff is optional. At the moment you can persist to HTML5 localStorage or REST.
edit - Further research shows RESTful persistence is the highlight difference and Batman.js is a bit cleaner.
Batman is a great choice if you're using CoffeeScript.
On the other hand, Knockout has way better docs. Batman will get there eventually. But right now it's still pretty rough going.
I've been using batman for a bit now, really loving it.
Looking forward to the event system rewrite that they're working on now to close out some open issues.
and
2) I doubt DC Comics cares
2) I'm sure they care about their trademark being devalued through unauthorized uses.
The real defense batman.js has is that the library is named after a turkish provence: https://secure.wikimedia.org/wikipedia/en/wiki/Batman_Provin...
batWatch = Batman currentCrimeReport: Batman address: Batman number: "123" street: "Easy St" city: "Gotham"
- and -
jokerSimulator.get("why so serious") #=> "WHY SO SERIOUS, HA HA HA!"
kind of destroys the ambiguity.
Don't get me wrong, I think the technology behind batman.js is interesting and useful. I just think it's rather unfortunate that they chose a name with such strong pre-conceptions and that is so childish.
Too many layers of abstraction.
I'm having serious trouble with even jQuery (with IE7,8 for example) on some of the stuff I'm working on, particularly on older machines.