SlideShare ist ein Scribd-Unternehmen logo
1 von 27
Downloaden Sie, um offline zu lesen
Web Frameworks

    By: Rahul Malik
What are they?

• In my opinion - “A software framework
  that is meant to remove the everyday pain
  and redundancy of web development.”
Awesome, what are my
     options??
Ruby on Rails (RoR)
• Made at 37 Signals by
  DHH
• Paved the way for
  framework development
  in many other languages
• Written in Ruby
• Credited with people
                            !quot;#$%&'&$ ())*   +,




  finding out about ruby
Django
• Written in Python          -$./0#12

• Similar philosophies as
  Rails except they
  stress modularity
• Made in Kansas at The                      345&645#$12
  World Company             !quot;#$%&'&$ ())*             +,
Why do we need them?
• Web Programming was a black art
 • Bad Practices were formed
 • High coupling of components
• Mind numbing processes had to be done
  repeatedly. (i.e. CRUD pages)
• Infrastructure specific (switching to Oracle
  = pain)
How do they fix these
    problems?
Model View Controller
       Design

Model   Controller   View
Model
Database Management
• Object Relational Mapping (ORM)
• Switching to another database type is just
  changing a flag
• Transaction support as well as database
  migrations
Database Management
class Entry(models.Model):
   pub_date = models.DateTimeField()
   slug = models.SlugField(unique_for_date='pub_date')
   headline = models.CharField(maxlength=200)
   summary = models.TextField(help_text=quot;Use raw HTML.quot;)
   body = models.TextField(help_text=quot;Use raw HTML.quot;)
   author = models.CharField(maxlength=100)

  Entry.objects.get(headline=’framework talk’)
 Entry.objects.filter(pub_date=datetime.now())
View
Template Systems!

• Simple systems that can be used to
  generate HTML, CSS, RSS, or any other
  text based formats
• Controller provides context and separation
  from model
• Good for designers
Template Systems
{% extends quot;creator/base.htmlquot; %}
{% block content %}
<h1>User Settings</h1>
<h2>{{ user.username }}</h2>
<form action=quot;.quot; method=quot;postquot;>
{{ form.as_p }}
<input type=quot;submitquot; value=quot;Save Changesquot; />
</form>
{% endblock %}
Controller
Sexy URL’s

• blog.php?month=11&day=19&year=2008
• blog/11/19/2008/
Request Routing
• All HTTP Requests get mapped to a
  controller or 404 by naming conventions
  (rails) or regex matching (django)
 • domain.com/blog/view/getvar1/getvar2/...
 • '^(?P<year>d{4})/(?P<month>[a-z]{3})/(?
    P<day>w{1,2})/(?P<slug>[w-]+)/$'
Request Routing

• Naming Conventions vs. Regex Matching
• What else to you get?
 • GET, POST variables, as much HTTP
    Header information that you could want
URL Matching (Regex)

from feeds.views import publish_templatized_feed_item, publish_feed_item, refresh_feed

urlpatterns = patterns('',

    (r'^publish/$', publish_feed_item),

    (r'^publish/template/$', publish_templatized_feed_item),

    (r'^refresh/$', refresh_feed)
)
URL Matching (regex)
urlpatterns = patterns('django.views.generic.date_based',

  (r'^(?P<year>d{4})/(?P<month>[a-z]{3})/(?P<day>w{1,2})/(?P<slug>[w-]+)/$',
'object_detail', dict(info_dict, slug_field='slug')),

    (r'^(?P<year>d{4})/(?P<month>[a-z]{3})/(?P<day>w{1,2})/$', 'archive_day', info_dict),

    (r'^(?P<year>d{4})/(?P<month>[a-z]{3})/$', 'archive_month', info_dict),

    (r'^(?P<year>d{4})/$', 'archive_year', info_dict),

    (r'^/?$', 'archive_index', info_dict),
)
Freebies
Automation

• CRUD or Admin interfaces
• Schema Upgrades and Downgrades
  (Migrations)
• Generating Frequent Components (new
  controller, model, etc.)
Security

• Authorization and Authentication of users
  built-in!
• Permissions Models
• Basic Web Security at it’s core (SQL
  Injection, CSRF, etc.)
Caching


• Simple hooks and/or helpers baked in
• Flat-File, Database, or Distributed
  (memcached) database management
