SlideShare a Scribd company logo
1 of 53
Introduce Django The Python Web Framework  [email_address]
Web  “ Framework ” ? ,[object Object],[object Object]
Please Teach me Web Frameworks for Python!  ,[object Object],[object Object]
Which Part of "No XML" Don't You Understand?  ,[object Object],[object Object],[object Object]
Django ,[object Object],[object Object],[object Object],[object Object],[object Object]
Popular  Web Framework Today (via lang) ,[object Object],[object Object],[object Object],[object Object],[object Object]
Chapter 1: The buzz words Why Django over other web frameworks.
Why Django?  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Why Django? [cont.] ,[object Object],[object Object],[object Object],[object Object]
Why Django? [cont.] ,[object Object],[object Object],[object Object],[object Object]
Warning… ,[object Object],[object Object]
Dr. Larson's renowned treatise on non-inferring static type systems http://steve-yegge.blogspot.com/2006_10_01_archive.html
Why Django #1 :  Python ,[object Object],[object Object],[object Object],[object Object],[object Object]
Why Django #2:  Documentation   ,[object Object],[object Object]
Why Django #3:  Templating ,[object Object],[object Object],[object Object]
Other reasons … (django over rails) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Web Framework Performance Compare (at rails wiki) ,[object Object],[object Object],[object Object]
Comment at Catalyst User  ‘ s blog ,[object Object],[object Object],[object Object]
Django Design philosophies ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Chapter 2: Django Overview Django Web Framework 101
 
MVC,MTV  –  if it walks like a duck … ,[object Object],[object Object],MVC RoR Django Model model model View view template Controller controller view
Web Server Browser/Client URL Dispatcher: URLconf =>  urls.py View ( controller ) :  views.py Model :  models.py Database (mysql, postgresql, sqlite) Template HTML/XHTML CSS/Image Javascript settings.py manage.py django-admin.py  Admin Generic View Request Response
How Django place files ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Template: Client-side Logic such as  date format  18/12/2006" or "2006-12-18" presentation need to solved without breaking the separation strategy  HTML/XHTML CSS Javascript Structure : What Does it MEAN? Presentation :What does it LOOK like? Behavior : What Does it Do ? View(Controller): Server-side Logic Content: Django is for backend. You still have to know XHTML/CSS/Javascript for your front-end needs. The View in MVC isn’t easy as you might think
Still something great … ,[object Object],[object Object],[object Object],[object Object],[object Object]
Chapter 3: Hello, Django write a web announce system
I’ll show you…(the core idea) ,[object Object],[object Object],[object Object],[object Object],[object Object]
Follow me. #1: Start project ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Follow me #2: Create application ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Follow me #3: Create Database  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Follow me #4: build your model ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Follow me #5: Write Your Template ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Follow me #5: Write Your Template (cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Follow me #6: Write Your View ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Follow me #7: urls.py ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
#8: Let ’ s start play! ,[object Object],[object Object],[object Object],[object Object],[object Object]
Deploy ,[object Object],[object Object],[object Object],[object Object],[object Object]
Chapter 4 Generic View
Don’t Repeat Yourself (DRY) ,[object Object],[object Object],[object Object],[object Object]
Reuse your logic ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Url.py – get rids of views.py ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Chapter 5 Real World Code Snippet
Welcome to Real World! ,[object Object],[object Object],[object Object],[object Object],[object Object]
1. Table relation. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
2. Ajax via simplejson ,[object Object],[object Object],[object Object],[object Object]
3. Extend template tags.  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
4. Write your own decorator ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
5.  Use Syslog debug production server ,[object Object],[object Object],[object Object]
Chapter 6 It’s not end…
Something you still should learn. (except Python) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Resource: ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object]

More Related Content

What's hot

Keep your repo clean
Keep your repo cleanKeep your repo clean
Keep your repo cleanHector Canto
 
