Aaron Blohowiak on 21 Mar 2007 20:05:16 -0000

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PhillyOnRails] April POR Meeting - Please RSVP

REST is simplistic
use REST when it is fitting
but there is no law

-Aaron Blohowiak

On Mar 21, 2007, at 3:23 PM, Trotter Cashion wrote:


Using REST does not require that all of your controllers are completely RESTful. Rather, it is a goal that you seek to achieve. It's perfectly fine to have some of your controllers using only CRUD, while others are only partially CRUDful or do not follow CRUD at all.

As for your admin question, that's one that I've struggled with in the past and do not have a really good answer to. One possibility is to use a different resource (controller) for admin editing, since you're really requesting a different conceptual entity. In one case, you want the user that the user sees, in the other case you want the user with admin attributes.

A good example of a working RESTful app is stikkit.com. Have a look at their API section and you'll see where they've really put REST to use.

- Trotter

On 3/21/07, Randy Schmidt <x@altorg.com> wrote:
(I know know if this made it on the list from my other email
address...sorry if it is a dup)

Sorry if this is a little off topic, but has anybody completed an app
using REST? I for the most part understand the restful architecture
and how it relates to resources, but I keep going back and forth about
the best way to architect the rest of an app that isn't CRUD such as
wrapping parts in an admin interface. I haven't seem much material
that doesn't do anything besides the obvious when it comes to CRUD and
resources. On the rails way, they mention one resource that is
associated with a model and one that is not. And in the peepcode
screencast, Geoffrey mentions using just another layout for an admin
interface but he didn't go into specifics about how it would work. It
seems kind of messy to me. I have also tried looking at Beast forum
(be careful typing that into google) to see how he architects things
but I don't think there really is an "admin interface".

One of the examples I think of is a user and an admin should be able
to edit the user's profile, but the admin should be able to edit more
than the user (for example to approve them). This would use the
edit/update methods for each case. Do I embed the permissions in both
actions and then embed logic in the view that shows more fields if
they are an admin? If done that way, it seems as though the
controllers are getting quite heavy. Is this really a push to not have
an admin interface at all and show edit links in more places if the
user is an admin? And admin may also want to view data associated with
the site in a different way than the regular users, where does that
fit in.

Are we "allowed" to use a hybrid architecture where we use REST for
all of the resources and then create controllers if need to view the
info differently?

I think it would be interesting to hear/see how someone has used REST
for a complete application since using it to manage a model seems to
be pretty simple and straight-forward.

I'm dying to get this worked out since it is almost painful working on
apps "the old way" after playing with a RESTful app.


On 3/21/07, Colin A. Bartlett <phillyonrails@colinabartlett.com> wrote:
> Eric Snyder Sent: Wednesday, March 21, 2007 2:21 PM
> > The Restful Rails screencast may be a good one for the meeting.
> Great idea. I've tried to wrap my head around REST and have been a little
> lost. I'm probably not the only one. (Or maybe I am.)
> The Ruby puzzlers are fun, too. But REST is more Rails-specific rather than
> Ruby in general.
> Either way, I'll be there.
> Colin
> _______________________________________________
> To unsubscribe or change your settings, visit:
> http://lists.phillyonrails.org/mailman/listinfo/talk

Randy Schmidt
To unsubscribe or change your settings, visit:

To unsubscribe or change your settings, visit:

To unsubscribe or change your settings, visit: