Why Use Rails by  Dr Nic
Upcoming SlideShare
Loading in...5
×
 

Why Use Rails by Dr Nic

on

  • 4,920 views

Ruby on Rails is a leading web development framework, yet is only a few years old. Here's why...

Ruby on Rails is a leading web development framework, yet is only a few years old. Here's why...

Statistics

Views

Total Views
4,920
Views on SlideShare
4,756
Embed Views
164

Actions

Likes
1
Downloads
42
Comments
0

5 Embeds 164

http://coderwall.com 130
http://www.slideshare.net 26
http://www.linkedin.com 6
http://localhost:3000 1
https://www.linkedin.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Why Use Rails by  Dr Nic Why Use Rails by Dr Nic Presentation Transcript

  • They Laughed When I Learned Ruby on Rails But When I Started to Build Web Applications... Dr Nic Williams
  • • 10 000 users • 3 months • Re-used their global authentication system
  • • 600 users of 1500 RailsConf attendees • First release in 5 days
  • Websites are just text
  • Google homepage <html> <head> <title>Google</title> </head> <body> <img src=quot;/intl/en_ALL/images/logo.gifquot;> <form action=quot;/searchquot; name=f> <input name=q title=quot;Google Searchquot;> <input name=btnG type=submit value=quot;Google Searchquot;> <input name=btnI type=submit value=quot;I'm Feeling Luckyquot;> </form> </body> </html>
  • Browsers don’t care what server you use
  • Browsers don’t care what operating system
  • Browsers don’t care what programming language
  • Browsers don’t care. They just want text
  • Pick what you like best
  • Real-world Developer problem
  • Developers are humans
  • Happy developers do more good things
  • Why Rails?
  • Convention over Configuration
  • class Book < ActiveRecord::Base validates_presence_of :title has_many :orders belongs_to :author, :class_name => quot;Userquot; end
  • class StoreController < ApplicationController def show @book = Book.find_by_permalink(params[:id]) end end http://mysite.com/store/drnic-book-on-rails
  • DRY Don’t Repeat Yourself
  • class Book < ActiveRecord::Base end Where are the attributes? Where is the configuration?
  • Change is instant
  • Use it, break it, fix it, trash it, change it
  • Why is Rails special?
  • Ruby (no more Java) Introspection Open classes Execute code in class definitions
  • #9 popular language http://www.tiobe.com/index.htm?tiobe_index
  • One language for everything ActiveRecord Controller HTML helpers Ajax
  • Open Source. • 2200 participants • commiters, patchers, commenters, +1ers http://dev.rubyonrails.org
  • app models Every controllers application views looks the config same db test vendor
  • Flexibility is overrated
  • Constraints are liberating
  • All this creates happiness, plus better applications
  • Downsides?
  • Bad architecture is still bad architecture Its just for websites Java is evolving Groovy and Grails, + Open sourced Java
  • Getting started • www.rubyonrails.org • www.peepcode.com - $9 videos • www.drnicacademy.com - Australian training