June 22nd, 2017

The best MVC frameworks for Node.js

HTML/CSS/JavaScript, IDG Insider, Java App Dev, Java Web Development, Open Source, others, Programing, Scripting and JVM Languages, by admin.

Node.js is a JavaScript runtime, built on Chrome’s V8 JavaScript engine, that’s suitable for implementing both desktop and server apps. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient compared to threaded servers, such as Apache, IIS, and your typical Java server.

While you can implement a web server or app entirely in plain Node.js code, an MVC framework can greatly reduce the amount of code you need to write. MVC (model-view-controller) is a paradigm intended to partition the functionality of a desktop or web application cleanly. The model manages the underlying data structure. The view manages what is shown to the user. And the controller manages what happens in response to user requests.

MVC frameworks for Node.js range from minimalist Sinatra-like frameworks such as Express to more opinionated Rails-like frameworks, with scaffolding and persistence libraries, such as Meteor. Rails is a full-featured, “opinionated” MVC-based web framework created in 2004 by David Heinemeier Hansson (aka DHH) to give Ruby a way to establish a web presence. Rails assumes that you are using a database, values convention over configuration, and scales well. The Rails-like Node.js MVC frameworks are the ones that are full-featured.

Sinatra is a bare-basics, less-opinionated MVC-based web framework that was created in 2007 by Blake Mizerany and is currently maintained by Konstantin Haase. Sinatra took the opposite approach of Rails in that it has only what you need for a web application, basically routes to put your app on the web with a DSL (domain specific language) over a “rack” layer. Rack is an abstraction layer based on the Node.js EventEmitter, and provides a simple way of dealing with cluster support.

Back Top

Leave a Reply