Live data from Hacker News

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

towerjs.org

31–40 of 118 posts

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

#31
post #29

I'm admittingly a little ignorant when it comes to node, but isn't making it more like Rails a step in the wrong direction?

Node isn't an application framework, it's an event-driven javascript-based server. This is totally an acceptable way to handle it, so long as it takes advantages of Node's event-based system.

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

#32

Earlier quoted context omitted.

Then I'm sorry to inform you that some FUD did indeed rub off on you at your Node.js Bootcamp... CoffeeScript semantics are just JavaScript semantics, which means that CoffeeScript can seamlessly use any JavaScript library, and vice versa, without any special effort needing to be made. This is perhaps the most significant difference between CoffeeScript and most other compile-to-JS languages ( https://github.com/jash…

Come on Jeremy, this is so disingenuous. > CoffeeScript semantics are just JavaScript semantics, which means that CoffeeScript can seamlessly use any JavaScript library, and vice versa, without any special effort needing to be made. > The one feature that you might find yourself relying on in a project like Tower.js is easy access to the prototypal inheritance found in CoffeeScript's "class" keyword ... but you can e…

No, I'm actually trying to be completely ingenuous.

I agree with you that Tower and Batman.js should both have "extends" functions built-in (*Ahem: http://backbonejs.org/#Model-extend). It would be a line or two of code for them to add, and make it easier for folks that don't have other library or CS support for setting up prototype chains.

The point is that because CS classes are the same thing as JS prototypes + constructor functions, it all just works together ... in a way that fancier class systems built on top of JavaScript do not.

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

#33
post #17

i don't see why you should force someone to use coffeescript though

While I agree with some others here that calling it a JavaScript framework is a bit of a stretch, there are legitimate reasons to do this in coffeescript as opposed to javascript.

In particular, the Rails-y way of doing things requires particular concise classical OO abstractions that are difficult to provide in a pure prototypal JavaScript way without introducing your own class library (which there are far, far too many of).

For example, if you look at the definition of the App.User here: http://towerjs.org/models, trying to do the same kind of thing where you can quickly declare a class that extends a base class and adding things to it can become quite awkward.

You'd have to manually construct the prototype chain (or use the library-specific class DSL) and have to repeat the class name in order to call the "field" method there.

TL;DR Rails uses mixins and classical OO extensively, CoffeeScript facilitates this, JavaScript makes it difficult.

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

#34
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,…

CoffeeScript directly compiles into JavaScript. The fact that the source code is written in CS does not mean you can't use it with JS.

By comparison, think about Python. Some libraries use C for performance gain. Does that mean you can't use them with Python? No. These are still perfectly valid Python libraries.

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

#35

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.

When I'm unfamiliar with most of the items being discussed in an article here I usually refrain from commenting.

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

#37
post #18
post #15

Earlier quoted context omitted.

To the down voters: My comment is civil and explannatory. You may not like my sentiments, but down votes are not intended for unpopularity. Not only that, but in this case, my comment serves to reinforce the standards of HN regarding mis-titling of links and it is being downvoted. A house divided against itself cannot stand.

"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...

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

#38
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,…

If I had the ability to downvote your post I would have. Your comment "I have not bothered to learn, nor do I plan anytime soon" goes against everything I believe in as a web developer.

Sure, I may not be proficient in everything, but I try to have a working knowledge of all of the latest popular technologies so that I am not ignorant to what's going on around me. Like others have stated, 30min is all you need to really grasp what's going on in coffee script. Is that kind of time investment really that challenging to come by?

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

#39
post #28

Earlier quoted context omitted.

It was the coffeescript that put me off too. I dont have anything against CS, i just dont want the additional overhead of having to learn it

learning is the overhead with the best return on investment.

not everybody wants to jump into learning solutions that solve other people problems, prefer to learn the ones that solve theirs. if someone doesn't need coffeescript, there's no ROI.

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

#40
post #34
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,…

CoffeeScript directly compiles into JavaScript. The fact that the source code is written in CS does not mean you can't use it with JS. By comparison, think about Python. Some libraries use C for performance gain. Does that mean you can't use them with Python? No. These are still perfectly valid Python libraries.

That's a terrible argument. I still write and read Python with libraries that use C (for example: the entire standard library). If you want an example that fits the point you are trying to make, consider Lua/C, where you _can_ mix the two easily.

The point is still flawed, though - CoffeeScript is not JavaScript, and I have no interest in learning it (I'd rather spend the time learning to write better JS myself). I, and everyone else with my mindset, has their time wasted by this mislabelling; we would not have clicked through if the title said CoffeeScript.

Post reply on HN