63
Introduction Comparision Uniqueness Conclusion Django v/s Ruby on Rails A Newbie Web Developer’s Perspective Shreyank Gupta/[email protected] March 20, 2010 Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

Embed Size (px)

DESCRIPTION

As I have been developing Web Applications for just more than an year now, I can safely introduce myself as a Newbie Web Developer. A year ago, when I started out, my first choice when it came to building Web Apps was Ruby on Rails. The reason was the fascination. There was a steep learning curve from my Python background, but it was all worth it. Today, working in the industry as a Web Programmer, I program applications in both Ruby on Rails and Django. And during my coffee-breaks, when I sit down and retrospect, I start comparing. And when I compare, I come up with advantages and disadvantages of both the web frameworks. Both Ruby on Rails and Django are no doubt (in my opinion) the two best Web Frameworks in existence. Both have their own bits of Superiority and Inferiority when compared with the other. My talk aims to put these bits in front of the audience and have a little discussion on the areas of improvements.

Citation preview

Page 1: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

Django v/s Ruby on RailsA Newbie Web Developer’s Perspective

Shreyank Gupta/[email protected]

March 20, 2010

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 2: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

First LookDocumentation

Fascination

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 3: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

First LookDocumentation

From the Website

Ruby on Rails

Web Development that doesn’thurt

Open-source webdevelopment frameworkthat’s optimised forprogrammer’s happiness andsustainable productivity.

Lets you write beautifulcode by favoring conventionover configuration.

Django

The Web framework forperfectionists (with deadlines).

Django makes it easier tobuild better Web apps morequickly and with less code.

Django is a high-levelPython Web framework thatencourages rapiddevelopment and clean,pragmatic design.

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 4: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

First LookDocumentation

From the Website

Ruby on Rails

Web Development that doesn’thurt

Open-source webdevelopment frameworkthat’s optimised forprogrammer’s happiness andsustainable productivity.

Lets you write beautifulcode by favoring conventionover configuration.

Django

The Web framework forperfectionists (with deadlines).

Django makes it easier tobuild better Web apps morequickly and with less code.

Django is a high-levelPython Web framework thatencourages rapiddevelopment and clean,pragmatic design.

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 5: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

First LookDocumentation

From the Website

Ruby on Rails

Web Development that doesn’thurt

Open-source webdevelopment frameworkthat’s optimised forprogrammer’s happiness andsustainable productivity.

Lets you write beautifulcode by favoring conventionover configuration.

Django

The Web framework forperfectionists (with deadlines).

Django makes it easier tobuild better Web apps morequickly and with less code.

Django is a high-levelPython Web framework thatencourages rapiddevelopment and clean,pragmatic design.

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 6: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

First LookDocumentation

From the Website

Ruby on Rails

Web Development that doesn’thurt

Open-source webdevelopment frameworkthat’s optimised forprogrammer’s happiness andsustainable productivity.

Lets you write beautifulcode by favoring conventionover configuration.

Django

The Web framework forperfectionists (with deadlines).

Django makes it easier tobuild better Web apps morequickly and with less code.

Django is a high-levelPython Web framework thatencourages rapiddevelopment and clean,pragmatic design.

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 7: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

First LookDocumentation

From the Website

Ruby on Rails

Web Development that doesn’thurt

Open-source webdevelopment frameworkthat’s optimised forprogrammer’s happiness andsustainable productivity.

Lets you write beautifulcode by favoring conventionover configuration.

Django

The Web framework forperfectionists (with deadlines).

Django makes it easier tobuild better Web apps morequickly and with less code.

Django is a high-levelPython Web framework thatencourages rapiddevelopment and clean,pragmatic design.

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 8: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

First LookDocumentation

Documentation

Ruby on Rails

Guides - http://guides.rubyonrails.org/

RailsCasts - http://railscasts.com/

Django

Docs - http://docs.djangoproject.com/

DjangoSnippets - http://www.djangosnippets.org/

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 9: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

First LookDocumentation

Documentation

Ruby on Rails

Guides - http://guides.rubyonrails.org/

RailsCasts - http://railscasts.com/

Django

Docs - http://docs.djangoproject.com/

DjangoSnippets - http://www.djangosnippets.org/

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 10: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

First LookDocumentation

Documentation

Ruby on Rails

Guides - http://guides.rubyonrails.org/

RailsCasts - http://railscasts.com/

Django

Docs - http://docs.djangoproject.com/

