Advanced RESTful Rails

Get Started. It's Free
or sign up with your email address
Advanced RESTful Rails by Mind Map: Advanced RESTful Rails

1. Problems in Rails

1.1. Accesibility

1.2. Hand-written routes

1.3. default routing is devil

2. Ben Scofield

3. Constraints

3.1. Improves creativity

3.1.1. Poetry

3.1.2. Music

3.1.3. Rails

3.1.3.1. dir structure

3.1.3.2. resource generator

3.1.3.3. REST

4. Point of REST => producticity increase

5. How do I handle?

5.1. Difficult (even for the pros)

6. What is REST?

6.1. not a philosophy

6.2. Roy Fielding

6.2.1. Resources

6.2.2. Addresability

6.2.3. Representations

6.2.4. Stateless (REST in Rails)

7. why care?

7.1. consistency

7.2. interoperability

7.3. maintainability

8. How do we do it?

8.1. Domain -> Modeled

8.1.1. 1. Identify resources

8.1.2. 2. Select methods to expose

8.1.2.1. Respect the middle man

8.1.2.1.1. join models! memberships, friendships, etc...

9. Examples

9.1. Simple

9.1.1. tutorials

9.2. Advanced

9.2.1. Homepage

9.2.1.1. resource:homepage

9.2.1.2. depends on the content

9.2.1.2.1. resources :ads

9.2.1.2.2. resource :dashboard

9.2.2. Preview

9.2.2.1. Untitled

9.2.2.2. resources :post resource :preview

9.2.3. Search

9.2.3.1. map.resources :posts and use the index

9.2.3.2. resource :search (for several controllers) (he uses a Searcher model in the controller)

9.2.4. Wizards

9.2.4.1. 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

9.2.5. Collections

9.2.6. Web services