SlideShare a Scribd company logo
1 of 46
True beauty is on the inside
...but your users are shallow.
Loek van Gent
2 June 2015
Writing better front-end code
PHP (Zend)many, many years
Django/Python
3 yearsMe #afk
Listen up guys,
we've got a cool idea...
Multi-tenant & white label site
The big refactor
Sorry, we could not display the entire diff because too many files (1,805) changed.
WOW!
I REALLY love that new design!!!
True beauty is on the inside
...but your product manager is shallow.
So, what's all this fuzz about
front-end?
So, how can we write
better front-end code?
$ django-admin createproject true_beauty
$ django-admin startapp heart
$ django-admin startapp spirit
Typical Django Project Layout
├── true_beauty
│   ├── __init__.py
│   ├── settings.py
│   ├── urls.py
│   └── wsgi.py
│
├── manage.py
│
├── spirit
│   ├── __init__.py
│   ├── models.py
│   ├── tests.py
│   └── views.py
│
└── heart
├── __init__.py
├── models.py
├── tests.py
└── views.py
├── true_beauty
│
├── heart
│   ├── models.py
│   ├── tests.py
│   ├── views.py
│   ├── templates
│ │ └── heart
│   └── static
│    ├── css
│ └── js
│
└── spirit
   ├── models.py
   ├── tests.py
   ├── views.py
   ├── templates
│ └── spirit
   └── static
   ├── css
└── js
Typical Django Project Layout
Group your front-end!
since 1.8
Django Project Layout
├── true_beauty
│   ├── __init__.py
│   ├── settings.py
│   ├── urls.py
│   ├── wsgi.py
│ │
│   ├── templates
│   └── static
│
├── manage.py
│
├── spirit
│   ├── __init__.py
│   ├── models.py
│   ├── tests.py
│   └── views.py
│
└── heart
├── __init__.py
├── models.py
├── tests.py
└── views.py
you are
here
Django Project Layout
├── true_beauty
│   ├── __init__.py
│   ├── settings.py
│   ├── urls.py
│   ├── wsgi.py
│ │
│   ├── templates
│   └── static
│
├── manage.py
│
├── spirit
│   ├── __init__.py
│   ├── models.py
│   ├── tests.py
│   └── views.py
│
└── heart
├── __init__.py
├── models.py
├── tests.py
└── views.py
you are
here
front-end
guys
Ok.
Let's look at some front-end tools.
JS requirements: Bower
{
"name": "true_beauty",
"description": "True beauty",
"dependencies": {
"jquery-ui": "~1.11.4",
"jquery": "1.8.3",
"moment": "2.9.0",
}
}
Structured CSS: Sass
.item {
width: $container-width;
color: $first-color;
.col-4 {
width: $container-width / 4;
}
&:hover {...}
}
Building your front-end: Grunt
Installing these and other tools: NPM
This is starting to look like an
entire project
within my
Django project
Now you're getting it!
Front-endBack-end
Django Server to provide data
Django Rest Framework
Full-stack Javascript Framework
for front-end
Ember, Angular, React...
Back-end Front-end
TestingBack-end
Front-end
Mock
Api
Ember CLI
$ ember new good_looks
$ cd good_looks
$ ember generate route eyes
$ ember generate route smile
Typical Ember Project Layout
app/
├── app.js
├── index.html
├── routes
├── models
├── views
├── controllers
├── components
│   ├── eyes.js
│   └── smile.js
└── templates
   ├── application.hbs
   ├── eyes.hbs
   └── smile.hbs
$ ember serve --proxy
http://localhost:8000
Summing it up...
Love your front-end
It's the only thing your users get to see
Group your front-end
Use tools to help
structure your front-end code
Start using Ember*
It is the future!
AngularReact
No! Forget
about Backbone
Suggestions?
Questions?
That's all for now.
@loek1pc gannetson

More Related Content

Viewers also liked (6)

SOS Demens avis.ashx
SOS Demens avis.ashxSOS Demens avis.ashx
SOS Demens avis.ashx
 
Afrapportering af projekt SOS Demens.ashx
Afrapportering af projekt SOS Demens.ashxAfrapportering af projekt SOS Demens.ashx
Afrapportering af projekt SOS Demens.ashx
 
Technology for Better Healthcare
Technology for Better HealthcareTechnology for Better Healthcare
Technology for Better Healthcare
 
