rails vs django study presentation
DESCRIPTION
Ruby on Rails ("Rails") is the dominant web programming framework for Ruby and, even outside the Ruby community, is considered the epitome of the latest generation of high-productivity, open source web development tools. Django is one of many competing web development frameworks for Python. It is notable, first, for being highly regarded amongst Python programmers, and second, for being one of the few of the new generation of frameworks that does not ape Ruby on Rails. Both Rails and Django claim greatly enhanced productivity, compared with more traditional web development frameworks.In this paper, we compare the two frameworks from the point of view of a developer attempting to choose one of the two frameworks for a new project.TRANSCRIPT
![Page 1: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/1.jpg)
A Rails/Django Comparisonby Ben Askins and Alan Green
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License. To view a copy of this license, visit
http://creativecommons.org/licenses/by-nc-sa/2.5/or send a letter to Creative Commons, 543 Howard Street, 5th Floor, San Francisco, California, 94105, USA.
The original version of this presentation is available at http://3columns.net/habitual/docs/Pres2.odp
![Page 2: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/2.jpg)
Django Rails vs.
![Page 3: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/3.jpg)
![Page 4: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/4.jpg)
![Page 5: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/5.jpg)
![Page 6: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/6.jpg)
We wrote the same application twice
![Page 7: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/7.jpg)
![Page 8: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/8.jpg)
![Page 9: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/9.jpg)
TagBook
Reading
Reader n m
nn
11
![Page 10: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/10.jpg)
![Page 11: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/11.jpg)
![Page 12: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/12.jpg)
Developer skill level:● Not identical● Too advanced to be called ‘beginners’● Insufficiently advanced to be ‘typical’
Development environments different:● New Mac vs Old Windows laptop● Central Coast vs Cityrail
Part-time development – start-stop effect and gaps between sessions
Didn’t consider:● Performance● Deployment● Maintainability● Enterprise-friendliness
Unrepresentative example application:● Too few pages● No Atom/RSS feeds● No public data entry
Development practices:● Didn’t do it the “best way”● Older versions of Rails and Django● Didn’t use this or that helpful third party feature
This was just a single trial. Really need:● Multiple developers● Multiple applications● Multiple environments
“Multiple” means “statistically significant”
LOC and time-to-implement measurements are stupid:
● Not transferable to other developers● Only rough indicator of complexity
![Page 13: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/13.jpg)
![Page 14: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/14.jpg)
![Page 15: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/15.jpg)
![Page 16: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/16.jpg)
Some Data
![Page 17: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/17.jpg)
Plan
![Page 18: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/18.jpg)
$1 000 000
![Page 19: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/19.jpg)
US$1 000 000
![Page 20: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/20.jpg)
Time to Implement
![Page 21: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/21.jpg)
Initial Expectations
“This’ll be easy I’ll whip it up in a weekend.”
“You don’t understand the power of the built-in
admin application.”
![Page 22: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/22.jpg)
Rails Django 0.00
5.00
10.00
15.00
20.00
25.00
30.00
Hours to Implement
HTML Prototype
![Page 23: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/23.jpg)
Rails Django 0.00
5.00
10.00
15.00
20.00
25.00
30.00
Hours to Implement
Develop Test data HTML Prototype
![Page 24: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/24.jpg)
Rails Django 0.00
5.00
10.00
15.00
20.00
25.00
30.00
Hours to Implement
Project set up Develop Test data HTML Prototype
![Page 25: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/25.jpg)
Rails Django 0.00
5.00
10.00
15.00
20.00
25.00
30.00
Hours to Implement
Models Project set up Develop Test data HTML Prototype
![Page 26: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/26.jpg)
TagBook
Reading
Reader n m
nn
11
![Page 27: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/27.jpg)
Rails Django 0.00
5.00
10.00
15.00
20.00
25.00
30.00
Hours to Implement
Models Project set up Develop Test data HTML Prototype
![Page 28: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/28.jpg)
Rails Django 0.00
5.00
10.00
15.00
20.00
25.00
30.00
Hours to Implement
Home page Models Project set up Develop Test data HTML Prototype
![Page 29: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/29.jpg)
Rails Django 0.00
5.00
10.00
15.00
20.00
25.00
30.00
Hours to Implement
Basic pages Home page Models Project set up Develop Test data HTML Prototype
![Page 30: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/30.jpg)
Rails Django 0.00
5.00
10.00
15.00
20.00
25.00
30.00
Hours to Implement
Admin pages Basic pages Home page Models Project set up Develop Test data HTML Prototype
![Page 31: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/31.jpg)
Rails Django 0.00
5.00
10.00
15.00
20.00
25.00
30.00
Hours to Implement
Amazon interface Admin pages Basic pages Home page Models Project set up Develop Test data HTML Prototype
![Page 32: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/32.jpg)
Rails Django 0.00
5.00
10.00
15.00
20.00
25.00
30.00
Hours to Implement
Data loading code Amazon interface Admin pages Basic pages Home page Models Project set up Develop Test data HTML Prototype
![Page 33: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/33.jpg)
Rails Django 0.00
5.00
10.00
15.00
20.00
25.00
30.00
Hours to Implement
Test, tidy Data loading code Amazon interface Admin pages Basic pages Home page Models Project set up Develop Test data HTML Prototype
![Page 34: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/34.jpg)
Rails Django 0.00
5.00
10.00
15.00
20.00
25.00
30.00
Hours to Implement
Test, tidy Data loading code Amazon interface Admin pages Basic pages Home page Models Project set up Develop Test data HTML Prototype
26:46
16:36
![Page 35: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/35.jpg)
Rails Django 0.00
5.00
10.00
15.00
20.00
25.00
30.00
Hours to Implement
Test, tidy Data loading code Amazon interface Admin pages Basic pages Home page Models Project set up Develop Test data HTML Prototype
Admin PagesAdmin Pages26:46
16:36
![Page 36: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/36.jpg)
Rails Django 0.00
5.00
10.00
15.00
20.00
25.00
30.00
Hours to Implement - without Admin
Test, tidy Data loading code Amazon interface Basic pages Home page Models Project set up Develop Test data HTML Prototype
18:21
15:39
![Page 37: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/37.jpg)
Lines of Code
![Page 38: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/38.jpg)
Rails Django0
100
200
300
400
500
600
700
800
Lines of Code
Model
![Page 39: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/39.jpg)
Rails Django0
100
200
300
400
500
600
700
800
Lines of Code
View/ControllerModel
![Page 40: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/40.jpg)
Rails Django0
100
200
300
400
500
600
700
800
Lines of Code
YAML data loading View/ControllerModel
![Page 41: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/41.jpg)
readers.yml
# Reader test dataBen: id: 1 username: benj72 fullname: Ben Askins bio: Eats books for breakfastAlan: id: 2 username: agreen fullname: Alan Green bio: Fond of snakesFred: id: 3 username: fred fullname: Fred Wilkins bio: Loves a good romantic thriller
![Page 42: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/42.jpg)
Rails Django0
100
200
300
400
500
600
700
800
Lines of Code
YAML data loading View/ControllerModel
![Page 43: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/43.jpg)
Rails Django0
100
200
300
400
500
600
700
800
Lines of Code
Authentication YAML data loading View/ControllerModel
![Page 44: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/44.jpg)
Rails Django0
100
200
300
400
500
600
700
800
Lines of Code
Schema Migration Authentication YAML data loading View/ControllerModel
![Page 45: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/45.jpg)
Rails Django0
100
200
300
400
500
600
700
800
Lines of Code
HTML Helpers/ Template tags Schema Migration Authentication YAML data loading View/ControllerModel
![Page 46: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/46.jpg)
Rails Django0
100
200
300
400
500
600
700
800
Lines of Code
Templates HTML Helpers/ Template tags Schema Migration Authentication YAML data loading View/ControllerModel
![Page 47: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/47.jpg)
● Hand-coded admin application
● Concise
● Quicker● Slightly less code
![Page 48: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/48.jpg)
Database
Web Server
Routes View
Controller
Model
Browser
Database
Web Server
urls.py Template
View
Model
Browser
Rails Django
![Page 49: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/49.jpg)
Database
Web Server
Routes View
Controller
Model
Browser
Database
Web Server
urls.py Template
View
Model
Browser
Rails Django
![Page 50: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/50.jpg)
ActionController::Routing::Routes.draw do |map|
map.connect '', :controller => "home"
# restful resources map.resources :books do |books| books.resources :readings end map.resources :readers do |readers| readers.resources :reader_images end map.resources :tagsend
# Some imports herefrom hrproj.hr import views
urlpatterns = patterns('',
(r'^$', views.index),
(r'^readers/$', views.reader_list), (r'^tags/$', views.tag_list), (r'^books/$', views.book_list),
(r'^readers/(?P<username>.*)/$', views.reader_detail), (r'^tags/(?P<slug>.*)/$', views.tag_detail), (r'^books/(?P<slug>.*)/$', views.book_detail),)
URL Configuration
/books/hitchhikers-guide-to-the-galaxy
![Page 51: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/51.jpg)
Database
Web Server
Routes View
Controller
Model
Browser
Database
Web Server
urls.py Template
View
Model
Browser
Rails Django
![Page 52: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/52.jpg)
Controller / View Function
class BooksController < ApplicationController before_filter :find_book
def show @reading_paginator, @readings = paginate :readings, :conditions => ["book_id = ?", @book.id] end
private def find_book @book = Book.find_by_title(params[:id]) end
end
def book_detail(request, slug): book = get_object_or_404(Book, slug=slug) queryset = ReadingOccasion.objects \ .filter(book=book) \ .order_by('finished') return standard_view( request, queryset, 'book_detail.html', 'readingoccasion', book=book)
![Page 53: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/53.jpg)
Database
Web Server
Routes View
Controller
Model
Browser
Database
Web Server
urls.py Template
View
Model
Browser
Rails Django
![Page 54: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/54.jpg)
class ReadingOccasion(models.Model): reader = models.ForeignKey(Reader) book = models.ForeignKey(Book, edit_inline=models.STACKED,
num_in_admin=1) finished = models.DateField( core=True) reading_time = models.FloatField(
max_digits=5,decimal_places=2,
core=True, blank=True) notes = models.TextField(
maxlength=2000, blank=True)
class Reading < ActiveRecord::Base belongs_to :book belongs_to :readerend
![Page 55: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/55.jpg)
class ReadingOccasion(models.Model): reader = models.ForeignKey(Reader) book = models.ForeignKey(Book, edit_inline=models.STACKED,
num_in_admin=1) finished = models.DateField( core=True) reading_time = models.FloatField(
max_digits=5,decimal_places=2,
core=True, blank=True) notes = models.TextField(
maxlength=2000, blank=True)
class Reading < ActiveRecord::Base belongs_to :book belongs_to :readerend
![Page 56: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/56.jpg)
Schema evolution
![Page 57: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/57.jpg)
class CreateReadings < ActiveRecord::Migration def self.up create_table :readings do |t| t.column "book_id", :integer t.column "reader_id", :integer t.column "date_read", :datetime t.column "reading_time", :integer t.column "notes", :text end end
def self.down drop_table :readings endend
Schema is Versioned
![Page 58: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/58.jpg)
Django DB evolution
● Drop database tables● Re-create tables
manage.py syncdbpython yaml/load_data.py
● In production, you write migration DDL by hand
![Page 59: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/59.jpg)
Database
Web Server
Routes View
Controller
Model
Browser
Database
Web Server
urls.py Template
View
Model
Browser
Rails Django
![Page 60: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/60.jpg)
![Page 61: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/61.jpg)
books/show.rhtml:<%= render :partial => 'readings/list', :locals => {:key_field => "Reader"} %>
readings/_list.rhtml:<tbody> <%= render :partial => 'readings/reading', :collection => @readings, :locals => {:key_field => key_field} %></tbody>
readings/_reading.rhtml:<tr> <td class="name_col"> <% if key_field == "Book" %> <%= link_to reading.book.title, book_url(reading.book) %> <% else %> <%= link_to reading.reader.fullname, reader_url(reading.reader) %> <% end %> </td> <td class="date_col"> <%= reading.date_read_for_display %> </td> <td class="num_col"> <%= reading.reading_time %> </td> <td><%= reading.notes %></td></tr>
book_detail.html:<tbody>{% for ro in readingoccasion_list %} <tr> <td class="name_col"> <a href="{{ ro.reader.get_absolute_url }}"> {{ ro.reader.name }} </a> </td> <td class="date_col"> {{ ro.finished|date:"j M Y" }} </td> <td class="num_col"> {{ ro.reading_time }} </td> <td>{% firstof ro.notes "-" %}</td> </tr>{% endfor %}</tbody>
View / Template
![Page 62: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/62.jpg)
readers/show.rhtml:<%= render :partial => 'readings/list', :locals => { :key_field => "Book" } %>
reader_detail.html:<tbody>{% for ro in readingoccasion_list %} <tr> <td class="name_col"> <a href="{{ ro.book.get_absolute_url }}"> {{ ro.book.title }} </a> </td> <td class="date_col"> {{ ro.finished|date:"j M Y" }} </td> <td class="num_col"> {{ ro.reading_time }} </td> <td>{% firstof ro.notes "-" %}</td> </tr>{% endfor %}</tbody>
View / Template
![Page 63: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/63.jpg)
And the other bits
![Page 64: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/64.jpg)
Django Admin application
● Can save a lot of time● Good looking result● Does simple CRUD quite wellbut...● Only does simple CRUD● Only does simple relationships ● Security not fine-grained ● Not intended for public-facing pages
![Page 65: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/65.jpg)
AJAX
page.visual_effect :fade, dom_id(@tag)page.replace_html “feedback”, “Tag Deleted”page.visual_effect :appear, “feedback”, :queue => :endpage.visual_effect :fade, “feedback”, :queue => :end
![Page 66: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/66.jpg)
Rails Django
0123456789
1011
Books on Amazon
![Page 67: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/67.jpg)
Ruby Ruby on Rails Python Django0
10
20
30
40
50
60
70
80
90
100
110
120
Jobs on seek.com.au
![Page 68: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/68.jpg)
History
● Began Oct 2003● DHH
– in reaction to PHP● Extracted from
Basecamp● Released: July 2004● 1.0 shipped Dec 2005
– Latest is 1.1.6
● Began Fall 2003● Adrian and Simon
– “ditched” PHP● Extracted from
ljworld.com● Released: July 2005● 1.0 not yet shipped
– Latest is 0.95
![Page 69: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/69.jpg)
Conclusion
![Page 70: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/70.jpg)
Already using Rails?
![Page 71: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/71.jpg)
Already using Rails?
![Page 72: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/72.jpg)
Already using Django?
![Page 73: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/73.jpg)
Already using Django?
![Page 74: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/74.jpg)
Already know Ruby?
![Page 75: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/75.jpg)
Already know Ruby?
![Page 76: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/76.jpg)
Already know Python?
![Page 77: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/77.jpg)
Already know Python?
![Page 78: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/78.jpg)
Private admin pages?
![Page 79: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/79.jpg)
Private admin pages?
![Page 80: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/80.jpg)
Simple AJAX?
![Page 81: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/81.jpg)
Simple AJAX?
![Page 82: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/82.jpg)
Non-programming web designers?
![Page 83: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/83.jpg)
Non-programming web designers?
![Page 84: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/84.jpg)
Evolving Schema?
![Page 85: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/85.jpg)
Evolving Schema?
![Page 86: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/86.jpg)
Maturity
![Page 87: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/87.jpg)
Maturity – product,community, and market
![Page 88: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/88.jpg)
Maturity – product,community, and market
![Page 89: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/89.jpg)
Concise or Explict?
![Page 90: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/90.jpg)
Concise Explicit
![Page 91: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/91.jpg)
Still can’t choose?
![Page 92: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/92.jpg)
Thanks!
![Page 93: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/93.jpg)
With thanks to
● Photos– Sad puppy:
http://www.flickr.com/photos/sookie/108356632/● Software
– David A. Wheeler’s Sloccount● http://www.dwheeler.com/sloccount/
– HTML Template by Andreas Viklund● All of the paper reviewers● Our bosses:
– Cirrus Technologies– Karen Askins
![Page 94: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/94.jpg)
● “The Builders of Basecamp”– http://www.oreillynet.com/pub/a/network/2005/03/10/basecamp.html
● Snakes and Rubies presentation– http://video.google.com/videoplay?docid=2939556954580527226
● Django FAQ– http://www.djangoproject.com/documentation/faq/
![Page 95: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/95.jpg)
Why Comparing?
Lots of interest in these two frameworks
Similar in some ways
Different in others
How to choose between them?
![Page 96: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/96.jpg)
![Page 97: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/97.jpg)
This is some Ruby code This is some Python code
![Page 98: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/98.jpg)
Bonus Material
![Page 99: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/99.jpg)
def standard_view(request, queryset, template_name, template_object_name, **extra_context): """ Wrapper around the object_list generic view. """ return object_list(request, queryset=queryset, allow_empty=True, template_name=template_name, template_object_name=template_object_name, page=get_page(request), paginate_by=PAGE_SIZE, extra_context=extra_context)
def get_page(request): """ Determines the current page number. """ return int(request.GET.get('page', 1))
standard_view
![Page 100: Rails vs Django Study Presentation](https://reader034.vdocument.in/reader034/viewer/2022051515/555a4538d8b42ae1398b50fc/html5/thumbnails/100.jpg)
Rails Django 0.00
5.00
10.00
15.00
20.00
25.00
30.00
Hours to Implement
Test, tidy Data loading code Amazon interface Admin pages Basic pages Home page Models Project set up Develop Test data HTML Prototype
20:40
10:30