DjangoSnippets - http://www.djangosnippets.org/

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 11: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

The Rails WayBalanceDisbalance

Discipline v/s Flexibility

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 12: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

The Rails WayBalanceDisbalance

The Rails Way

Rails is opinionated software. That is, it assumes that there is abest way to do things, and its designed to encourage that best wayand in some cases to discourage alternatives. If you learn “TheRails Way”, you’ll probably discover a tremendous increase inproductivity. If you persist in bringing old habits from otherlanguages to your Rails development, and trying to use patternsyou learned elsewhere, you may have a less happy experience.

- http://guides.rubyonrails.org/getting started.html

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 13: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

The Rails WayBalanceDisbalance

The Rails Way

DRY - Dont Repeat Yourself

Writing the same code over and over again is a bad thing.

Convention Over Configuration

Rails makes assumptions about what you want to do and howyou’re going to do it, rather than letting you tweak every littlething through endless configuration files.

REST

Organizing your application around resources and standard HTTPverbs is the fastest way to go.

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 14: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

The Rails WayBalanceDisbalance

The Rails Way

DRY - Dont Repeat Yourself

Writing the same code over and over again is a bad thing.

Convention Over Configuration

Rails makes assumptions about what you want to do and howyou’re going to do it, rather than letting you tweak every littlething through endless configuration files.

REST

Organizing your application around resources and standard HTTPverbs is the fastest way to go.

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 15: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

The Rails WayBalanceDisbalance

The Rails Way

DRY - Dont Repeat Yourself

Writing the same code over and over again is a bad thing.

Convention Over Configuration

Rails makes assumptions about what you want to do and howyou’re going to do it, rather than letting you tweak every littlething through endless configuration files.

REST

Organizing your application around resources and standard HTTPverbs is the fastest way to go.

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 16: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

The Rails WayBalanceDisbalance

Balance

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 17: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

The Rails WayBalanceDisbalance

Architecture

Ruby on Rails

MVC : Model - Controller - View

versus

Django

MTV : Model - Template - View

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 18: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

The Rails WayBalanceDisbalance

Architecture

Ruby on Rails

MVC : Model - Controller - View

versus

Django

MTV : Model - Template - View

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 19: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

The Rails WayBalanceDisbalance

Architecture

Ruby on Rails

MVC : Model - Controller - View

versus

Django

MTV : Model - Template - View

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 20: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

The Rails WayBalanceDisbalance

Object Relational Mapping - ORM

Ruby on Rails

Active Records

versus

Django

Django Model Instance Reference

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 21: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

The Rails WayBalanceDisbalance

Object Relational Mapping - ORM

Ruby on Rails

Active Records

versus

Django

Django Model Instance Reference

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 22: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

The Rails WayBalanceDisbalance

Object Relational Mapping - ORM

Ruby on Rails

Active Records

versus

Django

Django Model Instance Reference

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 23: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

The Rails WayBalanceDisbalance

Bundled JavaScript

Ruby on Rails

Comes with bundled copies of:

Prototype.jsscript.aculo.us

JavaScriptHelper part of the framework.

Django

Ships JQuery as a part of the Admin Interface.

Not a part of the framework.

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 24: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

The Rails WayBalanceDisbalance

Bundled JavaScript

Ruby on Rails

Comes with bundled copies of:

Prototype.jsscript.aculo.us

JavaScriptHelper part of the framework.

Django

Ships JQuery as a part of the Admin Interface.

Not a part of the framework.

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 25: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

The Rails WayBalanceDisbalance

Bundled JavaScript

Ruby on Rails

Comes with bundled copies of:

Prototype.jsscript.aculo.us

JavaScriptHelper part of the framework.

Django

Ships JQuery as a part of the Admin Interface.

Not a part of the framework.

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 26: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

The Rails WayBalanceDisbalance

Bundled JavaScript

Ruby on Rails

Comes with bundled copies of:

Prototype.jsscript.aculo.us

JavaScriptHelper part of the framework.

Django

Ships JQuery as a part of the Admin Interface.

Not a part of the framework.

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 27: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

The Rails WayBalanceDisbalance

Bundled JavaScript

Ruby on Rails

Comes with bundled copies of:

Prototype.jsscript.aculo.us

JavaScriptHelper part of the framework.

Django

Ships JQuery as a part of the Admin Interface.

Not a part of the framework.

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 28: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

The Rails WayBalanceDisbalance

Bundled JavaScript

Ruby on Rails

