Live data from Hacker News

Tower.js - JavaScript Framework for Node.js modeled after Ruby on Rails

towerjs.org

81–90 of 118 posts

Re: Tower.js - JavaScript Framework for Node.js modeled after Ruby on Rails

#81
post #66
post #30

Earlier quoted context omitted.

...you know JavaScript well and haven't bothered to "learn" the second-most-popular dialect? Take ten minutes right now and read through the CoffeeScript reference-- poof, you learned it. It is just JavaScript. Really, no one's forcing you to write it. But if you have a working understanding of JavaScript and you can't read CoffeeScript fluently, it's because you aren't trying. Just swallow your pride and deal with i…

you know JavaScript well and haven't bothered to "learn" the second-most-popular dialect? Come on, what kind of percentage are we talking about here? Tiny. Absolutely tiny. Take ten minutes right now and read through the CoffeeScript reference-- poof, you learned it. It is just JavaScript. Well, you haven't learned it unless you memorised absolutely every aspect of it, which you're unlikely to do on a first read. And…

>Well, you haven't learned it unless you memorised absolutely every aspect of it

Oh man!

I guess I don't know any programming languages whatsoever.

Re: Tower.js - JavaScript Framework for Node.js modeled after Ruby on Rails

#82
post #73

Earlier quoted context omitted.

What I as one of your downvoters argue is that it doesn't take more than an hour to learn CoffeeScript. I don't believe anyone is arguing that it should be labeled as JS when it's CS. What made me downvote both your original and this comment is that I can't accept that you (seemingly) write a lot of code in JS, but don't want to spen just 1 hour to learn CS properly (I know it takes this short, because I just did it…

This pervasive assumption of CoffeeScript's superiority as a foregone conclusion is ridiculous. There are so many excellent JavaScript programmers that choose not to program in CoffeeScript for so many reasons, that it's surprising to see the extent of this assumption. Defend the merits of CoffeeScript all you want, I'm not even bothering to argue with you about them, and _I even conceded already that it does in fact…

>Why on earth is this disturbingly so objectionable?

Ruby dev here with limited JS/CS knowledge. Are there any sections of CS where the semantic mapping to JS is not obvious? It took me about five minutes to figure out what was going on.

Re: Tower.js - JavaScript Framework for Node.js modeled after Ruby on Rails

#83

Would some node.js experts mind weighing in here with pros and cons of this framework as they see it? I'm too new to node to really understand the tradeoffs here. Thanks!

You'd have to already know CoffeeScript and Rails to benefit from this framework. I've used neither so personally I'd have a lot of trouble and a steep learning curve. This builds on top of two other frameworks (Connect and Express) so I imagine the dependency stack for this framework is really long which might make debugging painful.

Not necessarily, it's effectively no different than if you were to support the same feature-set in the single library

Re: Tower.js - JavaScript Framework for Node.js modeled after Ruby on Rails

#84
For anyone turned off by the CoffeeScriptiness of the page, here's a bookmarklet that will compile the CoffeeScript into JavaScript:

  javascript:(function(e,a,g,h,f,c,b,d)%7Bif(!(f=e.jQuery)%7C%7Cg%3Ef.fn.jquery%7C%7Ch(f))%7Bc=a.createElement(%22script%22);c.type=%22text/javascript%22;c.src=%22http://ajax.googleapis.com/ajax/libs/jquery/%22+g+%22/jquery.min.js%22;c.onload=c.onreadystatechange=function()%7Bif(!b&&(!(d=this.readyState)%7C%7Cd==%22loaded%22%7C%7Cd==%22complete%22))%7Bh((f=e.jQuery).noConflict(1),b=1);f(c).remove()%7D%7D;a.documentElement.childNodes%5B0%5D.appendChild(c)%7D%7D)(window,document,%221.6.1%22,function($,L)%7B$.getScript(%22http://cdnjs.cloudflare.com/ajax/libs/coffee-script/1.2.0/coffee-script.min.js%22,function()%7Bvar%20a;a=$(%22code.coffeescript%22);a.each(function()%7Bvar%20a;a=$(this).text();return%20$(this).text(CoffeeScript.compile(a,%7Bbare:!0%7D))%7D);return%20a.each(function()%7Breturn%20prettyPrint(this)%7D)%7D);%7D);
Aside from CoffeeScript's __hasProp and __extends boilerplate at the top of each code sample, it's pretty readable if anyone's interested.

I still think it ought to decide whether it wants to be a CoffeeScript or JavaScript framework, though.

Re: Tower.js - JavaScript Framework for Node.js modeled after Ruby on Rails

#85
post #73

Earlier quoted context omitted.

What I as one of your downvoters argue is that it doesn't take more than an hour to learn CoffeeScript. I don't believe anyone is arguing that it should be labeled as JS when it's CS. What made me downvote both your original and this comment is that I can't accept that you (seemingly) write a lot of code in JS, but don't want to spen just 1 hour to learn CS properly (I know it takes this short, because I just did it…

This pervasive assumption of CoffeeScript's superiority as a foregone conclusion is ridiculous. There are so many excellent JavaScript programmers that choose not to program in CoffeeScript for so many reasons, that it's surprising to see the extent of this assumption. Defend the merits of CoffeeScript all you want, I'm not even bothering to argue with you about them, and _I even conceded already that it does in fact…

I completely agree with you about the title, as I've said it twice already (thrice, including this one!). What I completely disagree is the other parts of your original comment.

I wish you the best regardless of your scripting language of choice! :)

