3

I'd like to build an app in JavaScript that follows the MVC pattern using a framework that is packed with features like Ruby on Rails. I know Rails fairly well and having a "JavaScript port" of it would be nice. (When I say "JavaScript Port" I don't mean literally, just something similar.) I want to use JavaScript both on the client side and server side. I'm sure that unlike Rails, the client-side will be much heavier and that's fine. I imagine the server-side of it would run on Node but I'm open to other ideas.

My question is basically, what's the closest JavaScript framework to Ruby on Rails? If there is not one solution, what combination?

6 Answers6

4

In 2012 was Railway Node.JS MVC framework based on ExpressJS, fully ExpressJS-compatible. It allowed you to build web applications in a similar manner as in Ruby On Rails.

In nowadays there is good frameworks like CompoundJS and Sails.JS

Oleksandr T.
  • 76,493
  • 17
  • 173
  • 144
  • Yeah, it was me. I've just removed now and a strange thing is that Railway is actually now: https://github.com/1602/compound, with a repo with Star 1,654. Just edited your answer – Julio Marins Feb 25 '16 at 02:44
  • 1
    @Julio Marins thanks, I've added mention about CompoundJS to my answer, thanks again ;) – Oleksandr T. Feb 25 '16 at 06:23
3

Server Side (for Node): Geddy is very "railsy" http://geddyjs.org/

Client side: Ember.js: http://emberjs.com/. There is also Rails integration gem. Yehuda Katz and Tom Dale are the main developers, you can know them from Ruby world :)

nihique
  • 5,738
  • 2
  • 25
  • 27
3

I would check out Meteor.js. It's JS on client and server side (using Node.js) and rather than an MVC framework, it binds your models to your views using web sockets so that changes to the server get pushed down to the client and the page is updated instantaneously.

Because it uses the reactive model rather than MVC, it's not quite like RoR, but the frameworks do have productivity and developer friendliness in common. Meteor uses smart packages (like RubyGems) that can seamlessly add functionality to your app, you can get something working very quickly, and you can deploy in the snap of a finger if you choose to put it up on meteor.com (and deploying to your own server is not much different than deploying any other app).

Samo
  • 8,202
  • 13
  • 58
  • 95
  • In my opinion I have to disagree, the beauty of RoR lies on it's convention over configuration philosophy and its very rigid structure. Beeing a Meteor developer for about a year now I can tell you that Meteor is nothing like that. – Rafael Vidaurre Mar 09 '17 at 18:02
  • You are correct that they are unlike in that regard. I was listing a few things that I felt they had in common. Convention over configuration was most definitely not one of them :) – Samo Mar 09 '17 at 18:06
3

in the client side in the last few months I used Joosy - http://joosy.ws It is super easy to integrate in rails (it is designed for RoR, and you can still continue using RoR as a backend).

from their website:

..is a javascript framework. Being a harmonious extensions to Rails it introduces everything you like about this framework right to your browser. Ready conventions set, extensive CoffeeScript, HAML support, Helpers, seamless backend integration, automatic code generation and more..

There is also an interesting comparison with BackboneJs and EmberJs here: http://guides.joosy.ws/guides/basics/joosy-vs-x.html

mbursi
  • 31
  • 2
0

You can look at Backbone. This is developped by ROR developers I believe, it's not a MVC but an MV.

http://backbonejs.org

Sjaak Rusma
  • 1,424
  • 3
  • 23
  • 36
0

I haven't used Tower.js but it advertises itself as something similar to what you are looking for:

Built on top of Node's Connect and Express, modeled after Ruby on Rails. Built for the client and server from the ground up.

http://towerjs.org/

Hector Correa
  • 26,290
  • 8
  • 57
  • 73