On the understanding of discrete and intensive API calls in Network layer

Source: Internet
Author: User

Intensive type:

An intensive API call is actually a call to just one class for all APIs, and then this class receives the API name, API parameters, and callback landing points (which can be target-action, or blocks, or delegate, for various modes of landing) as parameters. Then execute a method like Startrequest, which will take off according to these parameters to invoke the API, and then obtain the API data and then according to the designated landing point to land. The example is that every time a network request in Afnetworking is invoked by using Afhttpsessionmanager as the Singleton class to invoke the corresponding API. Discrete: Discrete API calls are like this, an API corresponds to a apimanager, then this apimanager only need to provide parameters to take off, the API name, the landing method has been integrated into the Apimanager.
It can be understood that there is a base class Baseapimanager, and then the subclass of the base class for the corresponding network request, the use of the network request data where the sub-class is held.
From
Http://casatwy.com/iosying-yong-jia-gou-tan-wang-luo-ceng-she-ji-fang-an.html

On the understanding of discrete and intensive API calls in Network layer

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.