60
Free Django! WEB service %3

Free django

Embed Size (px)

Citation preview

Page 1: Free django

Free Django!

WEBservice

%3

Page 2: Free django

Plan

● Diving inside Backend

● Django basics

● Django REST Framework

● Simple Django app

%7

Page 3: Free django

Diving inside Backend

In software engineering, front end (frontend)and back end (backend) distinguish betweenthe separation of concerns between thepresentation layer (the front end) – which is theinterface between the user – and the dataaccess layer (the back end).

%10

Page 4: Free django

Diving inside Backend

● Basic Architecture

● Top 3 projects overview

● Why Django?

%13

Page 5: Free django

Basic Architecture

● LAMP– Linux – OS

– Apache – web (also nginx)

– MySQL – database (also postgres)

– PHP – frontend + backend (also Django, Ruby onRails)

%17

Page 6: Free django

Basic Architecture

● LAMP

● MEAN– MongoDB – database

– Express.js – web

– Angular.js – frontend

– Node.js – backend

%20

Page 7: Free django

Top 3 projects overview

● Django

%23

Page 8: Free django

Top 3 projects overview

● Django

● Ruby On Rails

%27

Page 9: Free django

Top 3 projects overview

● Django

● Ruby On Rails

● Express.js

%30

Page 10: Free django

Why Django?

● Fast development

%33

Page 11: Free django

Why Django?

● Fast development

● Strong community

%37

Page 12: Free django

Why Django?

● Fast development

● Strong community

● Secure

%40

Page 13: Free django

Why Django?

● Fast development

● Strong community

● Secure

● Featured

%43

Page 14: Free django

Why Django?

● Fast development

● Strong community

● Secure

● Featured

● Like Ruby on Rails, but Django

%47

Page 15: Free django

Django basics

● Structure

● Where to find Applications?

● Django MVC

%50

Page 16: Free django

Structure

● project/

– manage.py # entrypoint

– mysite/ # dir with site staff● __init__.py● settings.py # site settings● urls.py # URL declarations● wsgi.py # entry-point for WSGI-compatible

%53

Page 17: Free django

Structure

● project/pet/● __init__.py● migrations/

– __init__.py● models.py● tests.py ● views.py # Contollers● urls.py # app URL declarations

%57

Page 18: Free django

Where to find Applications?

● Django packages

● GitHub

● In your Company

%60

Page 19: Free django

MVC → Django MVC

● Model → Model

● Controller → View

● View → Template

%63

Page 20: Free django

Django REST Framework

● Features– Great architecture

– Easy to add to existed project

– Plenty of existed apps

%67

Page 21: Free django

Django REST Framework

● Features

● Usage– Install

– Add Router

– Add ViewSet

– Add Serializers

– Add Tests

%70

Page 22: Free django

Django REST Framework

● Features

● Usage

● Profit– Serverauditor

– Look

%73

Page 23: Free django

Simple Django app

● How to start (Do it!):– Install python and pip

%77

Page 24: Free django

Simple Django app

● How to start (Do it!):– Install python and pip

– https://docs.djangoproject.com/en/1.10/intro/install/

%80

Page 25: Free django

Simple Django app

● How to start (Do it!):– Install python and pip

– https://docs.djangoproject.com/en/1.10/intro/install/

– https://docs.djangoproject.com/en/1.10/intro/tutorial01/

%83

Page 26: Free django

Simple Django app

● How to start (Do it!):– Install python and pip

– https://docs.djangoproject.com/en/1.10/intro/install/

– https://docs.djangoproject.com/en/1.10/intro/tutorial01/

– Run localserver

%87

Page 27: Free django

Simple Django app

● How to start (Do it!)

● My sample

https://github.com/EvgeneOskin/animals-drf

%90

Page 28: Free django

Summary

● Diving inside Backend

● Django basics

● Django REST Framework

● Simple Django app

%93

Page 30: Free django

Advices

● Do not use aggregation in admin page!

● Add crash reporter (eg. Sentry) and trackversion!

● Have a strong deployment process!

● Do not run datamigrations in service start!

%100

Page 31: Free django

Free Django!

WEBservice

%3

Page 32: Free django

Plan

● Diving inside Backend

● Django basics

● Django REST Framework

● Simple Django app

%7

