Live data from Hacker News

Announcing the first release of batman.js

batmanjs.org

31–40 of 78 posts

Re: Announcing the first release of batman.js

#31
post #27

Earlier quoted context omitted.

CoffeeScript

Right, I just read the comments below. There's no mention of CoffeeScript anywhere. CoffeeScript is not JavaScript. If it's a JavaScript framework, please give code examples in JavaScript.

CoffeeScript compiles to Javascript. Batman.js can most certainly be a Javascript framework and give examples in CoffeeScript. Many people prefer CoffeeScript for a variety of reasons, including readability.

Also, you aren't entitled to dictate instructions to other people who are giving you the benefit of their hard work. It's rude and obnoxious.

Re: Announcing the first release of batman.js

#32
post #20

This sounds more or less like Backbone.js. How does it compare to that? The name is amusing, but a bit silly -- "What are you guys using for all of your cool AJAXy stuff?" "Batman."

Well, somehow this doesn't sound wierd for most people: - What are you using to create all those designs? - An apple;

Re: Announcing the first release of batman.js

#33
post #8
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…

Just two sentences after that, it lists exactly what it offers. One click away is the homepage which has much more detail. Are you seriously _so busy_ that you can't read a couple of lines more? And if you really are, please do practice skimming!

I am a JS community outsider and I am reading this over breakfast. I couldn't figure out what I was looking at: Server-side? Client-side? Both? Then I thought, hey it's from Shopify, it must be client-side because Shopify is running on Rails. Right? But then, why routing? And then the second bullet item list says, "server-side batman.js is not yet very useful". So there it is running on both after all? Necessarily?

After giving up on the blog post, the index page of batmanjs was great though. I think it should've been linked to instead.

Re: Announcing the first release of batman.js

#34

Earlier quoted context omitted.

Right, I just read the comments below. There's no mention of CoffeeScript anywhere. CoffeeScript is not JavaScript. If it's a JavaScript framework, please give code examples in JavaScript.

CoffeeScript compiles to Javascript. Batman.js can most certainly be a Javascript framework and give examples in CoffeeScript. Many people prefer CoffeeScript for a variety of reasons, including readability. Also, you aren't entitled to dictate instructions to other people who are giving you the benefit of their hard work. It's rude and obnoxious.

Your strawman argument that I'm dictating instructions is rude and obnoxious. Read my post again.

Re: Announcing the first release of batman.js

#35

Earlier quoted context omitted.

The subtext is that you should learn CoffeeScript. It's an alternative syntax, not a new language. They wrote you a nice library and are giving it away under an MIT license. You don't get to pick the style they use to write the examples. That's like going to a science lecture and walking up to the speaker afterwards to say, "Hey, I think you have some great theories, but you really should lose that Australian accent…

They wrote you a nice library and are giving it away under an MIT license. You don't get to pick the style they use to write the examples. This is a response to something nobody's saying. Obviously if they write it they get to choose pretty much everything about it. Nobody is disputing such a thing. However, if one of the goals in releasing this is to be maximally useful, isn't the fact that raw Javascript is more re…

This will be maximally useful if you learn CoffeeScript.

Re: Announcing the first release of batman.js

#36
post #27

Earlier quoted context omitted.

CoffeeScript

Right, I just read the comments below. There's no mention of CoffeeScript anywhere. CoffeeScript is not JavaScript. If it's a JavaScript framework, please give code examples in JavaScript.

Except for at the top of the example you pasted, and at the top of the documentation page, under "Introduction" in big letters, whe it says "batman.js is a framework for building rich single-page browser applications. It is written in CoffeeScript and its API is developed with CoffeeScript in mind, but of course you can use plain old JavaScript too."

Where were you looking?

Re: Announcing the first release of batman.js

#37
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…

I still don't really understand when I would consider using it. Would you use it to create some or all of Shopify?

Maybe this blurb from the documentation could find its way to the hoe page:

batman.js is a framework for building rich single-page browser applications. It is written in CoffeeScript and its API is developed with CoffeeScript in mind, but of course you can use plain old JavaScript too.

Re: Announcing the first release of batman.js

#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 :)

Re: Announcing the first release of batman.js

#39
post #27

It says it's for JavaScript, but I don't even know what language the code example is in. What is this?! # Create our application and namespace. class Alfred extends Batman.App @global yes @root 'todos#index' # Define the principle Todo model with `body` and `isDone` attributes, and tell it to persist itself using Local Storage. class Alfred.Todo extends Batman.Model @global yes # global exposes this class on the glob…

CoffeeScript

Shouldn't it be named batman.coffee?

Re: Announcing the first release of batman.js

#40
post #5

I'd like to see some examples in JavaScript, instead of CoffeeScript. Since at this point only a smaller subset of developers use CoffeeScript, I think it might be overall useful to more people if the provided examples used plain JavaScript (that, and CoffeeScript developers tend to understand JavaScript already, and may already be used to converting one to the other).

In some cases (e.g. "class Box extends Batman.Object"), the corresponding JS would be much more verbose and less immediately grok-able. I think CoffeeScript is mainstream enough at this point that CoffeeScript-based documentation is a fine thing. Especially since, as they say at the top of the page, Batman.js "is written in CoffeeScript and its API is developed with CoffeeScript in mind."

> In some cases (e.g. "class Box extends Batman.Object"), the corresponding JS would be much more verbose and less immediately grok-able.

True, but that just basically means that using JS with Batman.js is going to be a pain. In backbone.js you also extend their base classes, but you do it in a js-friendly way (var Widget = Backbone.Model.extend).

Not that there is anything wrong with a CS framework, but they should just say that it's a CS framework. The way CS compiles it's class inheritance to JS is not something I'd want to write raw.

Post reply on HN