Live data from Hacker News

Announcing the first release of batman.js

batmanjs.org

61–70 of 78 posts

Re: Announcing the first release of batman.js

#62
post #15
post #6

From the site: "It gives us great pleasure to finally announce the release of batman.js to the JavaScript community today. This release represents the first code dump of something we’ve been working hard on at Shopify for a long time, so we’re very excited to get it into your hands and see what you do with it." I got zero value out of this lead. When you launch a product like this, please tell us why we'd want to use…

Sure, I'll break it down: batman.js is a JavaScript framework for rich JavaScript applications. It's designed to make development as fast and as painless as possible for developers and designers while giving them lots of power. We designed everything around a number of primary goals such as convention over configuration, HTML-based views, and the principle of least surprise. This is something we're using at Shopify i…

Sure, I'll break it down: batman.js is a JavaScript framework for rich JavaScript applications. It's designed to make development as fast and as painless as possible for developers and designers while giving them lots of power.

Still nada. What does it actually do? A framework for doing what w.r.t. rich JavaScript applications? Is this like Cappuccino? How does this "make development as fast and as painless as possible for developers and designers while giving them lots of power"?

Re: Announcing the first release of batman.js

#63
post #62
post #15

Earlier quoted context omitted.

Sure, I'll break it down: batman.js is a JavaScript framework for rich JavaScript applications. It's designed to make development as fast and as painless as possible for developers and designers while giving them lots of power. We designed everything around a number of primary goals such as convention over configuration, HTML-based views, and the principle of least surprise. This is something we're using at Shopify i…

Sure, I'll break it down: batman.js is a JavaScript framework for rich JavaScript applications. It's designed to make development as fast and as painless as possible for developers and designers while giving them lots of power. Still nada. What does it actually do ? A framework for doing what w.r.t. rich JavaScript applications? Is this like Cappuccino? How does this "make development as fast and as painless as possi…

It's a rapid development tool for front-end development. If I'm reading the documation correctly, I think it's based on the MVC architecture.

Sure, you could make your backend in plain Ruby, but if you learn to use Rails you can do things quicker.

Sure, you could make your frontend in plain JavaScript, but if you learn to use batman.js you can do things quicker.

Re: Announcing the first release of batman.js

#64
post #49

This looks fun. We (at BigDoor) have built some of these same pieces using Knockout ( http://knockoutjs.com/ ) as a starting point. I'll be trying this out for comparison in some prototypes for sure.

I also use knockout.js for a project and batman.js looks like it has some similarities but it seems to be filling some holes that knockout.js leaves you to fill your self.

Re: Announcing the first release of batman.js

#65
post #15
post #6

From the site: "It gives us great pleasure to finally announce the release of batman.js to the JavaScript community today. This release represents the first code dump of something we’ve been working hard on at Shopify for a long time, so we’re very excited to get it into your hands and see what you do with it." I got zero value out of this lead. When you launch a product like this, please tell us why we'd want to use…

Sure, I'll break it down: batman.js is a JavaScript framework for rich JavaScript applications. It's designed to make development as fast and as painless as possible for developers and designers while giving them lots of power. We designed everything around a number of primary goals such as convention over configuration, HTML-based views, and the principle of least surprise. This is something we're using at Shopify i…

"batman.js is a JavaScript framework for rich JavaScript applications. It's designed to make development as fast and as painless as possible for developers and designers while giving them lots of power."

That sounds like a pitch I would give a non-techie manager or client. Someone who's been around computers enough to know that javascript is the thingie that makes web pages do stuff.

Your target audience is developers, yes? We can take it. The first thing in your pitch should be how it helps, not "We'll save you lots of time, we promise. Trust us!"

Re: Announcing the first release of batman.js

#67
post #46

Earlier quoted context omitted.

Their framework is intended solely for coffeescript devs. Here's their example in javascript: (function() { var Shopify; 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__…

To be fair, that's the compiled CoffeeScript. While it certainly is still fairly readable (even writable), the JavaScript you write by hand won't have the same "compiled feel".

This is more like what you would write by hand for the above code if the core constructors had a Backbone-style .extend function [1], which it likely would have if normal JavaScript usage was considered for the initial release (which I recognise is what this is - you can't expect everything first time):

    var Shopify = Batman.App.extend()
    Shopify.root('products#index')
    Shopify.resources('products')

    Shopify.Product = Batman.Model.extend()
    Shopify.Product.persist(Batman.RestStorage)

    // I'm never sure about how much I'm expected to mimic CoffeeScript code
    // when using libraries written in CoffeeScript and the source code is
    // written in a language I'm not practiced at reading - I've been bitten in
    // the past by CoffeeScript-only examples which *assume* you're transpiling
    // to JS in your head to insert the implicit return of the result of the
    // last expression.
    Shopify.ProductsController = Batman.Controller.extend({
      index: function() {
        return this.redirect({action: 'show', id: 1})
      }

    , show: function(params) {
        return this.product = Shopify.Product.find(params.id)
      }
    })
If there's common boilerplate associated with each constructor, you could also go further and customise the extend method for each one to take care of it if provided with certain configuration details, e.g.:

    var Shopify = Batman.App.extend({
      root: 'products#index'
    , resources: 'products'
    })
It always puzzles me that people look at some of the implementation details CoffeeScript shields programmers from and throw their hands up in the air and admit defeat [2] when we have a language as flexible as JavaScript at our disposal to hide some of the uglier implementation details in APIs we define.

[1] https://github.com/documentcloud/backbone/blob/master/backbo...

[2] http://news.ycombinator.com/item?id=2923694

Re: Announcing the first release of batman.js

#68
post #38

Although we had a great talk about it at JSConf, I don't remember if Shopify is using it in production yet ... Which bits of Shopify is it currently powering?

A number of Shopify future products are being/have been built from the ground up using batman.js :)

Much like the description of the framework i think people are looking for a more specific answer to this question. I'm starting to think you are a super hero yourself. Captain Vague we'll call you.

Re: Announcing the first release of batman.js

#69

Earlier quoted context omitted.

>It's an alternative syntax Right... "alternative"... so makes sense to not give examples entirely in it unless your framework is intended solely for Coffeescript users.

Their framework is intended solely for coffeescript devs. Here's their example in javascript: (function() { var Shopify; 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__…

I'm not trying to be obnoxious or anything but doesn't this just show how much cleaner CoffeeScript is compared to js?

Re: Announcing the first release of batman.js

#70
post #15

Earlier quoted context omitted.

Sure, I'll break it down: batman.js is a JavaScript framework for rich JavaScript applications. It's designed to make development as fast and as painless as possible for developers and designers while giving them lots of power. We designed everything around a number of primary goals such as convention over configuration, HTML-based views, and the principle of least surprise. This is something we're using at Shopify i…

"batman.js is a JavaScript framework for rich JavaScript applications. It's designed to make development as fast and as painless as possible for developers and designers while giving them lots of power." That sounds like a pitch I would give a non-techie manager or client. Someone who's been around computers enough to know that javascript is the thingie that makes web pages do stuff. Your target audience is developer…

Man, tough audience.
Post reply on HN