SlideShare a Scribd company logo
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?

More Related Content

Viewers also liked

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

Viewers also liked (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
 

Similar to Framework Presentation

Streamlining Your Applications with Web Frameworks
Streamlining Your Applications with Web FrameworksStreamlining Your Applications with Web Frameworks
Streamlining Your Applications with Web Frameworks
guestf7bc30
 
When To Use Ruby On Rails
When To Use Ruby On RailsWhen To Use Ruby On Rails
When To Use Ruby On Rails
dosire
 
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
pmatsinopoulos
 
Grails Introduction - IJTC 2007
Grails Introduction - IJTC 2007Grails Introduction - IJTC 2007
Grails Introduction - IJTC 2007
Guillaume Laforge
 
Ruby on Rails Presentation
Ruby on Rails PresentationRuby on Rails Presentation
Ruby on Rails Presentation
Michael MacDonald
 
Intro To Django
Intro To DjangoIntro To Django
Intro To Django
Udi Bauman
 
Static Code Analysis For Ruby
Static Code Analysis For RubyStatic Code Analysis For Ruby
Static Code Analysis For Ruby
Richard 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 PHP
Rob 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
 
Having Fun with Play
Having Fun with PlayHaving Fun with Play
Having Fun with Play
Clinton Dreisbach
 
5 Reasons To Love CodeIgniter
5 Reasons To Love CodeIgniter5 Reasons To Love CodeIgniter
5 Reasons To Love CodeIgniter
nicdev
 
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 Apps
Mike Subelsky
 
RubyEnRails2007 - Dr Nic Williams - Keynote
RubyEnRails2007 - Dr Nic Williams - KeynoteRubyEnRails2007 - Dr Nic Williams - Keynote
RubyEnRails2007 - Dr Nic Williams - Keynote
Dr Nic Williams
 
Road to Rails
Road to RailsRoad to Rails
Road to Rails
paoloperrotta
 
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
James Rakich
 
Introduction To Ruby On Rails
Introduction To Ruby On RailsIntroduction To Ruby On Rails
Introduction To Ruby On Rails
Steve Keener
 
Scripting Oracle Develop 2007
Scripting Oracle Develop 2007Scripting Oracle Develop 2007
Scripting Oracle Develop 2007
Tugdual Grall
 
The Django Web Application Framework 2
The Django Web Application Framework 2The Django Web Application Framework 2
The Django Web Application Framework 2
fishwarter
 

Similar to 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
 

Recently uploaded

"What does it really mean for your system to be available, or how to define w...
"What does it really mean for your system to be available, or how to define w..."What does it really mean for your system to be available, or how to define w...
"What does it really mean for your system to be available, or how to define w...
Fwdays
 
Day 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio FundamentalsDay 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio Fundamentals
UiPathCommunity
 
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham HillinQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
LizaNolte
 
Demystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through StorytellingDemystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through Storytelling
Enterprise Knowledge
 
High performance Serverless Java on AWS- GoTo Amsterdam 2024
High performance Serverless Java on AWS- GoTo Amsterdam 2024High performance Serverless Java on AWS- GoTo Amsterdam 2024
High performance Serverless Java on AWS- GoTo Amsterdam 2024
Vadym Kazulkin
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
Pablo Gómez Abajo
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Neo4j
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
ScyllaDB
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
Ajin Abraham
 
Christine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptxChristine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptx
christinelarrosa
 
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptxPRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
christinelarrosa
 
Christine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptxChristine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptx
christinelarrosa
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
operationspcvita
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
Edge AI and Vision Alliance
 
A Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's ArchitectureA Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's Architecture
ScyllaDB
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Pitangent Analytics & Technology Solutions Pvt. Ltd
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
Fwdays
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
Javier Junquera
 

Recently uploaded (20)

"What does it really mean for your system to be available, or how to define w...
"What does it really mean for your system to be available, or how to define w..."What does it really mean for your system to be available, or how to define w...
"What does it really mean for your system to be available, or how to define w...
 
Day 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio FundamentalsDay 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio Fundamentals
 
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham HillinQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
 
Demystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through StorytellingDemystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through Storytelling
 
High performance Serverless Java on AWS- GoTo Amsterdam 2024
High performance Serverless Java on AWS- GoTo Amsterdam 2024High performance Serverless Java on AWS- GoTo Amsterdam 2024
High performance Serverless Java on AWS- GoTo Amsterdam 2024
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
 
Christine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptxChristine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptx
 
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptxPRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
 
Christine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptxChristine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptx
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
 
A Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's ArchitectureA Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's Architecture
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
 

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