I'm attempting to refactor some moderately complex existing .NET code to be usable in Silverlight. The core issue is that all Silverlight web services calls must be asynch, and the existing code was implemented in a fairly typical synchronous manner.
Existing call stack for a typical operation might be something like this:
Page -> GetPersonMethod -> PersonBusinessObject -> PersonDataObject -> CallWebservice -> (bubble response back up the stack)
My thought is to split all the methods into separate Request and Response methods and preserve the overall structure of the application.
The new call stack for the same operation would then be like this:
Page -> GetPersonRequest -> PersonBusinessRequest -> PersonDataRequest -> WebserviceRequest
Page <- GetPersonResponse <- PersonBusinessResponse <- PersonDataResponse <- WebserviceResponse
Core questions:
Is this a terrible idea, and should I really just rewrite it from the ground up with a more asynch perspective?
Assuming I take this approach how do I preserve the call stack for my nested responses?
TIA-
-Eric