Robert Walker wrote: [...] > Trying not to fall into the trap that resources and models are > one-to-one. Resources are independent of any back-end storage model.
That's true, but for the typical simple Rails app, they map pretty closely. [...] > I'm not exactly sure how having the action in the URL is any more > friendly to SEO. More friendly than what? The OP didn't mention an alternative, and neither did you. > I'm not SEO expert, but if that's the case it sounds > like it's SEO that's broken. That's not how the traditional "static" web > is designed. The traditional "static" Web isn't designed for applications at all! The rise of Web applications has fostered a lot of clever abuse of HTTP and URL syntax. REST HTTP is a particularly clever and well-thought-out example of such abuse. > > Uniform Resource Identifiers are all about about getting, posting, > putting or deleting things. The "action" is not part of the URI. The > action is dependent on the HTTP verb (GET, POST, PUT or DELETE) used in > the request and is independent of the URI. True in the REST sense of "action". Not true in the Rails sense of "action". Personally, I see nothing wrong in having /object/change_color right alongside /object/create, /object/show, and all the REST. :) > > The RESTful approach to dynamic web applications intends to bring this > concept back. It's unfortunate that web browsers don't fully support > this concept, but Rails does an adequate job remedying their > shortcomings. Yes -- if you keep in mind that not everything can be expressed by a "standard" REST URL. > > What you need to keep in mind is that resources aren't controllers and > they certainly aren't models. Yes there will likely be controllers and > models supporting your resources, but they aren't the same thing. No, but the OP probably doesn't need to worry about that right away. For learning purposes, a resource can be thought of as a model object for simplicity's sake. > > Check out these links for a lot more reliable explanation than I could > ever provide myself: > http://dablog.rubypal.com/2008/3/23/splitting-hairs-over-resource > http://dablog.rubypal.com/2008/4/24/splitting-hairs-over-resource-part-2 I'll have to look at those. I am, however, not convinced that such abstruse theoretical discussion will be much help to the OP, who seems to be just trying to use RESTful design patterns in a simple app. Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---