Working on a REST-based web application, and I need some ammo in dealing with my supervisors and contractors.
Is it better to:
Take in one large XML-based POST request, which contains 1st, 2nd and 3rd level elements, and build the associated child and grandchild objects in the parent controller,
Instead use a number of smaller XML-based POST requests targeted at the appropriate child resources?
In this example, we have Routes, Stops and Visitors.
Using Method 1, the POST request would be aimed at the Routes controller, and the routes controller would parse the XML and build the stops and the visitors records. Using Method 2, each prior node of the XML document would make up a separate request, so there would be POST request against the routes controller, then for each route a series of POST requests against the Stops controller, and finally for each stop, a series of POST requests against the visitors controller.
From a development standpoint, I'm inclined to go for Method 2, but I'm facing some resistance. Can anyone offer some decent arguments in support in favor of Method 2? Or, if I'm wrong and Method 1 is the way to go, offer decent arguments in favor of Method 1 so that I understand where I'm confused?