Live data from Hacker News

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

towerjs.org

51–60 of 118 posts

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

#51

Earlier quoted context omitted.

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 + c…

So I agree (for the most part) that using them together is not a problem, but I think there still is some justification for the "unwieldly" argument - which may or may not have been what was discussed at the bootcamp.

1. Some people seem to be under the impression that since they're interoperable, it's fine if half your team is doing raw JavaScript and the other half is using CoffeeScript. At some point, one of the JavaScript authors is going to try to modify the generated JS, which will likely be checked in if there's no asset packaging (I've seen this in practice).

2. The way that people design APIs in CoffeeScript and JavaScript is very different, because the things that are easy in CoffeeScript and easy in JavaScript are different. Namely, CoffeeScript libraries tend to leverage the OO capabilities in a way that makes them ugly to use in raw JS. For example, the `@field "title"` stuff would have to expand in a way that's not particularly obvious or concise.

Another example would be trying to use an API like CoffeeKup in JavaScript - the `->` is not visually distracting in CoffeeScript, but having `function() { }` everywhere in the JavaScript code completely destroys the concise nature of the API. In JavaScript, it might be more natural to implement it as an object literal as opposed to nested callbacks.

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

#52
post #39
post #28

Earlier quoted context omitted.

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.

But you really don't need to learn CS... It's just a slightly different syntax that you can learn literally in 20 minutes, but makes your code more robust and clean (eg; no more comparing against "undefined" and then nil, just put a ? after variable name - it saves you time and you don't accidentally forget about it. It makes your code better)

Nobody would argue about his comment if CS wasn't such an easy language to learn. If you know PHP, you can learn writing in ASP.net in a week, but if you know JavaScript, you can sing in CoffeeScript in an hour.

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

#53
post #42

am i the only who is not excited by any "RoR"-like framework? i like node because it lets me build small standalone programs/apps which i can link together to act like on big project. i - for one's part - found that having one master-overlord framework kills a lot of the joy of programming. ok, there is the "it's much more manageable" argument, but well, my experience is that big apps on RoR need much more maintenanc…

[deleted]

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

#54
post #50

Earlier quoted context omitted.

The bulk of today's web devs are coming from Rails and it's nice to have that hand-holding when you're trying to cross that chasm. Besides, a lot of the concepts that RoR were built on are sound (i.e. don't reinvent the wheel every time you make a new project), even if Rails has become as bloated as the technologies it replaced (J2EE, .NET).

>The bulk of today's web devs are coming from Rails Ahem, you're exaggerating there just a little bit. There are probably around a dozen web frameworks that are competing for the spotlight right now. With Zend, CI, Django, Symfony, Struts, Cake, etc. all equally if not more popular it's hard to say Rails has the "bulk" of today's web devs. I wouldn't even go as far as saying that the bulk of today's web devs apprecia…

Who cares how many people use these frameworks, most of them are using the same MVC structure and are just stealing features from each other.

Some of the Node people like things small but when applications get bigger putting things into an MVC structure often makes your code more organized. Until someone comes up with a better idea that takes off this is how things will be done and I think it's great that Node has a few choices now to do this.

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

#55
post #34

Earlier quoted context omitted.

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

But who said you had to use CoffeeScript? You can perfectly use this library by writing standard javascript.

The author decided to write the source code of the library in CoffeeScript, which then compiles to perfectly valid javascript that you can import.

The analogy about Python is that you don't have to know C to be able to use a Python library written in C..

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

#57
post #38

Earlier quoted context omitted.

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 rea…

I didn't downvote him because of his civil comment about misleading comment, but because of his un-hackerish tone about him not planning to learn something that is completely relevant to his career (his description in his page is: I'm a JavaScript and Node nerd). Maybe I shouldn't have done it, but I really have nothing against him. I truly wanted him the best and downvoting his (IMO) wrong comment was an effort to m…

[deleted]

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

#58
post #38

Earlier quoted context omitted.

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 rea…

I didn't downvote him because of his civil comment about misleading comment, but because of his un-hackerish tone about him not planning to learn something that is completely relevant to his career (his description in his page is: I'm a JavaScript and Node nerd). Maybe I shouldn't have done it, but I really have nothing against him. I truly wanted him the best and downvoting his (IMO) wrong comment was an effort to m…

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

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

#59
post #50

Earlier quoted context omitted.

>The bulk of today's web devs are coming from Rails Ahem, you're exaggerating there just a little bit. There are probably around a dozen web frameworks that are competing for the spotlight right now. With Zend, CI, Django, Symfony, Struts, Cake, etc. all equally if not more popular it's hard to say Rails has the "bulk" of today's web devs. I wouldn't even go as far as saying that the bulk of today's web devs apprecia…

Who cares how many people use these frameworks, most of them are using the same MVC structure and are just stealing features from each other. Some of the Node people like things small but when applications get bigger putting things into an MVC structure often makes your code more organized. Until someone comes up with a better idea that takes off this is how things will be done and I think it's great that Node has a…

There's a difference between using an MVC pattern (which is easy with Express, but is completely optional) and relying on an ORM (which the project forces on you). One of the great things about minimilist frameworks like Express is that you can build it out and customize it like you need.

The types of projects that benefit from being in node.js instead of Rails, Django, etc, don't really benefit from having all those decisions made in advance. If the "Rails Way" works for your project, you'll probably benefit from doing it in rails. There's certainly more library support and it's easier to find more experienced developers for Rails than node.js.

There's a tendency to put all kinds of projects in node now, just because it's "hot". Some projects benefit from node, and some would be easier to do in some other language/framework. If you're experienced with Rails and are working on a project that fits that style, you're probably better off just doing it in Rails rather than switching to node and using a Rails flavored framework.

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

#60
This looks good. I've messed around with Railways http://railwayjs.com/ but some parts are funky and the docs haven't been updated since they opened the project. Also looked at Matador http://obvious.github.com/matador/ and actually was re-writing it in coffeescript to use CS' classes instead of the Klass plugin, but lacked docs. Zappa http://zappajs.org/ is written CS but really isn't an MVC. This looks well documented and it's in CS which I like. +1
Post reply on HN