TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

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

221 pointsby jotabout 13 years ago

30 comments

eldudeabout 13 years ago
Thanks for the efforts and the framework. Unfortunately, I cannot properly appreciate it for the following reason:<p>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, only to discover it was in CofeeScript, a language I have not bothered to learn, nor do I plan to anytime soon. I would down vote this if I could merely for the mislabeling. If you love CoffeeScript enough to use it as you obviously have, own it, advertise it openly and stop being in denial that CoffeeScript as a written language is different from JavaScript as so many CoffeeScripters seem wont to do.
评论 #3640196 未加载
评论 #3640397 未加载
评论 #3640361 未加载
评论 #3640182 未加载
评论 #3640829 未加载
评论 #3641681 未加载
评论 #3640301 未加载
评论 #3641967 未加载
评论 #3640426 未加载
评论 #3640495 未加载
VeejayRampayabout 13 years ago
So I see the rage is all about dissing Rails as often as possible these days, more often than not in the Node community. Yet Tower is a virtual copy and paste of the popular Ruby web framework and it's pure awesome.<p>There is something of a schizophrenic behavior at work here. I am a Rails dev, I love the framework for all its strengths and would choose to live with its (relative) shortcomings any day but I think there's something not healthy about how it seems that a new (web framwork|language|paradigm|whatevs) always has to (kill|take a dump on) the competition to claim the spotlights.<p>The two technologies can co-exist without a problem, there are many pieces of software to fill that gap without having to reinvent the wheel where Rails does the job just fine.<p>And to anyone saying Rails has become "bloated", quit the catchphrases-based rhetoric already, a Rails project is nothing more than a set of conventions and classes, the developer (that's you) has a choice of tools every step of the way, so if your app is bloated, stop producing bloated code or hopelessly waiting for a silver bullet, IT IS NOT HAPPENING. NEVER. NODE WON'T BE IT EITHER.<p>Three years from now, some clever dude will come up with a new fresh concept, Node will suddenly be so 2012 but deep down you'll know.<p>You'll know it's the same old caper below the latest layer of paint and glitter.<p>Props to the people who worked hard on Java frameworks who make tons of people happy in the heavy infrastructure enterprise realm, props to the people behind PHP and associated frameworks, props to Rails dev for pushing the envelope and making me enjoy programming again and props to Ryan Dahl, Google and Joyent for making Node happen and shaking the bottle once again.<p>It does NOT have to be X VS Y VS Z.
thelastnodeabout 13 years ago
Regarding the Coffeescript-Javascript difference, Coffeescript and Javascript can be used transparently in node. Once require('coffee-script') is run, the module replaces the require function with one that can load both Coffeescript and Javascript.<p>This means that if there is a file ./lib/foo.coffee, the following code in bar.js will work:<p><pre><code> require('coffee-script'); var foo = require('./lib/foo'); </code></pre> Yes, some people may not like Coffeescript anywhere in their project, but this functionality makes it easy to add Coffeescript to an existing Javascript project or use Coffeescript modules as a blackbox in a Javascript project.
评论 #3641159 未加载
franzeabout 13 years ago
am i the only who is not excited by any "RoR"-like framework?<p>i like node because it lets me build small standalone programs/apps which i can link together to act like on big project.<p>i - for one's part - found that having one master-overlord framework kills a lot of the joy of programming.<p>ok, there is the "it's much more manageable" argument, but well, my experience is that big apps on RoR need much more maintenance work then similar programs on much uglier stacks (i.e. webprojects using LAMP)<p>said that - after reading some of the docs - i will probably give towerjs a try.
评论 #3640649 未加载
评论 #3640589 未加载
chcabout 13 years ago
For anyone turned off by the CoffeeScriptiness of the page, here's a bookmarklet that will compile the CoffeeScript into JavaScript:<p><pre><code> 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&#38;&#38;(!(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); </code></pre> Aside from CoffeeScript's __hasProp and __extends boilerplate at the top of each code sample, it's pretty readable if anyone's interested.<p>I still think it ought to decide whether it wants to be a CoffeeScript or JavaScript framework, though.
moeabout 13 years ago
Who cares?<p>There is express, geddy, railwayjs, djangode, drty, Locomotive, spludo and probably a few others that I missed. <i>All</i> of them are modeled after rails/django.<p>The last thing the node-ecosystem needs is yet another half-baked rails-clone.<p>This may come across harsh but I really don't understand why people keep beating that dead horse instead of tackling the node-vision: Build a framework that spans client/server. Make it good. Start by not pouring your time into yet another rails-clone...
评论 #3643946 未加载
thetrendycyborgabout 13 years ago
The best part about this in my opinion is that the controller system works on both the client and server. I've been waiting for this, was planning on building it myself if no one figured that out.<p>I hope this grows. I'd love to contribute too.
matt2000about 13 years ago
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!
评论 #3641343 未加载
评论 #3640203 未加载
评论 #3640321 未加载
评论 #3640319 未加载
mutewinterabout 13 years ago
GitHub Repo - <a href="https://github.com/viatropos/tower" rel="nofollow">https://github.com/viatropos/tower</a><p>Source for towerjs.org (written with Tower.js) - <a href="https://github.com/viatropos/towerjs.org" rel="nofollow">https://github.com/viatropos/towerjs.org</a>
juliennakacheabout 13 years ago
Is there any way to share models with the client and the server ?<p>I'm not sure a pure MVC (or a Model2) is the best way to architect node web applications. The config part looks great, I'll read that more carefully tonight.
rgbrgbabout 13 years ago
Unfortunate naming conflict... <a href="http://towerjs.com/" rel="nofollow">http://towerjs.com/</a>
alttababout 13 years ago
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?
评论 #3640411 未加载
jaredhansonabout 13 years ago
Locomotive is another option writing MVC web applications in Node, using the familiar structure from Rails: <a href="http://locomotivejs.org/" rel="nofollow">http://locomotivejs.org/</a><p>It's strictly focused on the backend, and remains strongly view and database agnostic.
nawariataabout 13 years ago
I "like" how there are currently 96 comments in this thread and not even one touches the subject, discussing merits of tower.js.
评论 #3642585 未加载
mcantelonabout 13 years ago
Another Rails-inspired Node framework built on Express: <a href="http://railwayjs.com/" rel="nofollow">http://railwayjs.com/</a>
评论 #3641155 未加载
chadhietalaabout 13 years ago
This looks good. I've messed around with Railways <a href="http://railwayjs.com/" rel="nofollow">http://railwayjs.com/</a> but some parts are funky and the docs haven't been updated since they opened the project. Also looked at Matador <a href="http://obvious.github.com/matador/" rel="nofollow">http://obvious.github.com/matador/</a> and actually was re-writing it in coffeescript to use CS' classes instead of the Klass plugin, but lacked docs. Zappa <a href="http://zappajs.org/" rel="nofollow">http://zappajs.org/</a> is written CS but really isn't an MVC. This looks well documented and it's in CS which I like. +1
elliottkemberabout 13 years ago
I got really excited about this, thinking it was a Rails-style front-end framework. It's still really cool as a server-side framework, but I'm totally hankering for a full Rails stack in the browser.<p>I've used Backbone and played with Spine - I just can't help but feel as though they could go all the way. I wonder whether that's viable?
clyfeabout 13 years ago
I had a similar endeavor having it built on top of Express.js ecosystem: <a href="https://github.com/umbrellacorporation/umbrella/" rel="nofollow">https://github.com/umbrellacorporation/umbrella/</a>
tyokabout 13 years ago
Why don't you put the link to the source code[1] on the website? I have to actually search it via google.<p>[1] <a href="https://github.com/viatropos/tower" rel="nofollow">https://github.com/viatropos/tower</a>
评论 #3643978 未加载
amalagabout 13 years ago
This has turned into a debate on coffeescript. Would love to get more explanation from a Rails developer point of view about how the integrated javascript client/server model works.
techwraithabout 13 years ago
Geddy is another framework for node that is "rails-like" - the models work on the client side too. <a href="http://geddyjs.org" rel="nofollow">http://geddyjs.org</a>
drumdanceabout 13 years ago
I have an API in rails that I'd like to move to Node without having to re-write all the ActiveRecord code as SQL. Am I right to assume this is a good tool for that?
cmatthieuabout 13 years ago
Has anyone tried deploying a tower.js app to Nodester yet? Let me know if you need a hosting coupon - chris@nodester.com
stephthabout 13 years ago
Where/how do events fit within this framework? Couldn't find any explanation of it on the project page (or here...).
yawntabout 13 years ago
i don't see why you should force someone to use coffeescript though
评论 #3640422 未加载
Kiroabout 13 years ago
Nice and finally a Node.js framework I will be able to understand.
copremesisabout 13 years ago
Title update:<p>Tower.coffee - CoffeeScript Framework ...
nathan_f77about 13 years ago
This looks amazing.
jsavimbiabout 13 years ago
Looks interesting. I will download and have a look.
tjholowaychukabout 13 years ago
moar rails? moar coffeescript?