An Introduction to Ruby on Rails

Kevin Lawver

This is a presentation. If you'd like to view all the slides like a normal web page, you can.

Ruby on Rails? What's That?

Ruby on Rails' Strengths

Weaknesses

When (and not) to Use Rails

Some Companies Running Rails

The Ruby in Rails

Demo Time!

Creating a Rails App

Creating a Model

Playing With Your Model

The Faster Way to Create

entry = Entry.create(
	:title => "My Second Blog Entry",
	:body => "Wow, that's pretty awesome!"
)

Let's Make It Look Like Something!

Looking Good!

Not Interesting Enough? Let's Add Comments!

Associations

Let's Test It Out!

Let's Display Them

Database Versioning!

Back to views

That's it!

Things I've Learned

The Scale Myth

...languages don't scale, architectures do

Scale is Inside

Unbounded Associations

Model Methods

def limited_comments(count=10,offset=0)
	self.comments.find(
		:all,
		:limit => count,
		:offset => offset
	)
end

Let's Try It!

Ch-ch-changes

def show
	@entry = Entry.find(params['id'])
	@page_title = @entry.title
	offset = params[:offset] || 0
	@comments = @entry.limited_comments(10,offset)
end

Changing the Show

Cache It!

Be Careful Who You Trust

Be Flexible

Keep 'em Separated

Speed Makes Up For Everything

An 'Incredible' Quote

In my experience, the thing that has the most significant impact on a movie's budget __ but never shows up in a budget __ is morale. If you have low morale, for every $1 you spend, you get about 25 cents of value. If you have high morale, for every $1 you spend, you get about $3 of value. Companies should pay much more attention to morale.

Brad Bird

The Future

Recommended Reading

AOL's Rails Apps

Questions?