title: How to choose the perfect RESTful framework?
body: <p>I know this question is too wide to be answered with a simple "use this framework", but I would really appreciate your advice on that one.</p>
  
  <p>I'm looking to make a (quite complex) project than will run over an API. I'm open to any programming language (PHP, Python, Java mostly) and found many frameworks that are more oriented to make a RESTful web server.</p>
  
  <p>The only major constraint I have is that I would have a reusable, simple and not-code-spaghetti independent package in order to improve my API later easily or even switch to an other framework with no pain.</p>
  
  <p><em>For Python &amp; Java, I thought about making a dedicated package. Each action would call the dedicated method in the package, the package would return object/dict and the action would transform it to the proper format.</em></p>
  
  <p>After many research, I hesitate between two framework that could be good for my work but <strong>I need your advice</strong> because I wouldn't make any mistakes here.</p>
  
  <ol>
  <li><a href="http://www.playframework.org/" rel="noreferrer" title="Play! Framework">Play! Framework</a> (Java)
  
  <ul>
  <li><strong>Pros</strong> :
  
  <ul>
  <li>Router are RESTFul oriented (you define the method (GET, POST, etc), the request and the class.method to use)</li>
  <li>You don't have to make one class per action</li>
  </ul></li>
  <li><strong>Cons</strong> :
  
  <ul>
  <li>The Model is already included. If I later change the framework, maybe I will be stuck with it (but apparently not since Play! seems to use JPA)</li>
  <li>Maybe the fact that if I want to send parameters to the action that would be defined in the method signature, I have to adopt the ClassName.properties instead of a json like {ClassName: {properties: 'value'}}</li>
  </ul></li>
  </ul></li>
  <li><a href="http://tornadoweb.org" rel="noreferrer" title="Tornado Web">Tornado Web</a> (Python)
  
  <ul>
  <li><strong>Pros</strong> :
  
  <ul>
  <li>Seems to be very powerful : used by FriendFeed (at least) !</li>
  <li>Auth via major OpenId, OAuth and Facebook already implemented</li>
  <li>Very light (could be a problem)</li>
  </ul></li>
  <li><strong>Cons</strong> :
  
  <ul>
  <li>Not so popular : you understand better the work by going into the code than the doc</li>
  <li>Urls seems to be very basics (As far as I saw it, you have to define all the urls in one file, with all the class included)</li>
  <li>One Class per action (that could be heavy)</li>
  <li>Decorators for the basic (testing if user is auth, etc) must be made</li>
  </ul></li>
  </ul></li>
  </ol>
  
  <p>For using them in production, it would be easily possible with apache &amp; mod_proxy or nginx.</p>
  
  <p>So, my questions is quite simple : what would you choose (between those two or others, I'm not closed to suggestions) and why ?</p>
  
  <p><strong>Thank you really much for your advice!</strong></p>