title: Decorators vs. classes in python web development
body: <p>I've noticed three main ways Python web frameworks deal request handing: decorators, controller classes with methods for individual requests, and request classes with methods for GET/POST.  </p>
  
  <p>I'm curious about the virtues of these three approaches. Are there major advantages or disadvantages to any of these approaches?  To fix ideas, here are three examples.</p>
  
  <p><a href="http://bottle.paws.de/" rel="nofollow noreferrer">Bottle</a> uses decorators:</p>
  
  <pre><code>@route('/')
  def index():
      return 'Hello World!'
  </code></pre>
  
  <p><a href="http://pylonshq.com/docs/en/0.9.7/gettingstarted/" rel="nofollow noreferrer">Pylons</a> uses controller classes:</p>
  
  <pre><code>class HelloController(BaseController):
      def index(self):
          return 'Hello World'
  </code></pre>
  
  <p><a href="http://www.tornadoweb.org/documentation" rel="nofollow noreferrer">Tornado</a> uses request handler classes with methods for types:</p>
  
  <pre><code> class MainHandler(tornado.web.RequestHandler):
      def get(self):
          self.write("Hello, world")
  </code></pre>
  
  <p>Which style is the best practice?</p>