Comparison of Web Frameworks
2017 年 03 月 16 日This is not finished because I found this project: https://github.com/the-benchmarker/web-frameworks.
The followings are only the plan which will never be done.
Objective
These frameworks are mostly used for creating RESTful api, not as a full-stack web framework.
- Ruby: pure RACK, roda, grape, sinatra, rails-api
- Python: pure WSGI, flask, falcon
- Node.js: pure node (Connect.js), express.js, koa
- Go: pure go (http.ServeMux), gin, echo, martini, goji
Methods
Only test the router. No database or other calculations involved.
Test GET, POST, PUT, DELETE, PATCH. Just return some value immediately.
Test some complicated route with parameters.
There may be more than one web server for each language:
- Ruby (1.9.3, 2.0, 2.4 …): unicorn, goliath, webrick, passenger
- Python(2.7, 3.6, PyPy): uWSGI, gunicorn
- Node.js:
- Go: net/http
Results
Generate result tables and graphs.
http://klen.github.io/py-frameworks-bench/
The benchmark has a three kinds of tests:
- JSON test. Serialize a object to JSON and return
application/json
response. - Remote test. Load and return http response from a remote server.
- Complete test. Load some data from DB using ORM, insert a new object, sort and render to template.