Hi so as the title suggests, am just diving into web development. And if you might see my last post, it was about understanding the concept of sessions. So that is the level of my expertise in there. I went across a couple of frameworks, and I seriously dont have the patience of going through the entire django docs. So I stumbled across flask. The basic docs look cool, but I understand that in order to use it efficiently, I would have to use Werkzeug libraries.I dont know if I would be able to understand all those different components. That is why I thought that this would be the best place to get some suggestions if flask is something which will really help me understand things and would it be a good place to start off for a totally inexperienced and amateur like me!
views:
143answers:
2I find diving into web frameworks a little daunting. If you would like to gain a firmer feeling for the nature of web development in general, I would opt for Tornado, as it is lightweight and easy to get started with.
If you are new to web development in Python then Flask is probably one of the best places to start - period, end of story.
It is still small enough that you can learn about WSGI from it's (excellent and extensively documented) source code -- and it's powerful enough, and has enough batteries included that you don't have to spend time trying to pick a good library to use for X
or Y
. (It includes bindings for Jinja2 by default and has a good extension for SQLAlchemy, for example.)
Django, and other large frameworks are daunting because they include all of the batteries up front (since you are working on a complex website with a deadline -- otherwise, why would you be using them) and are therefore a bit more difficult to pick up. Web.py and other really-micro-frameworks are daunting for the exact opposite reason -- they leave almost everything up to you (since you probably already know what you are doing and really just need the web framework to get out of your way.)
Flask does include everything you need to start building something more complex than a "Hello World" app -- it integrates a templating engine (Jinja2) for you so you don't have to decide whether you would be better off using Brevé, Genshi, Cheetah or Mako (though you could use any of the above if you wanted to). It does not include bash and .bat
scripts to set up your project workspace, powerful web-based administrative management systems or an ORM so you can dive right in and start hacking without having to stop for 4 hours to read up on a new concept you had never heard of before.
Now, to be fair to all sides of the spectrum (Django and Web.py alike) they are all great systems for getting things done -- and once you've started learning you might find that you learn quicker with the leaner systems (like Web.py) or that you prefer the convenience of the full-stack frameworks (like Django). But for starting out, for learning the basics of WSGI and Python web development in particular and of dynamic web development in general, I do not know of any web framework that gives a better introduction to the concepts underlying it than Flask.