As an example of what I am trying to ask, let's say that the user wants to delete an address from their account.
My workflow for my AJAX actions are basically:
- User clicks submit and the id of the stored address is sent to the controller
- The controller makes sure the user can perform the action (each user has different permissions)
- The controller makes sure that the id of the address given was attached to their account
- Any errors that were encounters are sent back and displayed to the user or the address was deleted and a success message is shown.
I am really having a hard time wrapping my head around what the proper MVC execution path for this would be. Can anybody help me out?