When comparing Express.js vs Ruby on Rails, the Slant community recommends Express.js for most people. In the question“What are the best backend web frameworks?” Express.js is ranked 3rd while Ruby on Rails is ranked 5th. The most important reason people chose Express.js is:
Setting up a new Express project is very easy. It consists of installing a handful of libraries through NPM run a single `npm install` and everything is ready to go.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Setting up is very easy
Setting up a new Express project is very easy. It consists of installing a handful of libraries through NPM run a single npm install
and everything is ready to go.
Pro Great routing API
Express' extremely powerful routing API allows developers to do tasks ranging from building a REST API to building the routes for a simple web app and then take it to the next level by using route parameters and query strings.
Pro Great for beginner Node.js programmers
With a little learning curve, it is a good choice for new NodeJS developers to get started quickly. Express boasts great, thorough documentation.
Pro Express.js is in the Node.js Foundation Incubator Program
Node.js Foundation
Announcement here
The Node.js Foundation is a Collaborative Project at The Linux Foundation. Linux Foundation Collaborative Projects are independently funded software projects that harness the power of collaborative development to fuel innovation across industries and ecosystems.
Pro Relatively mature
Being a somewhat old Node.js web app framework and being one of the most widely used frameworks, Express.js has matured quite a lot during all that time. It's more stable than its competitors and a huge community backing it.
Pro Support for a lot of plugins
Express takes advantage of Node's NPM to distribute and install countless plugins made by third parties which solve almost anything a developer would want to do with Express.
Pro Has the largest userbase
It's by far the most popular framework for node.
Pro Great supportive community
Express has a big community with a lot of guides and tutorials written about it by developers that have been using it for quite some time.
Pro Good Oauth/Facebook integration with connect module
You can easily add oAuth integration/social logins to your next web app without much hassle, using this authentication middleware for connect.
Pro Has detailed information
Very simple and fast.
Pro Lightweight
Pro Massive ecosystem of middleware
If you have not already checked out the Express.js ecosystem of middleware, you should.
Pro Massive community with lots of tutorials and guides
The sheer scale and massive number of developers using Rails has produced a large number of guides, tutorials, plugins, documentation, videos and anything that can help new and old Rails developers.
Pro Many plugins (gems) available
There are many third-party plugins (Ruby gems) available for Rails development. The larger ones and those that have a lot of downloads and users are very well documented and easy to use.
Pro Ruby is a nice readable language
Ruby has a very clean syntax that makes code easier to both read and write than more traditional Object Oriented languages, such as Java. For beginning programmers, this means the focus is on the meaning of the program, where it should be, rather than trying to figure out the meaning of obscure characters.
presidents = ["Ford", "Carter", "Reagan", "Bush1", "Clinton", "Bush2"]
for ss in 0...presidents.length
print ss, ": ", presidents[presidents.length - ss - 1], "\n";
end
Pro Good conventions
MVC is a great starting point, and perfect for APIs. You'll rarely if ever have to wonder "where should I put this code?"
Pro Small projects are very easy and it's possible to finish one in very little time
The large number of documentation, tutorials, videos and guides which help new developers who are just starting with Rails make it seem very easy to create a small and simple application by relying on code generation and components that come out of the box with Rails.
Pro Cool language
Pro Supported on every major cloud or VPS hosting service
Rails is supported on every major Cloud hosting service nowadays. There are also countless tutorials that help developers deploy their Rails apps if there are any problems on the way.
Pro Meta-programming capabilities
Cons
Con No single recommended way of doing something
Express considers itself to be a "minimalistic unopinionated framework", it basically lets the developer determine how their project will be organized. On one hand, this gives anyone terrific power and flexibility to use any library they want for a certain task and to organize their project structure however they want. But on the other hand, there's no single recommended way of organizing things, which can be a trap for beginners and experienced developers alike and result in unmaintainable projects.
Con Learning curve seems low at first, but starts becoming steeper
Rails' simplicity is deceptive. It's learning curve is really low at first, and the huge number of tutorials and guides out there for starting with Rails make it even easier. But it starts getting harder and harder as apps become more complicated. If good code conventions and OO design are not followed, then the codebase will be all over the place and it becomes impossible to maintain it.
Con Too much magic
So much behavior is implemented with dynamic behind-the-scenes changes to existing classes that obscure bugs are way too common. Conflicting interactions between multiple plugins that both try to change the same objects are a particularly pernicious example.
Con Too much convention
Con Not a very popular language outside of web development
Con Bad performance
Among the slowest frameworks. If you want to scale, you will have to migrate to another land.