What's the difference between create and new, edit and update?
Or, a link to a good explanation of the differrence. (I read David Goodlad's post without much clarity on these last oddball URLS.)
Thanks,
What's the difference between create and new, edit and update?
Or, a link to a good explanation of the differrence. (I read David Goodlad's post without much clarity on these last oddball URLS.)
Thanks,
new and edit are not core CRUD actions.
They don’t make changes to the resources, but are usually other ways of viewing the data presented by show (retrieved with GET). In most situations
GET /resources;new
and
GET /resources/1;edit
would return a form for people to edit and then POST to create or PUT to update.
James.
The difference as I understand it is that new and edit, are links to the resource, with a different point of view. That is,
I want to look at thing at URL, with a view to editing it.
Or, I want to add a new thing to the collection at URL.
New and edit then provide the input (HTML form) for entering the data required to perform the action on the resource identified by the URL.
The Create and update are then the actions that take the data, and actually do some CRUD with it.
I would be more than pleased to get some further clarity myself on this though, it’s pretty new and I’m only just starting to get my head around it.
Sorry I havn’t found anything that really spells it out yet that I can link to.
So... these urls display the forms and the forms post to the proper REST urls, create and update, repectively. Right?
Yes, so long as you set up the form actions correctly!
James.