开发者

Web service controller design issue

I have various UIViewControllers that need data from we开发者_Python百科b 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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