Re: Tower.js - JavaScript Framework for Node.js modeled after Ruby on Rails

#86
post #58

Earlier quoted context omitted.

> I really think writing any script longer than 20 lines in JavaScript instead of CoffeeScript is stupid) I think OP will get by without your career advice pretty well.

You can never know! That's what I'm saying. it's not like learning a new programming paradigm (like functional) that will take days or weeks, it will take 10 minutes reading www.coffeescript.org front page to see if my career advice is right or wrong. You can't call yourself a nerd without knowing the most thriving dialect of that language... Specially if you're young and reading a hacker website. I realy don't want…

First of all, I'm not condemning using CS. Frankly, I couldn't care less if you use it or not. If it fits your needs, good for you. Second, OP is probably a big boy and can decide for himself (as can I) what tools to use to get stuff done. Pissing contests like 'you are not a nerd if...' are not for me, so let's not 'get into a virtual pointless argument'.

Re: Tower.js - JavaScript Framework for Node.js modeled after Ruby on Rails

#87
post #61

Earlier quoted context omitted.

I'm going to reply to my own comment in order to address the numerous responses all at once. First, I'll establish some modest authority on the subject by pointing out that I've worked directly with Tim Caswell, who helped create CoffeeScript, at multiple jobs now. He's explained to me how they developed it and we've discussed the merits of it. Second, I don't believe CoffeeScript is lacking merit. I make no claims o…

What I as one of your downvoters argue is that it doesn't take more than an hour to learn CoffeeScript. I don't believe anyone is arguing that it should be labeled as JS when it's CS. What made me downvote both your original and this comment is that I can't accept that you (seemingly) write a lot of code in JS, but don't want to spen just 1 hour to learn CS properly (I know it takes this short, because I just did it…

You end by saying that downvoting !== hating him or disagreeing with everything he thinks, yet I can't find a worse reason to downvote than the explanation you gave right before: you literally downvoted him because of a personal decision he makes in his life that affects no one else regarding the learning of a programming language, and not at all for any factual inaccuracy in his comment.

He never said anyone else should not learn CoffeeScript nor that CoffeeScript was bad, but that for whatever reason in his own personal life it hasn't become valuable enough to do so. And yet still, the point of his comment had nothing to do with that, and instead simply requests that stories be labeled accurately. Seems completely uncontroversial to me.

Re: Tower.js - JavaScript Framework for Node.js modeled after Ruby on Rails

#88
post #61
post #8

Thanks for the efforts and the framework. Unfortunately, I cannot properly appreciate it for the following reason: Please don't call something JavaScript if it's actually all in CoffeeScript (even if it's just the documentation). A lot of us have not bothered to learn CoffeeScript and a good many of them have no intention of doing so. My time was wasted following a link that says "JavaScript", a language I know well,…

I'm going to reply to my own comment in order to address the numerous responses all at once. First, I'll establish some modest authority on the subject by pointing out that I've worked directly with Tim Caswell, who helped create CoffeeScript, at multiple jobs now. He's explained to me how they developed it and we've discussed the merits of it. Second, I don't believe CoffeeScript is lacking merit. I make no claims o…

Are you arguing the HN title or the site description?

Re: Tower.js - JavaScript Framework for Node.js modeled after Ruby on Rails

#89

Would some node.js experts mind weighing in here with pros and cons of this framework as they see it? I'm too new to node to really understand the tradeoffs here. Thanks!

It's basically as advertised, RoR for Node.js. This means it has an ORM, has scaffolding, etc. Looks like it takes advantage of express.js and is an abstraction over it.

Personally, this was how I was creating sites 3 years ago. I made my own framework that does pretty much the exact same thing.

I've completely dropped this in favor of using bidirectional message passing, because imo that's what Node really excels at and it's not something you can get with RoR. If you are using Node.js, it's a good thing to have a framework that does bidirectional real-time communication out of the box. I'm not sure if tower.js supports this or not.

At a very basic level, this is all I need to think about in terms of the API to get some data passed around in my current workflow. I've yet to find something more suitable for myself personally.

CLIENT (mobile or web)

// request data

request = messenger.request('get me a list of things', message);

request.success (response)->

// listen for events from server

messenger.on('someone got something', (message)->

SERVER

// listen for data

messenger.on('get me a list of things', (message)-> message.reply(data)

// emit data

messenger.send('someone got something', data)

Re: Tower.js - JavaScript Framework for Node.js modeled after Ruby on Rails

#90
post #18

Earlier quoted context omitted.

"a language I have not bothered to learn, nor do I plan to anytime soon" That's why I down voted you. Is a JS compiler beneath you? Fine. Then post about that. Don't try to slip it into a veiled complaint about title accuracy.

So it is fair to call any library written in C an ASM library? C compiles to ASM (in most implementations) after all...

Oh, come on. How can you be at all familiar with JS and not be able to figure out what a CoffeeScript snippet is doing? It's not quite the difference between C and assembly.
Post reply on HN