PyCon Namibia - So, this idea of yours...
PyCon Namibia - So, this idea of yours...PyCon Namibia - So, this idea of yours...
PyCon Namibia - So, this idea of yours...
 
Hikma pharmaceuticals PLC
Hikma pharmaceuticals PLCHikma pharmaceuticals PLC
Hikma pharmaceuticals PLC
 
Medical tourism special insights with emphasis on the Gulf region
Medical tourism special insights with emphasis on the Gulf region Medical tourism special insights with emphasis on the Gulf region
Medical tourism special insights with emphasis on the Gulf region
 

Similar to Write Better Front-End Code in Django with Ember

Intro To Django
Intro To DjangoIntro To Django
Intro To DjangoUdi Bauman
 
Odoo Experience 2018 - Visualizing Data in Odoo: How to Create a New View
Odoo Experience 2018 - Visualizing Data in Odoo: How to Create a New ViewOdoo Experience 2018 - Visualizing Data in Odoo: How to Create a New View
Odoo Experience 2018 - Visualizing Data in Odoo: How to Create a New ViewElínAnna Jónasdóttir
 
Web Development in Django
Web Development in DjangoWeb Development in Django
Web Development in DjangoLakshman Prasad
 
Padrino is agnostic
Padrino is agnosticPadrino is agnostic
Padrino is agnosticTakeshi Yabe
 
Develop Android/iOS app using golang
Develop Android/iOS app using golangDevelop Android/iOS app using golang
Develop Android/iOS app using golangSeongJae Park
 
Marek Kuziel - Deploying Django with Buildout
Marek Kuziel - Deploying Django with BuildoutMarek Kuziel - Deploying Django with Buildout
Marek Kuziel - Deploying Django with Buildoutmarekkuziel
 
Adventures in infrastructure as code
Adventures in infrastructure as codeAdventures in infrastructure as code
Adventures in infrastructure as codeJulian Simpson
 
What is Django | Django Tutorial for Beginners | Python Django Training | Edu...
What is Django | Django Tutorial for Beginners | Python Django Training | Edu...What is Django | Django Tutorial for Beginners | Python Django Training | Edu...
What is Django | Django Tutorial for Beginners | Python Django Training | Edu...Edureka!
 
Groovy in the Enterprise - Case Studies - TSSJS Prague 2008 - Guillaume Laforge
Groovy in the Enterprise - Case Studies - TSSJS Prague 2008 - Guillaume LaforgeGroovy in the Enterprise - Case Studies - TSSJS Prague 2008 - Guillaume Laforge
Groovy in the Enterprise - Case Studies - TSSJS Prague 2008 - Guillaume LaforgeGuillaume Laforge
 
Django: Beyond Basics
Django: Beyond BasicsDjango: Beyond Basics
Django: Beyond Basicsarunvr
 
Introduction To Django
Introduction To DjangoIntroduction To Django
Introduction To DjangoJay Graves
 
Django Architecture Introduction
Django Architecture IntroductionDjango Architecture Introduction
Django Architecture IntroductionHaiqi Chen
 
Deliverance: Plone theming without the learning curve from Plone Symposium Ea...
Deliverance: Plone theming without the learning curve from Plone Symposium Ea...Deliverance: Plone theming without the learning curve from Plone Symposium Ea...
Deliverance: Plone theming without the learning curve from Plone Symposium Ea...Jazkarta, Inc.
 

Similar to Write Better Front-End Code in Django with Ember (20)

Introduce Django
Introduce DjangoIntroduce Django
Introduce Django
 
django
djangodjango
django
 
Intro To Django
Intro To DjangoIntro To Django
Intro To Django
 
Odoo Experience 2018 - Visualizing Data in Odoo: How to Create a New View
Odoo Experience 2018 - Visualizing Data in Odoo: How to Create a New ViewOdoo Experience 2018 - Visualizing Data in Odoo: How to Create a New View
Odoo Experience 2018 - Visualizing Data in Odoo: How to Create a New View
 
Web Development in Django
Web Development in DjangoWeb Development in Django
Web Development in Django
 
Padrino is agnostic
Padrino is agnosticPadrino is agnostic
Padrino is agnostic
 
Develop Android/iOS app using golang
Develop Android/iOS app using golangDevelop Android/iOS app using golang
Develop Android/iOS app using golang
 
Django Girls Tutorial
Django Girls TutorialDjango Girls Tutorial
Django Girls Tutorial
 