Comes with bundled copies of:

Prototype.jsscript.aculo.us

JavaScriptHelper part of the framework.

Django

Ships JQuery as a part of the Admin Interface.

Not a part of the framework.

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 29: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

The Rails WayBalanceDisbalance

Disbalance

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 30: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

The Rails WayBalanceDisbalance

Views/Templates

Ruby on Rails

Rails Rendering/Layout

versus

Django

Django Templating

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 31: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

The Rails WayBalanceDisbalance

Views/Templates

Ruby on Rails

Rails Rendering/Layout

versus

Django

Django Templating

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 32: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

The Rails WayBalanceDisbalance

Views/Templates

Ruby on Rails

Rails Rendering/Layout

versus

Django

Django Templating

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 33: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

The Rails WayBalanceDisbalance

Directory Structure

Ruby on Rails

$ rails newrails

Django

$ django-admin startproject newdjango$ cd newdjango$ python manage.py startapp myapp

Now let’s have a look at the tree.

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 34: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

The Rails WayBalanceDisbalance

Directory Structure

Ruby on Rails

$ rails newrails

Django

$ django-admin startproject newdjango$ cd newdjango$ python manage.py startapp myapp

Now let’s have a look at the tree.

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 35: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

The Rails WayBalanceDisbalance

Directory Structure

Ruby on Rails

$ rails newrails

Django

$ django-admin startproject newdjango$ cd newdjango$ python manage.py startapp myapp

Now let’s have a look at the tree.

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 36: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

The Rails WayBalanceDisbalance

Authentication Modules

Ruby on Rails

No built-in authentication framework.

Third party authentication plugins available:

Restful Authentication.Authlogic

Django

Authentication part of the framework.

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 37: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

The Rails WayBalanceDisbalance

Authentication Modules

Ruby on Rails

No built-in authentication framework.

Third party authentication plugins available:

Restful Authentication.Authlogic

Django

Authentication part of the framework.

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 38: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

The Rails WayBalanceDisbalance

Authentication Modules

Ruby on Rails

No built-in authentication framework.

Third party authentication plugins available:

Restful Authentication.Authlogic

Django

Authentication part of the framework.

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 39: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

The Rails WayBalanceDisbalance

Authentication Modules

Ruby on Rails

No built-in authentication framework.

Third party authentication plugins available:

Restful Authentication.Authlogic

Django

Authentication part of the framework.

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 40: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

The Rails WayBalanceDisbalance

Authentication Modules

Ruby on Rails

No built-in authentication framework.

Third party authentication plugins available:

Restful Authentication.Authlogic

Django

Authentication part of the framework.

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 41: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

The Rails WayBalanceDisbalance

Learning curve

Ruby on Rails

Steep Learning Curve

Lots of framework specific stuff to learn

Django

Slight learning curve if you are already familier with Python.

The Django template language ;-)

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 42: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

The Rails WayBalanceDisbalance

Learning curve

Ruby on Rails

Steep Learning Curve

Lots of framework specific stuff to learn

Django

Slight learning curve if you are already familier with Python.

The Django template language ;-)

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 43: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

The Rails WayBalanceDisbalance

Learning curve

Ruby on Rails

Steep Learning Curve

Lots of framework specific stuff to learn

Django

Slight learning curve if you are already familier with Python.

The Django template language ;-)

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 44: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

The Rails WayBalanceDisbalance

Learning curve

Ruby on Rails

Steep Learning Curve

Lots of framework specific stuff to learn

Django

Slight learning curve if you are already familier with Python.

The Django template language ;-)

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 45: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

The Rails WayBalanceDisbalance

Database Schema Management

Ruby on Rails

$ rake db:migrate

versus

Django

$ python manage.py syncdb

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 46: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

The Rails WayBalanceDisbalance

Database Schema Management

Ruby on Rails

$ rake db:migrate

versus

Django

$ python manage.py syncdb

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 47: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

The Rails WayBalanceDisbalance

Database Schema Management

Ruby on Rails

$ rake db:migrate

versus

Django

$ python manage.py syncdb

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 48: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

Ruby on RailsDjango

Unique (Selling|Breaking) Points

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 49: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

Ruby on RailsDjango

REST - Representational State Transfer

Using resource identifiers (URLs) to represent resources

Transferring representations of the state of that resourcebetween system components.

Example

