Django-vs-flask.md

Speaker : κΉ€λ„ν˜„(선린인터넷고등학ꡐ)

django, flask μ™œ μ“ΈκΉŒ?

λΆˆνŽΈν•˜λ‹ˆκΉŒ!

μ›Ή 톡신을 κ΅¬ν˜„ν•œλ‹€κ³  ν•˜λ©΄

  1. HTTP ν”„λ‘œν† μ½œμ„ 일일히 νŒŒμ‹±ν•œ λ‹€μŒ

  2. HTTP methods에 따라 λ™μž‘μ„ λ‚˜λˆ„κ³ 

  3. HTML λ Œλ”λ§ 엔진을 λ§Œλ“ ν›„ ν¬λ§·μŠ€νŠΈλ§μ— λ§žμΆ”μ–΄ μ›ν•˜λŠ” λ³€μˆ˜λ₯Ό html에 ν‘œμ‹œν•˜κ³ 

  4. μ›Ή μ„œλ²„λ₯Ό 거쳐 배포

  • DBμž‘μ—…κΉŒμ§€ ν•œλ‹€λ©΄...?

이런 λ˜‘κ°™μ€ μž‘μ—…μ˜ λ°˜λ³΅μ„ ν”Όν•˜κ³  λ³΅μž‘ν•œ 문제λ₯Ό 쀄이며 주어진 μ‹œκ°„λ‚΄μ— μž‘μ—…μ„ 끝마치기 μœ„ν•΄ κ΅¬ν˜„ν•˜κΈ° λ²…μ°¬ κΈ°λŠ₯듀을 μ‚¬μš©ν•˜λ €κ³  μ‚¬μš©ν•˜λŠ” 것

django vs flask

intro

| | initial release | Slogan | User | |---|---|---|---|---| |django|21 July 2005|The web framework for perfectionists with deadlines|DeliveryHero, Pinterest, instagram| |Flask|April 1 2010|Web development, One drop at a time|StyleShare, λ‘œμΌ“νŽ€μΉ˜, 번개μž₯ν„°|

comparison

  • Django ORM vs SQLAlchemy

  • Form vs flask-wtf

  • Template Engine vs Jinja2

  • Admin Page vs flask-admin

  • south(migrate, makemigrations) vs alembic

  • Middleware vs before_request, after_request ν˜Ήμ€ wsgi λ‹¨μ—μ„œ 직접 κ΅¬ν˜„

  • manage.py vs flask-scripts

  • manage.py test vs unittest or flask-test

  • def view(request) vs flask.request

  • django.contrib.messages vs flask.flash

Difference

  • Django : Meta ν”„λ‘œκ·Έλž˜λ°μ˜ 결정체

    • 좔상화도 많고 μƒμ†ν•˜λŠ” 관계가 맀우 많음

  • SQLAlchemy -> ManyToMany μ§€μ›ν•˜μ§€ μ•ŠμŒ

  • get_object_or_404, get_or_create =>

  • REST API κ΅¬ν˜„ν• λ•Œ

    • ν”ν•œ μž‘μ—… ν• λ•ŒλŠ” django

    • 변동이 λ§Žμ„ λ•ŒλŠ” Flask => Custom ν•  수 있게

Django μ•”μ‹œμ μ΄μ§€λ§Œ λ§Žμ€ 것듀 vs Flask λͺ…μ‹œμ μ΄μ§€λ§Œ λΆ€μ‘±ν•œ 것듀

내생각

  • Flaskκ°€ 더 λ§ˆμŒμ—λ“ λ‹€. μ›Ή κ°œλ°œμ— λŒ€ν•œ μ „λ°˜μ μΈ 지식이 μ—†λŠ” μƒνƒœμ—μ„œ 빨리 κΈ°λŠ₯을 κ΅¬ν˜„ν•΄μ•Όν•œλ‹€λ©΄ djangoκ°€ λ‚«κ² μ§€λ§Œ 기본을 μ΄ν•΄ν•˜λŠ”λ°λŠ” Flaskκ°€ 더 λ‚«λ‹€κ³  μƒκ°ν•œλ‹€. ν•˜λ‚˜ν•˜λ‚˜ κ΅¬ν˜„ν•΄κ°€λ©΄μ„œ μ΄ν•΄ν•˜λŠ” 것이 μ’€ 더 λ§ˆμŒμ— λ“ λ‹€.

Last updated