Marek Kuziel - Deploying Django with Buildout
Marek Kuziel - Deploying Django with BuildoutMarek Kuziel - Deploying Django with Buildout
Marek Kuziel - Deploying Django with Buildout
 
Adventures in infrastructure as code
Adventures in infrastructure as codeAdventures in infrastructure as code
Adventures in infrastructure as code
 
What is Django | Django Tutorial for Beginners | Python Django Training | Edu...
What is Django | Django Tutorial for Beginners | Python Django Training | Edu...What is Django | Django Tutorial for Beginners | Python Django Training | Edu...
What is Django | Django Tutorial for Beginners | Python Django Training | Edu...
 
Groovy in the Enterprise - Case Studies - TSSJS Prague 2008 - Guillaume Laforge
Groovy in the Enterprise - Case Studies - TSSJS Prague 2008 - Guillaume LaforgeGroovy in the Enterprise - Case Studies - TSSJS Prague 2008 - Guillaume Laforge
Groovy in the Enterprise - Case Studies - TSSJS Prague 2008 - Guillaume Laforge
 
Django
DjangoDjango
Django
 
React django
React djangoReact django
React django
 
Django: Beyond Basics
Django: Beyond BasicsDjango: Beyond Basics
Django: Beyond Basics
 
Introduction To Django
Introduction To DjangoIntroduction To Django
Introduction To Django
 
Django Architecture Introduction
Django Architecture IntroductionDjango Architecture Introduction
Django Architecture Introduction
 
Django by rj
Django by rjDjango by rj
Django by rj
 
Deliverance: Plone theming without the learning curve from Plone Symposium Ea...
Deliverance: Plone theming without the learning curve from Plone Symposium Ea...Deliverance: Plone theming without the learning curve from Plone Symposium Ea...
Deliverance: Plone theming without the learning curve from Plone Symposium Ea...
 
Automate Yo' Self
Automate Yo' SelfAutomate Yo' Self
Automate Yo' Self
 

Recently uploaded

VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Roomdivyansh0kumar0
 
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Roomishabajaj13
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)Damian Radcliffe
 
Russian Call Girls Thane Swara 8617697112 Independent Escort Service Thane
Russian Call Girls Thane Swara 8617697112 Independent Escort Service ThaneRussian Call Girls Thane Swara 8617697112 Independent Escort Service Thane
Russian Call Girls Thane Swara 8617697112 Independent Escort Service ThaneCall girls in Ahmedabad High profile
 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersDamian Radcliffe
 
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxellan12
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Roomdivyansh0kumar0
 
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service PuneVIP Call Girls Pune Madhuri 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service PuneCall girls in Ahmedabad High profile
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Servicesexy call girls service in goa
 
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With RoomVIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Roomdivyansh0kumar0
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...Diya Sharma
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607dollysharma2066
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024APNIC
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGAPNIC
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebJames Anderson
 
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$kojalkojal131
 

Recently uploaded (20)

VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
 
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)
 
Russian Call Girls Thane Swara 8617697112 Independent Escort Service Thane
Russian Call Girls Thane Swara 8617697112 Independent Escort Service ThaneRussian Call Girls Thane Swara 8617697112 Independent Escort Service Thane
Russian Call Girls Thane Swara 8617697112 Independent Escort Service Thane
 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
 
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
 
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
 
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service PuneVIP Call Girls Pune Madhuri 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Madhuri 8617697112 Independent Escort Service Pune
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
 
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With RoomVIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOG
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
 
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
 

