SlideShare a Scribd company logo
1 of 27
Download to read offline
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

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
 

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

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

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
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
#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
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
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
 
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
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

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
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
#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
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
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
 
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
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 

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