to a Rails application a request such as:DELETE /photos/17would be understood to refer to a photo resource with the ID of17, and to indicate a desired action — deleting that resource.REST is a natural style for the architecture of web applications,and Rails makes it even more natural by using conventions to shieldyou from some of the RESTful complexities and browser quirks.

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 50: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

Ruby on RailsDjango

REST - Representational State Transfer

Using resource identifiers (URLs) to represent resources

Transferring representations of the state of that resourcebetween system components.

Example

to a Rails application a request such as:DELETE /photos/17would be understood to refer to a photo resource with the ID of17, and to indicate a desired action — deleting that resource.REST is a natural style for the architecture of web applications,and Rails makes it even more natural by using conventions to shieldyou from some of the RESTful complexities and browser quirks.

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 51: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

Ruby on RailsDjango

Migrations

Definition

Migrations are a convenient way for you to alter your database in astructured and organised manner. You could edit fragments of SQL byhand but you would then be responsible for telling other developers thatthey need to go and run it. You’d also have to keep track of which changesneed to be run against the production machines next time you deploy.

Proof.

# This file is auto-generated from the current state of thedatabase. Instead of editing this file,# please use the migrations feature of Active Record toincrementally modify your database, and# then regenerate this schema definition.

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 52: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

Ruby on RailsDjango

Migrations

Definition

Migrations are a convenient way for you to alter your database in astructured and organised manner. You could edit fragments of SQL byhand but you would then be responsible for telling other developers thatthey need to go and run it. You’d also have to keep track of which changesneed to be run against the production machines next time you deploy.

Proof.

# This file is auto-generated from the current state of thedatabase. Instead of editing this file,# please use the migrations feature of Active Record toincrementally modify your database, and# then regenerate this schema definition.

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 53: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

Ruby on RailsDjango

Rails Scaffold

Definition

Scaffolds an entire resource, from model and migration tocontroller and views, along with a full test suite. The resource isready to use as a starting point for your RESTful,resource-oriented application.

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 54: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

Ruby on RailsDjango

Cross-Reference API

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 55: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

Ruby on RailsDjango

Django Admin Interface

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 56: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

Ruby on RailsDjango

Python APIs

Django has the advantage of:

High quality Python APIs available for a lot of services.

Equivalent Ruby APIs not as good quality.

Example

Mark Pilgrim’s Universal Feed Parser v/s rFeedParser

Ruby parser for kickstart issue

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 57: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

Ruby on RailsDjango

Python APIs

Django has the advantage of:

High quality Python APIs available for a lot of services.

Equivalent Ruby APIs not as good quality.

Example

Mark Pilgrim’s Universal Feed Parser v/s rFeedParser

Ruby parser for kickstart issue

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 58: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

Ruby on RailsDjango

Python APIs

Django has the advantage of:

High quality Python APIs available for a lot of services.

Equivalent Ruby APIs not as good quality.

Example

Mark Pilgrim’s Universal Feed Parser v/s rFeedParser

Ruby parser for kickstart issue

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 59: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

Ruby on RailsDjango

Python APIs

Django has the advantage of:

High quality Python APIs available for a lot of services.

Equivalent Ruby APIs not as good quality.

Example

Mark Pilgrim’s Universal Feed Parser v/s rFeedParser

Ruby parser for kickstart issue

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 60: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

Ruby on RailsDjango

Python APIs

Django has the advantage of:

High quality Python APIs available for a lot of services.

Equivalent Ruby APIs not as good quality.

Example

Mark Pilgrim’s Universal Feed Parser v/s rFeedParser

Ruby parser for kickstart issue

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 61: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

Ruby on RailsDjango

The syncdb Drawback

Syncdb will not alter existing tables

syncdb will only create tables for models which have not yet beeninstalled. It will never issue ALTER TABLE statements to match changesmade to a model class after installation. Changes to model classes anddatabase schemas often involve some form of ambiguity and, in thosecases, Django would have to guess at the correct changes to make. Thereis a risk that critical data would be lost in the process.If you have made changes to a model and wish to alter the database tablesto match, use the sql command to display the new SQL structure andcompare that to your existing table schema to work out the changes.

- http://docs.djangoproject.com/en/dev/ref/django-admin

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 62: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

AlternativesDiscussion

Alternatives

Shreyank Gupta/[email protected] Django v/s Ruby on Rails

Page 63: Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank Gupta

IntroductionComparisionUniquenessConclusion

AlternativesDiscussion

!?!

Shreyank Gupta/[email protected] Django v/s Ruby on Rails