Page 33: Free django

Diving inside Backend

In software engineering, front end (frontend)and back end (backend) distinguish betweenthe separation of concerns between thepresentation layer (the front end) – which is theinterface between the user – and the dataaccess layer (the back end).

%10

Page 34: Free django

Diving inside Backend

● Basic Architecture

● Top 3 projects overview

● Why Django?

%13

Page 35: Free django

Basic Architecture

● LAMP– Linux – OS

– Apache – web (also nginx)

– MySQL – database (also postgres)

– PHP – frontend + backend (also Django, Ruby onRails)

%17

Page 36: Free django

Basic Architecture

● LAMP

● MEAN– MongoDB – database

– Express.js – web

– Angular.js – frontend

– Node.js – backend

%20

Page 37: Free django

Top 3 projects overview

● Django

%23

Page 38: Free django

Top 3 projects overview

● Django

● Ruby On Rails

%27

Page 39: Free django

Top 3 projects overview

● Django

● Ruby On Rails

● Express.js

%30

Page 40: Free django

Why Django?

● Fast development

%33

Page 41: Free django

Why Django?

● Fast development

● Strong community

%37

Page 42: Free django

Why Django?

● Fast development

● Strong community

● Secure

%40

Page 43: Free django

Why Django?

● Fast development

● Strong community

● Secure

● Featured

%43

Page 44: Free django

Why Django?

● Fast development

● Strong community

● Secure

● Featured

● Like Ruby on Rails, but Django

%47

Page 45: Free django

Django basics

● Structure

● Where to find Applications?

● Django MVC

%50

Page 46: Free django

Structure

● project/

– manage.py # entrypoint

– mysite/ # dir with site staff● __init__.py● settings.py # site settings● urls.py # URL declarations● wsgi.py # entry-point for WSGI-compatible

%53

Page 47: Free django

Structure

● project/pet/● __init__.py● migrations/

– __init__.py● models.py● tests.py● views.py # Contollers● urls.py # app URL declarations

%57

Page 48: Free django

Where to find Applications?

● Django packages

● GitHub

● In your Company

%60

Page 49: Free django

MVC → Django MVC

● Model → Model

● Controller → View

● View → Template

%63

Page 50: Free django

Django REST Framework

● Features– Great architecture

– Easy to add to existed project

– Plenty of existed apps

%67

Page 51: Free django

Django REST Framework

● Features

● Usage– Install

– Add Router

– Add ViewSet

– Add Serializers

– Add Tests

%70

Page 52: Free django

Django REST Framework

● Features

● Usage

● Profit– Serverauditor

– Look

%73

Page 53: Free django

Simple Django app

● How to start (Do it!):– Install python and pip

%77

Page 54: Free django

Simple Django app

● How to start (Do it!):– Install python and pip

– https://docs.djangoproject.com/en/1.10/intro/install/

%80

Page 55: Free django

Simple Django app

● How to start (Do it!):– Install python and pip

– https://docs.djangoproject.com/en/1.10/intro/install/

– https://docs.djangoproject.com/en/1.10/intro/tutorial01/

%83

Page 56: Free django

Simple Django app

● How to start (Do it!):– Install python and pip

– https://docs.djangoproject.com/en/1.10/intro/install/

– https://docs.djangoproject.com/en/1.10/intro/tutorial01/

– Run localserver

%87

Page 57: Free django

Simple Django app

● How to start (Do it!)

● My sample

https://github.com/EvgeneOskin/animals-drf

%90

Page 58: Free django

Summary

● Diving inside Backend

● Django basics

● Django REST Framework

● Simple Django app

%93

Page 59: Free django

References

● https://en.wikipedia.org/wiki/LAMP_%28software_bundle%29

● https://www.djangoproject.com/

● https://docs.djangoproject.com/en/1.10/intro/tutorial01/

● https://docs.djangoproject.com/en/1.10/

● http://django-rest-framework.org/

● http://djangopackages.com/

● https://github.com/EvgeneOskin/animals-drf

● http://www.intenct.nl/projects/django-allauth/

%97

Page 60: Free django

Advices

● Do not use aggregation in admin page!

● Add crash reporter (eg. Sentry) and trackversion!

● Have a strong deployment process!

● Do not run datamigrations in service start!

%100