views:

18

answers:

1

I have various UIViewControllers that need data from web services. Is it best to create separate controller classes which the UIViewController's in turn call or keep the code inside the UIViewController?

The reason I ask is because with delegation you kind of have to leave some of the connection code in the calling class in this case the UIViewController.

A: 

I would create a new class which manages all interactions with your web services. This makes maintenance much more manageable and has better separation of responsibilities.

codelark
This could be 'the model' :)
willcodejavaforfood