
What's new in Sinatra 1.4? - EzGraphs
http://rkh.im/sinatra-1.4
======
epynonymous
came from python (and tornado) to ruby, if it wasnt for sinatra, i'd have
stayed with python and tornado. great work, keep up the clean syntax and
lightweightness.

~~~
krob
python has flask & bottle, so.. you may consider going back?..

~~~
epynonymous
can't go back, at least not now, at work we've standardized on ruby. for
personal projects, i've also decided to stick with ruby as well, the main
reason being mostly the gem package manager and community support, not saying
that python doesn't have a good community with great libraries (egg, setup
tools, etc), but ruby's just cleaner for me with regards to web app
development.

------
lysium
I'm glad there is Sinatra because it inspired Scalatra, which seems way more
lightweight than Play :-). Keep up being lightweight!

I don't blame the authors for discontinuing old branches (1.2.x), but it makes
me hesitant using Sinatra for a production website that's meant to be there
for >= 2 years (though is an eon in IT).

~~~
lquist
What do you mean by "lightweight"?

~~~
benatkin
I'm curious, too. Also how does it compare to Spray?
<https://github.com/spray/spray>

------
derefr
> By default, Sinatra will now only serve localhost in development mode. You
> should not be running your production system in development mode.

This "opinionated default" makes it very hard to test when you're running your
development environment from a virtual machine, like Vagrant.

More and more people are doing this (gotta use those extra cores + memory for
something, right?), so please consider us before adding a "listen 127.0.0.1".
:)

~~~
konstantinhaase
Simply run with -o 0.0.0.0, I think the number of people running without
firewall or having an annoying firewall warning every time they start a
Sinatra process is larger than the number of people developing on a VM. Also
note that this has no effect if you use some different way to run your Sinatra
app, like rackup.

------
hayksaakian
For static sites I use rack, for dynamic sites I use rails.

When do I use Sinatra?

~~~
epynonymous
you can use sinatra in place of rails for dynamic sites, but you'd need to
pick template language (erb, haml), object relational model (activerecord,
sequel, datamapper), and other things that come bundled in rails. that's what
makes sinatra lightweight, you add as you need as opposed to everything there
for you out of the gate. you can think of sinatra as being a simple domain
specific language for creating sites or apis (i use it for both).

<http://github.com/cloudfoundry/defekts>

~~~
danneu
I think you described Padrino (<http://www.padrinorb.com/>).

Sinatra is good for APIs but it's easy to find yourself reinventing
Rails/Padrino when you have a view layer.