Write Better Front-End Code in Django with Ember

  • 1. True beauty is on the inside ...but your users are shallow. Loek van Gent 2 June 2015 Writing better front-end code
  • 2. PHP (Zend)many, many years Django/Python 3 yearsMe #afk
  • 3.
  • 4. Listen up guys, we've got a cool idea... Multi-tenant & white label site
  • 6. Sorry, we could not display the entire diff because too many files (1,805) changed.
  • 7.
  • 8.
  • 9. WOW! I REALLY love that new design!!!
  • 10. True beauty is on the inside ...but your product manager is shallow.
  • 11. So, what's all this fuzz about front-end?
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17. So, how can we write better front-end code?
  • 18. $ django-admin createproject true_beauty $ django-admin startapp heart $ django-admin startapp spirit
  • 19. Typical Django Project Layout ├── true_beauty │   ├── __init__.py │   ├── settings.py │   ├── urls.py │   └── wsgi.py │ ├── manage.py │ ├── spirit │   ├── __init__.py │   ├── models.py │   ├── tests.py │   └── views.py │ └── heart ├── __init__.py ├── models.py ├── tests.py └── views.py
  • 20. ├── true_beauty │ ├── heart │   ├── models.py │   ├── tests.py │   ├── views.py │   ├── templates │ │ └── heart │   └── static │    ├── css │ └── js │ └── spirit    ├── models.py    ├── tests.py    ├── views.py    ├── templates │ └── spirit    └── static    ├── css └── js Typical Django Project Layout
  • 22. Django Project Layout ├── true_beauty │   ├── __init__.py │   ├── settings.py │   ├── urls.py │   ├── wsgi.py │ │ │   ├── templates │   └── static │ ├── manage.py │ ├── spirit │   ├── __init__.py │   ├── models.py │   ├── tests.py │   └── views.py │ └── heart ├── __init__.py ├── models.py ├── tests.py └── views.py you are here
  • 23. Django Project Layout ├── true_beauty │   ├── __init__.py │   ├── settings.py │   ├── urls.py │   ├── wsgi.py │ │ │   ├── templates │   └── static │ ├── manage.py │ ├── spirit │   ├── __init__.py │   ├── models.py │   ├── tests.py │   └── views.py │ └── heart ├── __init__.py ├── models.py ├── tests.py └── views.py you are here front-end guys
  • 24. Ok. Let's look at some front-end tools.
  • 25. JS requirements: Bower { "name": "true_beauty", "description": "True beauty", "dependencies": { "jquery-ui": "~1.11.4", "jquery": "1.8.3", "moment": "2.9.0", } }
  • 26. Structured CSS: Sass .item { width: $container-width; color: $first-color; .col-4 { width: $container-width / 4; } &:hover {...} }
  • 28. Installing these and other tools: NPM
  • 29. This is starting to look like an entire project within my Django project
  • 32. Django Server to provide data Django Rest Framework
  • 33. Full-stack Javascript Framework for front-end Ember, Angular, React...
  • 38. $ ember new good_looks $ cd good_looks $ ember generate route eyes $ ember generate route smile
  • 39. Typical Ember Project Layout app/ ├── app.js ├── index.html ├── routes ├── models ├── views ├── controllers ├── components │   ├── eyes.js │   └── smile.js └── templates    ├── application.hbs    ├── eyes.hbs    └── smile.hbs
  • 40. $ ember serve --proxy http://localhost:8000
  • 42. Love your front-end It's the only thing your users get to see
  • 44. Use tools to help structure your front-end code
  • 45. Start using Ember* It is the future! AngularReact No! Forget about Backbone
  • 46. Suggestions? Questions? That's all for now. @loek1pc gannetson

Editor's Notes

  1. Do-good crowd funding Django vereniging I confess: PHP Django. Yeah!
  2. 1% Crowd-funding projects with social impact. Setting up an Internet café in Uganda Solar lights Nigeria Boat for disabled people in The Netherlands Others want a platform like that too “Corporate social responsibility” Booking.com Accenture Municipalities of Gent, Breda ..
  3. Product manager django-tenant-schemas Migration of data Merging of code / features
  4. Re-building your house ...with current tenants still in Let me show the changes we had to make...
  5. Ah...
  6. This it the site before the refactor
  7. … and after We did it! Just minor changes everything running as it should
  8. Chongqing Mobile apps are now easier to interact Traditional websites are lagging behind!
  9. Let's look at a typical Django project
  10. Create a project calles True Beauty
  11. Add templates and front-end code to apps Let's hear what Daniel & Audrey have to say about this.
  12. Two scoops of Django As of last month when 1.8 came out
  13. Let's look at an opinionated list
  14. Browsers are very powerful today. Full stack. So MVC inside your browser.
  15. API JSON data Only talk to the server when - new data needed - write data
  16. Easy to write integration tests against API Fast development. Not slowed down by designs and front-enders.
  17. Easy to mock an API Fast development Not slowed down by back-end devs always over-complicating things. Easy to demo Also deploys can be separate (if no API schema changes)
  18. Ember CLI Remember django-admin?
  19. Quick synopsis to get you started writing better front-end code.
  20. Ember CLI Remember django-admin?
  21. Ember CLI Remember django-admin?
  22. Ember CLI Remember django-admin?
  23. Ember CLI Remember django-admin?
  24. Ember CLI Remember django-admin?