Sphinx autodoc - automated api documentation - PyCon.KR 2015
Sphinx autodoc - automated api documentation - PyCon.KR 2015Sphinx autodoc - automated api documentation - PyCon.KR 2015
Sphinx autodoc - automated api documentation - PyCon.KR 2015Takayuki Shimizukawa
 
Inside the JVM - Follow the white rabbit!
Inside the JVM - Follow the white rabbit!Inside the JVM - Follow the white rabbit!
Inside the JVM - Follow the white rabbit!Sylvain Wallez
 
Fast as C: How to Write Really Terrible Java
Fast as C: How to Write Really Terrible JavaFast as C: How to Write Really Terrible Java
Fast as C: How to Write Really Terrible JavaCharles Nutter
 
Everything is Permitted: Extending Built-ins
Everything is Permitted: Extending Built-insEverything is Permitted: Extending Built-ins
Everything is Permitted: Extending Built-insAndrew Dupont
 
Effective testing with pytest
Effective testing with pytestEffective testing with pytest
Effective testing with pytestHector Canto
 
Beyond JVM - YOW! Sydney 2013
Beyond JVM - YOW! Sydney 2013Beyond JVM - YOW! Sydney 2013
Beyond JVM - YOW! Sydney 2013Charles Nutter
 
Introduction to clojure
Introduction to clojureIntroduction to clojure
Introduction to clojureAbbas Raza
 
Memory management in python
Memory management in pythonMemory management in python
Memory management in pythonGaurav Aggarwal
 
7 Common mistakes in Go and when to avoid them
7 Common mistakes in Go and when to avoid them7 Common mistakes in Go and when to avoid them
7 Common mistakes in Go and when to avoid themSteven Francia
 
Pytest - testing tips and useful plugins
Pytest - testing tips and useful pluginsPytest - testing tips and useful plugins
Pytest - testing tips and useful pluginsAndreu Vallbona Plazas
 
Gae icc fall2011
Gae icc fall2011Gae icc fall2011
Gae icc fall2011Juan Gomez
 