But does it scale?
Yes
Any Other Questions?

Weitere ähnliche Inhalte

Andere mochten auch

Michael P Keating
Michael P KeatingMichael P Keating
Michael P Keatingmkeating1
 
Shah hewlett emotion detection from speech
Shah hewlett   emotion detection from speechShah hewlett   emotion detection from speech
Shah hewlett emotion detection from speechShriram Nandakumar
 
Douglas Bellamy Resume 2013 April
Douglas Bellamy Resume 2013 AprilDouglas Bellamy Resume 2013 April
Douglas Bellamy Resume 2013 Aprildbellamy59
 
Audio based Bird Species Recognition
Audio based Bird Species RecognitionAudio based Bird Species Recognition
Audio based Bird Species RecognitionShriram Nandakumar
 
Douglas Bellamy Resume June 2012
Douglas Bellamy Resume June 2012 Douglas Bellamy Resume June 2012
Douglas Bellamy Resume June 2012 dbellamy59
 

Andere mochten auch (7)

NYDHA
NYDHANYDHA
NYDHA
 
Michael P Keating
Michael P KeatingMichael P Keating
Michael P Keating
 
Shah hewlett emotion detection from speech
Shah hewlett   emotion detection from speechShah hewlett   emotion detection from speech
Shah hewlett emotion detection from speech
 
Douglas Bellamy Resume 2013 April
Douglas Bellamy Resume 2013 AprilDouglas Bellamy Resume 2013 April
Douglas Bellamy Resume 2013 April
 
Roger G Thompson
Roger G  ThompsonRoger G  Thompson
Roger G Thompson
 
Audio based Bird Species Recognition
Audio based Bird Species RecognitionAudio based Bird Species Recognition
Audio based Bird Species Recognition
 
Douglas Bellamy Resume June 2012
Douglas Bellamy Resume June 2012 Douglas Bellamy Resume June 2012
Douglas Bellamy Resume June 2012
 

Ähnlich wie Framework Presentation

Streamlining Your Applications with Web Frameworks
Streamlining Your Applications with Web FrameworksStreamlining Your Applications with Web Frameworks
Streamlining Your Applications with Web Frameworksguestf7bc30
 
When To Use Ruby On Rails
When To Use Ruby On RailsWhen To Use Ruby On Rails
When To Use Ruby On Railsdosire
 
Introduction to Web Development with Ruby on Rails
Introduction to Web Development with Ruby on RailsIntroduction to Web Development with Ruby on Rails
Introduction to Web Development with Ruby on Railspmatsinopoulos
 
Grails Introduction - IJTC 2007
Grails Introduction - IJTC 2007Grails Introduction - IJTC 2007
Grails Introduction - IJTC 2007Guillaume Laforge
 
Intro To Django
Intro To DjangoIntro To Django
Intro To DjangoUdi Bauman
 
Static Code Analysis For Ruby
Static Code Analysis For RubyStatic Code Analysis For Ruby
Static Code Analysis For RubyRichard Huang
 
DDD on example of Symfony (SfCampUA14)
DDD on example of Symfony (SfCampUA14)DDD on example of Symfony (SfCampUA14)
DDD on example of Symfony (SfCampUA14)Oleg Zinchenko
 
Object Relational Mapping in PHP
Object Relational Mapping in PHPObject Relational Mapping in PHP
Object Relational Mapping in PHPRob Knight
 
Perchè potresti aver bisogno di un database NoSQL anche se non sei Google o F...
Perchè potresti aver bisogno di un database NoSQL anche se non sei Google o F...Perchè potresti aver bisogno di un database NoSQL anche se non sei Google o F...
Perchè potresti aver bisogno di un database NoSQL anche se non sei Google o F...Codemotion
 
5 Reasons To Love CodeIgniter
5 Reasons To Love CodeIgniter5 Reasons To Love CodeIgniter
5 Reasons To Love CodeIgniternicdev
 
WebCamp: Developer Day: DDD in PHP on example of Symfony - Олег Зинченко
WebCamp: Developer Day: DDD in PHP on example of Symfony - Олег ЗинченкоWebCamp: Developer Day: DDD in PHP on example of Symfony - Олег Зинченко
WebCamp: Developer Day: DDD in PHP on example of Symfony - Олег ЗинченкоGeeksLab Odessa
 
