Django vs flask

10
Django vs Flask How do you choose? Alan Hamlett, WakaTime CTO GitHub/Twitter/Gmail: alanhamlett

Transcript of Django vs flask

Page 1: Django vs flask

Django vs FlaskHow do you choose?

Alan Hamlett, WakaTime CTOGitHub/Twitter/Gmail: alanhamlett

Page 2: Django vs flask

Django

Python web framework for rapid development built to keep you from

reinventing the wheel.

Does more for you.

Once you’re an expert, you will build faster the Django way.

Large, powerful, scalable.

Flask

Newer Python web framework built to be easy and simple.

Micro with dependencies.

Once an expert, you will build Flask extensions to help you build faster.

Micro, flexible, scalable.

Page 3: Django vs flask

CommunityDjango

Born in 2005

Larger, older community

13,820 stars on GitHub

607 watchers on GitHub

FlaskBorn in 2010

Newer, active community

13,489 stars on GitHub

1,036 watchers on GitHub

Page 4: Django vs flask

LandscapeWho uses Django?

EventbriteInstagramThe Onion

PreziBitbucketPinterestUdemy

CourseraDisquis

Who uses Flask?RedditTwilio

WakaTimePresident Obama

MailgunVine

Keen.ioClose.io (ElasticSales)

Runscope

Page 5: Django vs flask

Performance

Page 6: Django vs flask

Performance

both slow, used to save dev time

Page 7: Django vs flask

Django Flask

difficult super easy

more config more code

included 3rd party extensions

built-in SQL your choice

made for HTML best for APIs

Getting StartedCode vs ConfigExtra Features

Database ORM

Building APIs

Page 8: Django vs flask

Flask Django

Django Flask

Flask Django

Flask Django

Django Flask

Flask Django

Flask Django

Django Flask

YES NO

Been coding for more than 5 years?

Django Flask

Coded in Python for more than 3 years?

Primarily dynamic HTML pages?

Will you have an API?

Service Oriented Architecture (SOA)?

Want new devs to already know your conventions?

Using multiple types of databases?

Like reading Python code? (vs reading docs)

Total Total

Page 9: Django vs flask

Flask Django

Django Flask

Flask Django

Flask Django

Django Flask

Flask Django

Flask Django

Django Flask

YES NO

Been coding for more than 5 years?

Django Flask

Coded in Python for more than 3 years?

Primarily dynamic HTML pages?

Will you have an API?

Service Oriented Architecture (SOA)?

Want new devs to already know your conventions?

Using multiple types of databases?

Like reading Python code? (vs reading docs)

Total Total

I

I

I

I

I

I

I

I

3 5

Page 10: Django vs flask

Pirates use Flask, the Navy uses Django

(WakaTime is a pirate)

http://bit.ly/1EOnDkJ

(https://speakerdeck.com/alanhamlett/django-vs-flask)