Advanced RESTful Rails

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

1. Ben Scofield

2. Constraints

2.1. Improves creativity

2.1.1. Poetry

2.1.2. Music

2.1.3. Rails

2.1.3.1. dir structure

2.1.3.2. resource generator

2.1.3.3. REST

3. Point of REST => producticity increase

4. How do I handle?

4.1. Difficult (even for the pros)

5. What is REST?

5.1. not a philosophy

5.2. Roy Fielding

5.2.1. Resources

5.2.2. Addresability

5.2.3. Representations

5.2.4. Stateless (REST in Rails)

6. why care?

6.1. consistency

6.2. interoperability

6.3. maintainability

7. How do we do it?

7.1. Domain -> Modeled

7.1.1. 1. Identify resources

7.1.2. 2. Select methods to expose

7.1.2.1. Respect the middle man

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

8. Examples

8.1. Simple

8.1.1. tutorials

8.2. Advanced

8.2.1. Homepage

8.2.1.1. resource:homepage

8.2.1.2. depends on the content

8.2.1.2.1. resources :ads

8.2.1.2.2. resource :dashboard

8.2.2. Preview

8.2.2.1. Untitled

8.2.2.2. resources :post resource :preview

8.2.3. Search

8.2.3.1. map.resources :posts and use the index

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

8.2.4. Wizards

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

8.2.5. Collections

8.2.6. Web services

9. Problems in Rails

9.1. Accesibility

9.2. Hand-written routes

9.3. default routing is devil