SproutCore and the Future of Web Apps
SproutCore and the Future of Web AppsSproutCore and the Future of Web Apps
SproutCore and the Future of Web AppsMike Subelsky
 
RubyEnRails2007 - Dr Nic Williams - Keynote
RubyEnRails2007 - Dr Nic Williams - KeynoteRubyEnRails2007 - Dr Nic Williams - Keynote
RubyEnRails2007 - Dr Nic Williams - KeynoteDr Nic Williams
 
Everything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the WebEverything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the WebJames Rakich
 
Introduction To Ruby On Rails
Introduction To Ruby On RailsIntroduction To Ruby On Rails
Introduction To Ruby On RailsSteve Keener
 
Scripting Oracle Develop 2007
Scripting Oracle Develop 2007Scripting Oracle Develop 2007
Scripting Oracle Develop 2007Tugdual Grall
 
The Django Web Application Framework 2
The Django Web Application Framework 2The Django Web Application Framework 2
The Django Web Application Framework 2fishwarter
 

Ähnlich wie Framework Presentation (20)

Streamlining Your Applications with Web Frameworks
Streamlining Your Applications with Web FrameworksStreamlining Your Applications with Web Frameworks
Streamlining Your Applications with Web Frameworks
 
When To Use Ruby On Rails
When To Use Ruby On RailsWhen To Use Ruby On Rails
When To Use Ruby On Rails
 
Introduction to Web Development with Ruby on Rails
Introduction to Web Development with Ruby on RailsIntroduction to Web Development with Ruby on Rails
Introduction to Web Development with Ruby on Rails
 
Grails Introduction - IJTC 2007
Grails Introduction - IJTC 2007Grails Introduction - IJTC 2007
Grails Introduction - IJTC 2007
 
Ruby on Rails Presentation
Ruby on Rails PresentationRuby on Rails Presentation
Ruby on Rails Presentation
 
Intro To Django
Intro To DjangoIntro To Django
Intro To Django
 
Static Code Analysis For Ruby
Static Code Analysis For RubyStatic Code Analysis For Ruby
Static Code Analysis For Ruby
 
DDD on example of Symfony (SfCampUA14)
DDD on example of Symfony (SfCampUA14)DDD on example of Symfony (SfCampUA14)
DDD on example of Symfony (SfCampUA14)
 
Object Relational Mapping in PHP
Object Relational Mapping in PHPObject Relational Mapping in PHP
Object Relational Mapping in PHP
 
Perchè potresti aver bisogno di un database NoSQL anche se non sei Google o F...
Perchè potresti aver bisogno di un database NoSQL anche se non sei Google o F...Perchè potresti aver bisogno di un database NoSQL anche se non sei Google o F...
Perchè potresti aver bisogno di un database NoSQL anche se non sei Google o F...
 
Having Fun with Play
Having Fun with PlayHaving Fun with Play
Having Fun with Play
 
5 Reasons To Love CodeIgniter
5 Reasons To Love CodeIgniter5 Reasons To Love CodeIgniter
5 Reasons To Love CodeIgniter
 
WebCamp: Developer Day: DDD in PHP on example of Symfony - Олег Зинченко
WebCamp: Developer Day: DDD in PHP on example of Symfony - Олег ЗинченкоWebCamp: Developer Day: DDD in PHP on example of Symfony - Олег Зинченко
WebCamp: Developer Day: DDD in PHP on example of Symfony - Олег Зинченко
 
SproutCore and the Future of Web Apps
SproutCore and the Future of Web AppsSproutCore and the Future of Web Apps
SproutCore and the Future of Web Apps
 
RubyEnRails2007 - Dr Nic Williams - Keynote
RubyEnRails2007 - Dr Nic Williams - KeynoteRubyEnRails2007 - Dr Nic Williams - Keynote
RubyEnRails2007 - Dr Nic Williams - Keynote
 
Road to Rails
Road to RailsRoad to Rails
Road to Rails
 
Everything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the WebEverything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the Web
 
Introduction To Ruby On Rails
Introduction To Ruby On RailsIntroduction To Ruby On Rails
Introduction To Ruby On Rails
 
Scripting Oracle Develop 2007
Scripting Oracle Develop 2007Scripting Oracle Develop 2007
Scripting Oracle Develop 2007
 