Øredev 2011 - JVM JIT for Dummies (What the JVM Does With Your Bytecode When ...
Øredev 2011 - JVM JIT for Dummies (What the JVM Does With Your Bytecode When ...Øredev 2011 - JVM JIT for Dummies (What the JVM Does With Your Bytecode When ...
Øredev 2011 - JVM JIT for Dummies (What the JVM Does With Your Bytecode When ...Charles Nutter
 
The Sincerest Form of Flattery
The Sincerest Form of FlatteryThe Sincerest Form of Flattery
The Sincerest Form of FlatteryJosé Paumard
 

What's hot (20)

Keep your repo clean
Keep your repo cleanKeep your repo clean
Keep your repo clean
 
Sphinx autodoc - automated api documentation - PyCon.KR 2015
Sphinx autodoc - automated api documentation - PyCon.KR 2015Sphinx autodoc - automated api documentation - PyCon.KR 2015
Sphinx autodoc - automated api documentation - PyCon.KR 2015
 
Inside the JVM - Follow the white rabbit!
Inside the JVM - Follow the white rabbit!Inside the JVM - Follow the white rabbit!
Inside the JVM - Follow the white rabbit!
 
Fast as C: How to Write Really Terrible Java
Fast as C: How to Write Really Terrible JavaFast as C: How to Write Really Terrible Java
Fast as C: How to Write Really Terrible Java
 
Php go vrooom!
Php go vrooom!Php go vrooom!
Php go vrooom!
 
Everything is Permitted: Extending Built-ins
Everything is Permitted: Extending Built-insEverything is Permitted: Extending Built-ins
Everything is Permitted: Extending Built-ins
 
Python in 90 minutes
Python in 90 minutesPython in 90 minutes
Python in 90 minutes
 
Down the Rabbit Hole
Down the Rabbit HoleDown the Rabbit Hole
Down the Rabbit Hole
 
Effective testing with pytest
Effective testing with pytestEffective testing with pytest
Effective testing with pytest
 
Beyond JVM - YOW! Sydney 2013
Beyond JVM - YOW! Sydney 2013Beyond JVM - YOW! Sydney 2013
Beyond JVM - YOW! Sydney 2013
 
обзор Python
обзор Pythonобзор Python
обзор Python
 
Introduction to clojure
Introduction to clojureIntroduction to clojure
Introduction to clojure
 
Python
PythonPython
Python
 
Memory management in python
Memory management in pythonMemory management in python
Memory management in python
 
7 Common mistakes in Go and when to avoid them
7 Common mistakes in Go and when to avoid them7 Common mistakes in Go and when to avoid them
7 Common mistakes in Go and when to avoid them
 
Pytest - testing tips and useful plugins
Pytest - testing tips and useful pluginsPytest - testing tips and useful plugins
Pytest - testing tips and useful plugins
 
Gae icc fall2011
Gae icc fall2011Gae icc fall2011
Gae icc fall2011
 
Øredev 2011 - JVM JIT for Dummies (What the JVM Does With Your Bytecode When ...
Øredev 2011 - JVM JIT for Dummies (What the JVM Does With Your Bytecode When ...Øredev 2011 - JVM JIT for Dummies (What the JVM Does With Your Bytecode When ...
Øredev 2011 - JVM JIT for Dummies (What the JVM Does With Your Bytecode When ...
 
Free your lambdas
Free your lambdasFree your lambdas
Free your lambdas
 
The Sincerest Form of Flattery
The Sincerest Form of FlatteryThe Sincerest Form of Flattery
The Sincerest Form of Flattery
 

Similar to Introduce Django

Web Development in Django
Web Development in DjangoWeb Development in Django
Web Development in DjangoLakshman Prasad
 
JBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
JBUG 11 - Django-The Web Framework For Perfectionists With DeadlinesJBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
JBUG 11 - Django-The Web Framework For Perfectionists With DeadlinesTikal Knowledge
 
Introduction To Django
Introduction To DjangoIntroduction To Django
Introduction To DjangoJay Graves
 
0506-django-web-framework-for-python.pdf
0506-django-web-framework-for-python.pdf0506-django-web-framework-for-python.pdf
0506-django-web-framework-for-python.pdfradhianiedjan1
 
* DJANGO - The Python Framework - Low Kian Seong, Developer
    * DJANGO - The Python Framework - Low Kian Seong, Developer    * DJANGO - The Python Framework - Low Kian Seong, Developer
* DJANGO - The Python Framework - Low Kian Seong, DeveloperLinuxmalaysia Malaysia
 
Intro To Django
Intro To DjangoIntro To Django
Intro To DjangoUdi Bauman
 
JavaScript 2.0 in Dreamweaver CS4
JavaScript 2.0 in Dreamweaver CS4JavaScript 2.0 in Dreamweaver CS4
JavaScript 2.0 in Dreamweaver CS4alexsaves
 
Django: Beyond Basics
Django: Beyond BasicsDjango: Beyond Basics
Django: Beyond Basicsarunvr
 
Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application developmentzonathen
 
Introduction To Django
Introduction To DjangoIntroduction To Django
Introduction To DjangoTuan Anh Tran
 
Ajax to the Moon
Ajax to the MoonAjax to the Moon
Ajax to the Moondavejohnson
 
Mini Curso Django Ii Congresso Academico Ces
Mini Curso Django Ii Congresso Academico CesMini Curso Django Ii Congresso Academico Ces
Mini Curso Django Ii Congresso Academico CesLeonardo Fernandes
 
Profiling PHP with Xdebug / Webgrind
Profiling PHP with Xdebug / WebgrindProfiling PHP with Xdebug / Webgrind
Profiling PHP with Xdebug / WebgrindSam Keen
 

Similar to Introduce Django (20)

Web Development in Django
Web Development in DjangoWeb Development in Django
Web Development in Django
 
Django Girls Tutorial
Django Girls TutorialDjango Girls Tutorial
Django Girls Tutorial
 
django
djangodjango
django
 
dJango
dJangodJango
dJango
 
JBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
JBUG 11 - Django-The Web Framework For Perfectionists With DeadlinesJBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
JBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
 
Introduction To Django
Introduction To DjangoIntroduction To Django
Introduction To Django
 
0506-django-web-framework-for-python.pdf
0506-django-web-framework-for-python.pdf0506-django-web-framework-for-python.pdf
0506-django-web-framework-for-python.pdf
 
* DJANGO - The Python Framework - Low Kian Seong, Developer
    * DJANGO - The Python Framework - Low Kian Seong, Developer    * DJANGO - The Python Framework - Low Kian Seong, Developer
* DJANGO - The Python Framework - Low Kian Seong, Developer
 
Intro To Django
Intro To DjangoIntro To Django
Intro To Django
 
Django by rj
Django by rjDjango by rj
Django by rj
 
JavaScript 2.0 in Dreamweaver CS4
JavaScript 2.0 in Dreamweaver CS4JavaScript 2.0 in Dreamweaver CS4
JavaScript 2.0 in Dreamweaver CS4
 
Django Introdcution
Django IntrodcutionDjango Introdcution
Django Introdcution
 
Django: Beyond Basics
Django: Beyond BasicsDjango: Beyond Basics
Django: Beyond Basics
 
Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application development
 
Introduction To Django
Introduction To DjangoIntroduction To Django
Introduction To Django
 
Lightweight web frameworks
Lightweight web frameworksLightweight web frameworks
Lightweight web frameworks
 
Django
DjangoDjango
Django
 
Ajax to the Moon
Ajax to the MoonAjax to the Moon
Ajax to the Moon
 
Mini Curso Django Ii Congresso Academico Ces
Mini Curso Django Ii Congresso Academico CesMini Curso Django Ii Congresso Academico Ces
Mini Curso Django Ii Congresso Academico Ces
 
Profiling PHP with Xdebug / Webgrind
Profiling PHP with Xdebug / WebgrindProfiling PHP with Xdebug / Webgrind
Profiling PHP with Xdebug / Webgrind
 

More from Chui-Wen Chiu

高雄新地標 統一夢世代
高雄新地標  統一夢世代高雄新地標  統一夢世代
高雄新地標 統一夢世代Chui-Wen Chiu
 
天下第一 夜市總冠軍
天下第一 夜市總冠軍天下第一 夜市總冠軍
天下第一 夜市總冠軍Chui-Wen Chiu
 
下班就跑是富有哲學道理1
下班就跑是富有哲學道理1下班就跑是富有哲學道理1
下班就跑是富有哲學道理1Chui-Wen Chiu
 
柬埔寨鄉村婚禮
柬埔寨鄉村婚禮柬埔寨鄉村婚禮
柬埔寨鄉村婚禮Chui-Wen Chiu
 
挖好屬於自己的井
挖好屬於自己的井挖好屬於自己的井
挖好屬於自己的井Chui-Wen Chiu
 
Why The Us Wants War 080702
Why The Us Wants War  080702Why The Us Wants War  080702
Why The Us Wants War 080702Chui-Wen Chiu
 
你今天的選擇是什麼?
你今天的選擇是什麼?你今天的選擇是什麼?
你今天的選擇是什麼?Chui-Wen Chiu
 
我的學思歷程 劉兆玄
我的學思歷程 劉兆玄我的學思歷程 劉兆玄
我的學思歷程 劉兆玄Chui-Wen Chiu
 
Unknown Parameter Value
Unknown Parameter ValueUnknown Parameter Value
Unknown Parameter ValueChui-Wen Chiu
 

More from Chui-Wen Chiu (20)

移動內存算法
移動內存算法移動內存算法
移動內存算法
 
墾丁 更新版
墾丁  更新版墾丁  更新版
墾丁 更新版
 
墾丁 更新版2
墾丁  更新版2墾丁  更新版2
墾丁 更新版2
 
Bw1096
Bw1096Bw1096
Bw1096
 
高雄新地標 統一夢世代
高雄新地標  統一夢世代高雄新地標  統一夢世代
高雄新地標 統一夢世代
 
Borland傳奇
Borland傳奇Borland傳奇
Borland傳奇
 
Python 庫簡介
Python 庫簡介Python 庫簡介
Python 庫簡介
 
Asp.Net Mvc 1.0
Asp.Net Mvc 1.0Asp.Net Mvc 1.0
Asp.Net Mvc 1.0
 
天下第一 夜市總冠軍
天下第一 夜市總冠軍天下第一 夜市總冠軍
天下第一 夜市總冠軍
 
下班就跑是富有哲學道理1
下班就跑是富有哲學道理1下班就跑是富有哲學道理1
下班就跑是富有哲學道理1
 
認識腸病毒
認識腸病毒認識腸病毒
認識腸病毒
 
排隊的店
排隊的店排隊的店
排隊的店
 
柬埔寨鄉村婚禮
柬埔寨鄉村婚禮柬埔寨鄉村婚禮
柬埔寨鄉村婚禮
 
新 創 意
新 創 意新 創 意
新 創 意
 
挖好屬於自己的井
挖好屬於自己的井挖好屬於自己的井
挖好屬於自己的井
 
Why The Us Wants War 080702
Why The Us Wants War  080702Why The Us Wants War  080702
Why The Us Wants War 080702
 
你今天的選擇是什麼?
你今天的選擇是什麼?你今天的選擇是什麼?
你今天的選擇是什麼?
 
我的學思歷程 劉兆玄
我的學思歷程 劉兆玄我的學思歷程 劉兆玄
我的學思歷程 劉兆玄
 
Unknown Parameter Value
Unknown Parameter ValueUnknown Parameter Value
Unknown Parameter Value
 
你也在井裡嗎
你也在井裡嗎你也在井裡嗎
你也在井裡嗎
 

Introduce Django

  • 1. Introduce Django The Python Web Framework [email_address]
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7. Chapter 1: The buzz words Why Django over other web frameworks.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12. Dr. Larson's renowned treatise on non-inferring static type systems http://steve-yegge.blogspot.com/2006_10_01_archive.html
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20. Chapter 2: Django Overview Django Web Framework 101
  • 21.  
  • 22.
  • 23. Web Server Browser/Client URL Dispatcher: URLconf => urls.py View ( controller ) : views.py Model : models.py Database (mysql, postgresql, sqlite) Template HTML/XHTML CSS/Image Javascript settings.py manage.py django-admin.py Admin Generic View Request Response
  • 24.
  • 25. Template: Client-side Logic such as date format 18/12/2006" or "2006-12-18" presentation need to solved without breaking the separation strategy HTML/XHTML CSS Javascript Structure : What Does it MEAN? Presentation :What does it LOOK like? Behavior : What Does it Do ? View(Controller): Server-side Logic Content: Django is for backend. You still have to know XHTML/CSS/Javascript for your front-end needs. The View in MVC isn’t easy as you might think
  • 26.
  • 27. Chapter 3: Hello, Django write a web announce system
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 40.
  • 41.
  • 42.
  • 43. Chapter 5 Real World Code Snippet
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50. Chapter 6 It’s not end…
  • 51.
  • 52.
  • 53.

Editor's Notes

  1. Django follows Python's core concept of keeping things as simple as possible and understandable. This leads to much more maintainable code in the future. Libraries play a huge part in choosing Django over Rails. Python has a library for just about everything Basically coding practices which help you put together some quick, clever code. This is nice, but much like Perl code it can end up making code a PITA to maintain. I cannot express how much better this is than than anything Ruby has. Ruby's module system doesn't even come close.
  2. http:// wiki.rubyonrails.org/.../UnderstandingRailsMVC http://dotsx.usc.edu/rails2.png
  3. http://www.phpwact.org/pattern/model_view_controller?DokuWiki=01b5b5ce30eea3c7558b04b1d02ae25c
  4. http://en.wikipedia.org/wiki/Web_template http://en.wikipedia.org/wiki/Web_template_system_%28terminology%29