Flask vs FeathersJS
When comparing Flask vs FeathersJS, the Slant community recommends Flask for most people. In the question“What are the best backend web frameworks?” Flask is ranked 7th while FeathersJS is ranked 35th. The most important reason people chose Flask is:
Flask is very easy to get up and going, with vanilla HTML or with bootstrap pieces. It doesn't take much lines of Python to load Flask to get headers working, etc, and since it's all modular you don't have to have something you don't want in your application.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Minimalist without losing power
Flask is very easy to get up and going, with vanilla HTML or with bootstrap pieces. It doesn't take much lines of Python to load Flask to get headers working, etc, and since it's all modular you don't have to have something you don't want in your application.
Pro Lots of resources available online
Flask is one of the most popular Python web frameworks, if not the most popular one. As such, there's plenty of guides, tutorials, and libraries available for it. A large number of important Python libraries, such as SQLAlchemy have libraries for Flask, which add valuable bindings to make the development process and the integration between these libraries and Flask as easy as possible.
Pro Extremely easy to build a quick prototype
Even though it's pretty minimalistic out of the box, Flask still provides the necessary tools to build a quick prototype for a web app right after a fresh install. With all the main components pretty much packed in the flask
package, building a simple web app in a single Python file is as easy as it gets.
Pro Very flexible
Flask gives developers a lot of flexibility in how they develop their web applications.
For example, the choice of not having an ORM, but instead choosing one suited to the task, or another area where Flask gives a lot of options to developers is the templating. They can use Jinja2, Flask's default templating language or choose from a number of different templating languages they desire.
Pro Great documentation
The official documentation is very thorough and complete. Everything is explained in-depth and followed by extremely well-explained tutorials that tackle real-world problems.
Pro Able to use ORM or "true SQL"
Pro Can sync events between different Node instances
Feather can sync events happening in two different Node processes or even servers in real-time. For example: an event happens in server A, the user connected to server B is instantly notified of that event.
This is done through a central Redis or Mongo collection or through a websocket libraries' clustering library.
Pro Easy REST APIs
Through services, Feathers provides instant CRUD functionality, it also can easily expose a RESTful and real-time API through HTTP/HTTPS and websockets.
Pro Can be integrated in an existing ExpressJS project
Since Feathers itself is built on top of Express (it's a thin wrapper over socket.io, primus and Express) and because of Feathers' highly modular nature, it's very easy to integrate Feathers in an existing Express project.
Pro Plug-in any feature you need
Feathers makes extensive use of modules (which are called Feathers services). These services work like ExpressJS middleware and can be used with app.use('/path', serviceObject)
.
Services help developers keep their applications modular and as minimal as possible, without any unnecessary libraries or bloat.
Pro Support for different socket transports
FeatherJS uses primus which is a universal wrapper for real-time frameworks. Through primus you can easily choose which socket transport you want to use.
Cons
Con Not async-friendly
Flask is explicitly not designed to handle async programming.
Con Setting up a large project requires some previous knowledge of the framework
Setting up a large project with Flask is not that easy considering how there's no "official" way of doing it. Blueprints are a useful tool in this regard but require some additional reading and are a bit tricky to get right for a beginner.
The lack of some defaults can also be problematic. Having to choose between different libraries for a certain task is never easy, especially if you have never worked with Flask before.
Con Threadlocals and globals used everywhere
The default way of creating applications in flask makes it hard to use reusable and clean code.
Con HTML-oriented, not API-oriented
Not necessarily designed for making APIs, though that is possible
Con Not so widely used
Could be problematic to convince the client use this framework in his/her project.
Con Not very beginner friendly
Although the documentation for Feathers is very good, it still needs some configuration in order to get Feathers up for developing something with it.