Post on 09-Jan-2017
Free Django!
WEBservice
%3
Plan
● Diving inside Backend
● Django basics
● Django REST Framework
● Simple Django app
%7
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
Diving inside Backend
● Basic Architecture
● Top 3 projects overview
● Why Django?
%13
Basic Architecture
● LAMP– Linux – OS
– Apache – web (also nginx)
– MySQL – database (also postgres)
– PHP – frontend + backend (also Django, Ruby onRails)
%17
Basic Architecture
● LAMP
● MEAN– MongoDB – database
– Express.js – web
– Angular.js – frontend
– Node.js – backend
%20
Top 3 projects overview
● Django
%23
Top 3 projects overview
● Django
● Ruby On Rails
%27
Top 3 projects overview
● Django
● Ruby On Rails
● Express.js
%30
Why Django?
● Fast development
%33
Why Django?
● Fast development
● Strong community
%37
Why Django?
● Fast development
● Strong community
● Secure
%40
Why Django?
● Fast development
● Strong community
● Secure
● Featured
%43
Why Django?
● Fast development
● Strong community
● Secure
● Featured
● Like Ruby on Rails, but Django
%47
Django basics
● Structure
● Where to find Applications?
● Django MVC
%50
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
Structure
● project/pet/● __init__.py● migrations/
– __init__.py● models.py● tests.py ● views.py # Contollers● urls.py # app URL declarations
%57
Where to find Applications?
● Django packages
● GitHub
● In your Company
%60
MVC → Django MVC
● Model → Model
● Controller → View
● View → Template
%63
Django REST Framework
● Features– Great architecture
– Easy to add to existed project
– Plenty of existed apps
%67
Django REST Framework
● Features
● Usage– Install
– Add Router
– Add ViewSet
– Add Serializers
– Add Tests
%70
Django REST Framework
● Features
● Usage
● Profit– Serverauditor
– Look
%73
Simple Django app
● How to start (Do it!):– Install python and pip
%77
Simple Django app
● How to start (Do it!):– Install python and pip
– https://docs.djangoproject.com/en/1.10/intro/install/
%80
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
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
Simple Django app
● How to start (Do it!)
● My sample
https://github.com/EvgeneOskin/animals-drf
%90
Summary
● Diving inside Backend
● Django basics
● Django REST Framework
● Simple Django app
%93
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
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
Free Django!
WEBservice
%3
Plan
● Diving inside Backend
● Django basics
● Django REST Framework
● Simple Django app
%7
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
Diving inside Backend
● Basic Architecture
● Top 3 projects overview
● Why Django?
%13
Basic Architecture
● LAMP– Linux – OS
– Apache – web (also nginx)
– MySQL – database (also postgres)
– PHP – frontend + backend (also Django, Ruby onRails)
%17
Basic Architecture
● LAMP
● MEAN– MongoDB – database
– Express.js – web
– Angular.js – frontend
– Node.js – backend
%20
Top 3 projects overview
● Django
%23
Top 3 projects overview
● Django
● Ruby On Rails
%27
Top 3 projects overview
● Django
● Ruby On Rails
● Express.js
%30
Why Django?
● Fast development
%33
Why Django?
● Fast development
● Strong community
%37
Why Django?
● Fast development
● Strong community
● Secure
%40
Why Django?
● Fast development
● Strong community
● Secure
● Featured
%43
Why Django?
● Fast development
● Strong community
● Secure
● Featured
● Like Ruby on Rails, but Django
%47
Django basics
● Structure
● Where to find Applications?
● Django MVC
%50
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
Structure
● project/pet/● __init__.py● migrations/
– __init__.py● models.py● tests.py● views.py # Contollers● urls.py # app URL declarations
%57
Where to find Applications?
● Django packages
● GitHub
● In your Company
%60
MVC → Django MVC
● Model → Model
● Controller → View
● View → Template
%63
Django REST Framework
● Features– Great architecture
– Easy to add to existed project
– Plenty of existed apps
%67
Django REST Framework
● Features
● Usage– Install
– Add Router
– Add ViewSet
– Add Serializers
– Add Tests
%70
Django REST Framework
● Features
● Usage
● Profit– Serverauditor
– Look
%73
Simple Django app
● How to start (Do it!):– Install python and pip
%77
Simple Django app
● How to start (Do it!):– Install python and pip
– https://docs.djangoproject.com/en/1.10/intro/install/
%80
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
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
Simple Django app
● How to start (Do it!)
● My sample
https://github.com/EvgeneOskin/animals-drf
%90
Summary
● Diving inside Backend
● Django basics
● Django REST Framework
● Simple Django app
%93
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
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