Sinatra-like Microframeworks Roundup
I've been using Perl Dancer for my personal webapps for a few years now, and am incredibly happy with it. I've also recently started deploying them with nginx+uwsgi, which (once you get the config right) is a great combination. I've recently been looking at what the equivalent would be in other popular languages. Since Dancer is inspired by Sinatra and most other languages have similarly inspired projects, it was a fairly simple list to put together.
Note that where multiple options exist, I've tried to pick the most popular alternative that most closely matches the setup that I am used to - your own projects may have different requirements. I also haven't tried using all of these, so there may be better ways to set up some of this.
Language | Framework | App Server | Web Server | Packaging |
---|---|---|---|---|
[Perl](http://www.perl.org) | [Dancer](http://perldancer.org) | [uWSGI](https://uwsgi-docs.readthedocs.org/en/latest/) | [Nginx](http://wiki.nginx.org/Main) | [CPAN](http://www.cpan.org/) |
[Ruby](http://www.ruby-lang.org/) | [Sinatra](http://www.sinatrarb.com/) | [Rack](http://rack.github.io/) | [Nginx](http://wiki.nginx.org/Main) | [Gems](http://rubygems.org/) |
[Python](http://python.org) | [Flask](http://flask.pocoo.org/) | [uWSGI](https://uwsgi-docs.readthedocs.org/en/latest/) | [Nginx](http://wiki.nginx.org/Main) | [pip/PyPi](https://pypi.python.org/pypi/pip) |
[PHP](http://php.net) | [Slim](http://www.slimframework.com/) | [Fastcgi](http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModFastCGI) | [Lighttpd](http://www.lighttpd.net/) | [PECL](http://pecl.php.net/) |
[JS](http://www.javascript.com) | [Express](http://expressjs.com/) | [Nodejs](http://nodejs.org/) | [Nodejs](http://nodejs.org/) | [npm](https://npmjs.org/) |
[Java](http://www.java.com/en/download/faq/develop.xml) | [Spark](http://www.sparkjava.com/) | N/A | [Tomcat](http://tomcat.apache.org/) | N/A |
The most obvious conclusion from this list is that micro-frameworks based on Sinatra's original DSL are very popular. In fact, the code written in each looks incredibly similar regardless of the language used.
It's also interesting that both Java and PHP have Sinatra-like frameworks, but no simple way to run them as separate app servers or package/distribute the app (FastCGI is close but isn't quite a separate app server). Even more interesting is that a spec for JWSGI exists and is supported by the Uwsgi server, but the Spark microframework doesn't seem to use it. I assume that's because Tomcat/Apache do a good enough job that no one has seen the need to split the app server out.