1
Was reading about the frameworks Action Based and Component Based. I have already used the Slim micro-framework and know that it is an Action Based framework, IE, more focused on actions, and the way to use it follows this concept a lot.
See an example (Slim):
$app->get('/index', App\Controllers\IndexAction::class);
Realize that the action is directed to a controlling class.
So, I’m using the Flask micro-framework and I’m studying on Blueprints which consists of dividing the application into components, see a small example:
bp_autenticacao = Blueprint('autenticacao', __name__, url_prefix='/autenticacao')
@bp_autenticacao.route('/registrar', methods=('GET', 'POST'))
def registrar():
pass # Registrar usuário
Note that in flask the division consists of breaking the application into views and doing the views functions for each view of the application using the concept of Blueprints.
This approach of Flask left me with some doubts regarding the Action Based and Component Based architecture.
Doubts
- Flask micro-framework uses the Action Based or Component architecture Based?
- What characterizes Flask in case it uses one of the two architecture, where the actions or components are?
- How these architectures in Flask work in case he uses them?