Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Alas, the rapid prototyping is a trap I fall into all the time. Spinning up an ol' Symfony 1.4 application to mock-up a REST API so I have something to build a Backbone.js app against is the practice that keeps leaving me tethered to PHP.

If there were something that would allow me to spin up local application and work with my existing, already running Apache processes, I could move away from PHP.



Sinatra is pretty great for rapid prototyping. For example: https://gist.github.com/3062572

Then I just invoke it with "shotgun rest.rb" and hit http://localhost:9393/ and I'm up and running. It's not running through Apache, but it's not really significantly more difficult than PHP prototyping.

    curl -d "foo[bar]=1&foo[baz]=hello%20there" http://localhost:9393/foos
    {"result":"success"}

    curl http://localhost:9393/foos/1
    {"bar":"1","baz":"hello there","id":"1"}
Easy peasy.


Agreed, actually. I learned I can stand up Sintra and not bork my local apache instance, and now I'm hooked. Thanks!


Flask works very similarly in python-land. When I want to whip up an API I fire up Flask + curl.


I have the same thing set up with a couple of lines in the terminal with rails though, it's just a matter of having some experience with the tools.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: