Create your own awesome maps

Even on the go

with our free apps for iPhone, iPad and Android

Get Started

Already have an account?
Log In

Advanced RESTful Rails by Mind Map: Advanced RESTful Rails
0.0 stars - 0 reviews range from 0 to 5

Advanced RESTful Rails

Ben Scofield

Constraints

Improves creativity

Poetry

Music

Rails, dir structure, resource generator, REST

Point of REST => producticity increase

How do I handle?

Difficult (even for the pros)

What is REST?

not a philosophy

Roy Fielding

Resources

Addresability

Representations

Stateless (REST in Rails)

why care?

consistency

interoperability

maintainability

How do we do it?

Domain -> Modeled

1. Identify resources

2. Select methods to expose, Respect the middle man, join models! memberships, friendships, etc...

Examples

Simple

tutorials

Advanced

Homepage, resource:homepage, depends on the content, resources :ads, resource :dashboard

Preview, Untitled, resources :post resource :preview

Search, map.resources :posts and use the index, resource :search (for several controllers) (he uses a Searcher model in the controller)

Wizards, galleries/new restaurants/:id/photos/create restaurants/:id/photos/edit resources :galleries resources :restaurants, :has_many => [:photos] with_options :controller => 'options' do p.update_restaurant p.edit_restaurant

Collections

Web services

Problems in Rails

Accesibility

Hand-written routes

default routing is devil