Tuesday, November 20, 2012

How to use Flask micro-framework


1
Where does one draw the distinction between micro- and megaframeworks? Or, for that reference, just a "framework"?

2
The difference between a library and a framework is simply that you call the library whereas the framework calls you. The framework provides a frame into which you put your code as opposed to a library which you use as part of your code.
Generally I would consider any framework which requires (almost) no setup requirements to be a microframework. This is opposed to frameworks which require a basic configuration, directory layout or certain files to be present.
However there are a lot of other people with other definitions regarding this, the distinction is not at all very clear for example there are people that consider being written in a single file to be a distinguishing feature of microframeworks.


3
http://hitesh.in/2012/how-to-migrate-from-bottle-py-to-flask-micro-framework/

from flask import Flask, render_template as template, request, make_response, jsonify, abort from flask.ext.sqlalchemy import SQLAlchemy

from bottle import route, run, template, install, static_file, response import bottle



What is the g object in Flask?







No comments:

Post a Comment