PMB9 wrote:You can only edit an resource if you are able to read the resource itself. If you can only read the "representation of a resource", you can't edit the resource.
Yes you can, anything at all that you GET, POST, or PUT over HTTP is a representation of the resource and not a resource itself.
When you GET a resource with a browser (you can also do web services with different formats) you get an HTML representation of the resource. When you POST, you post a <form> representation of a new resource which is then made into a new resource on the server (eg. a record in the database). When you PUT, same thing as POST, you send an updated representation of a resource to the server which then updates the resource itself. DELETE is the only HTTP method that doesn't really deal with a representation, but rather just tells the server which resource to destroy. That's just how REST works.
If the resource were a record in the database, the only way you could edit the resource directly would be to manually edit the database file, bypassing the database server. Because when you SELECT * FROM table WHERE id={id}, the database server responds with a result in the format of an array or other object, therefore technically a representation of the resource as well. If you want to get really technical and philosophical, the real resource is just an idea and is not tangible at all; the record in the database is a binary representation of the resource which is merely a thought; but not to complicate things to that degree a resource is generally defined as the record in the database, the original file on the server, etc.
So yes, you can edit a resource when all you have is a representation of it. Ruby on Rails and other RESTful frameworks emulate with with <form method="POST"><input type="hidden" name="_method" value="delete" />