37
Ruby on Rails Origin Drive Destination

Ruby on Rails - zenspider.com · So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Ruby on Rails - zenspider.com · So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works

Ruby on RailsOriginDrive

Destination

Page 2: Ruby on Rails - zenspider.com · So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works

RailsJust enough stuff to make the creation of

database-backed web applications tolerable

Page 3: Ruby on Rails - zenspider.com · So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works

RailsJust enough stuff to make the creation of

database-backed web applications tolerable

Page 4: Ruby on Rails - zenspider.com · So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works

The Rails MVCActive Record: Persistance framework

Action View: ERb-based template system

Action Controller: Control-flow framework(Action Mailer)

Page 5: Ruby on Rails - zenspider.com · So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works

Apachemod_rewrite

1) RequestBrowser

/dispatcher.rb?controller=blog&action=display&id=5

Dispatcher

2) Forwards

1. Configure framework2. Wrap CGI in request

Action Controller

3) Creates

ActiveRecord

4) CRUDsActionView

5a) Renders

5b) Redirects

6) Displays

/blog/display/5

Page 6: Ruby on Rails - zenspider.com · So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works

Quick background

Page 7: Ruby on Rails - zenspider.com · So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works

Competing forcesPHP for its immediacy

Java for its ivory towers

Page 8: Ruby on Rails - zenspider.com · So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works

Opportunity of inexperienceThe LaTeX syndrome

Page 9: Ruby on Rails - zenspider.com · So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works

Idealism on a budget

Page 10: Ruby on Rails - zenspider.com · So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works

Make the masses realize Ruby

Page 11: Ruby on Rails - zenspider.com · So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works

The DJAn artist of compositions

Page 12: Ruby on Rails - zenspider.com · So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works

Pursue discount innovationsYou can’t be clever about all things all the time

Familiarity is not a bad word

Page 13: Ruby on Rails - zenspider.com · So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works

Mantras

Page 14: Ruby on Rails - zenspider.com · So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works

Less SoftwareSay no by default

Extract the essence of a good idea

Page 15: Ruby on Rails - zenspider.com · So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works

Frameworks are retrospectivesThey are not to be built but extracted

Page 16: Ruby on Rails - zenspider.com · So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works

Convention over configurationAdhere to Yesterday’s Weather

But humor newcomers with the (appearance of) choice

Page 17: Ruby on Rails - zenspider.com · So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works

database.ymlproduction: adapter: mysql database: rails_production host: localhost username: root password: secret

test: adapter: mysql database: rails_test host: localhost username: root password: secret

Page 18: Ruby on Rails - zenspider.com · So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works

It’s not just about the software

Page 19: Ruby on Rails - zenspider.com · So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works

Passion is infectiousThe baseline of excitement

A comedy is funnier when other people laugh too

Page 20: Ruby on Rails - zenspider.com · So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works

So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works just like the video. Holy wow.

Brian McCallister

Page 21: Ruby on Rails - zenspider.com · So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works

Be compassionateEmbrace all disciples regardless of origin

Answer questions with options

Be there, stick around, share some laughs

Page 22: Ruby on Rails - zenspider.com · So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works

Proud pieces

Page 23: Ruby on Rails - zenspider.com · So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works

A shed to hang your toolsRecommended directory structure

Preconfigured logging

Stubs (and lots of ‘em)

Page 24: Ruby on Rails - zenspider.com · So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works

One word template layoutsInspired by Tiles / SiteMesh

5% implementation for 80% gain

Page 25: Ruby on Rails - zenspider.com · So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works

EnvironmentsInteractive chats with the domain model

All the facilities available

Page 26: Ruby on Rails - zenspider.com · So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works

Features almost here

Page 27: Ruby on Rails - zenspider.com · So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works

class ApplicationMailer < ActionMailer def self.deliver_rejections(advertisement, reason, sent_on = Time.now) deliver_rejection_for_advertiser(advertisement, reason, sent_on) deliver_rejection_for_publisher(advertisement, reason, sent_on) end

def rejection_for_advertiser(advertisement, reason, sent_on = Time.now) @recipients = advertisement.advertiser.email_address @subject = “Your ad was not approved to run on #{advertisement.site.name}” @from = advertisement.site.publisher.email_address @sent_on = sent_on @body = { “advertisement” => advertisement, “reason” => reason } end

def rejection_for_publisher(advertisement, reason, sent_on = Time.now) @recipients = advertisement.site.publisher.email_address @subject = “You’ve REJECTED an ad on #{advertisement.site.name}” @from = SYSTEM_EMAIL_ADDRESS @sent_on = sent_on @body = { “advertisement” => advertisement, “reason” => reason } endend

Action Mailer

Page 28: Ruby on Rails - zenspider.com · So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works

Going OO on associationsproject.find_in_milestones => project.milestones.find

post.build_to_comments => post.comments.build

By Florian Weber

Page 29: Ruby on Rails - zenspider.com · So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works

ERb template caching~100% performance increase

Using a (oh, the horror!) global hash

By Andreas Schwartz

Page 30: Ruby on Rails - zenspider.com · So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works

Rails 1.0++

Page 31: Ruby on Rails - zenspider.com · So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works

Before the end of 2004Active Record is close...

Action Pack is getting it...

Rail Ties is still some of..

Action Mailer is just getting started...

Page 32: Ruby on Rails - zenspider.com · So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works

Visual IdentityWorking with Jon Hicks

Page 33: Ruby on Rails - zenspider.com · So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works

The complete explanationVideos, videos, videos

Real world applications

The Book

Page 34: Ruby on Rails - zenspider.com · So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works

Variety in packagingCherryPy style one-filers

A mine of GEMs

Natives

Page 35: Ruby on Rails - zenspider.com · So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works

More evangelizing“I'm planning to demo rails to Amazon next week”

Dave Thomas

Page 36: Ruby on Rails - zenspider.com · So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works

Questions?

Page 37: Ruby on Rails - zenspider.com · So, umh, Ruby on Rails is awesome. Wow. Really wow. Even if you have no interest in using it, watch the ten minute intro video. Wow. It really works

BTW, anyone want a copy of this?