The Django Web Application Framework 2
The Django Web Application Framework 2The Django Web Application Framework 2
The Django Web Application Framework 2
 

Kürzlich hochgeladen

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 

Kürzlich hochgeladen (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

Framework Presentation

  • 1. Web Frameworks By: Rahul Malik
  • 2. What are they? • In my opinion - “A software framework that is meant to remove the everyday pain and redundancy of web development.”
  • 3. Awesome, what are my options??
  • 4. Ruby on Rails (RoR) • Made at 37 Signals by DHH • Paved the way for framework development in many other languages • Written in Ruby • Credited with people !quot;#$%&'&$ ())* +, finding out about ruby
  • 5. Django • Written in Python -$./0#12 • Similar philosophies as Rails except they stress modularity • Made in Kansas at The 345&645#$12 World Company !quot;#$%&'&$ ())* +,
  • 6. Why do we need them? • Web Programming was a black art • Bad Practices were formed • High coupling of components • Mind numbing processes had to be done repeatedly. (i.e. CRUD pages) • Infrastructure specific (switching to Oracle = pain)
  • 7. How do they fix these problems?
  • 8. Model View Controller Design Model Controller View
  • 10. Database Management • Object Relational Mapping (ORM) • Switching to another database type is just changing a flag • Transaction support as well as database migrations
  • 11. Database Management class Entry(models.Model): pub_date = models.DateTimeField() slug = models.SlugField(unique_for_date='pub_date') headline = models.CharField(maxlength=200) summary = models.TextField(help_text=quot;Use raw HTML.quot;) body = models.TextField(help_text=quot;Use raw HTML.quot;) author = models.CharField(maxlength=100) Entry.objects.get(headline=’framework talk’) Entry.objects.filter(pub_date=datetime.now())
  • 12. View
  • 13. Template Systems! • Simple systems that can be used to generate HTML, CSS, RSS, or any other text based formats • Controller provides context and separation from model • Good for designers
  • 14. Template Systems {% extends quot;creator/base.htmlquot; %} {% block content %} <h1>User Settings</h1> <h2>{{ user.username }}</h2> <form action=quot;.quot; method=quot;postquot;> {{ form.as_p }} <input type=quot;submitquot; value=quot;Save Changesquot; /> </form> {% endblock %}
  • 17. Request Routing • All HTTP Requests get mapped to a controller or 404 by naming conventions (rails) or regex matching (django) • domain.com/blog/view/getvar1/getvar2/... • '^(?P<year>d{4})/(?P<month>[a-z]{3})/(? P<day>w{1,2})/(?P<slug>[w-]+)/$'
  • 18. Request Routing • Naming Conventions vs. Regex Matching • What else to you get? • GET, POST variables, as much HTTP Header information that you could want
  • 19. URL Matching (Regex) from feeds.views import publish_templatized_feed_item, publish_feed_item, refresh_feed urlpatterns = patterns('', (r'^publish/$', publish_feed_item), (r'^publish/template/$', publish_templatized_feed_item), (r'^refresh/$', refresh_feed) )
  • 20. URL Matching (regex) urlpatterns = patterns('django.views.generic.date_based', (r'^(?P<year>d{4})/(?P<month>[a-z]{3})/(?P<day>w{1,2})/(?P<slug>[w-]+)/$', 'object_detail', dict(info_dict, slug_field='slug')), (r'^(?P<year>d{4})/(?P<month>[a-z]{3})/(?P<day>w{1,2})/$', 'archive_day', info_dict), (r'^(?P<year>d{4})/(?P<month>[a-z]{3})/$', 'archive_month', info_dict), (r'^(?P<year>d{4})/$', 'archive_year', info_dict), (r'^/?$', 'archive_index', info_dict), )
  • 22. Automation • CRUD or Admin interfaces • Schema Upgrades and Downgrades (Migrations) • Generating Frequent Components (new controller, model, etc.)
  • 23. Security • Authorization and Authentication of users built-in! • Permissions Models • Basic Web Security at it’s core (SQL Injection, CSRF, etc.)
  • 24. Caching • Simple hooks and/or helpers baked in • Flat-File, Database, or Distributed (memcached) database management
  • 25. But does it scale?
  • 26. Yes