"Java&android Open Source Library code Anatomy" のandroid-async-http (How to design an elegant Android network request framework that supports both synchronous and asynchronous requests) begins

Source: Internet
Author: User

in the article "java&android open Source Library code anatomy" のandroid-smart-image-view, we mention Android-async-http This open source Library, this article formally begins to detail this library's realization, simultaneously unifies the source code to discuss how to design an elegant Android network request frame. for some time, Android developers should be familiar with this library, because it's encapsulation of Apache's HttpClient API allows developers to make network requests and responses simple and elegant, while simultaneously supporting both synchronous and asynchronous requests. The Network request framework generally needs to have at least the following components: 1) Network request class, used to encapsulate the request Url,http protocol parameters and other information,3) network response class, for processing the error code returned by the server, and to parse the returned data content according to the data format; 3) The network requests the client class, provides the interface to the framework user, facilitates the user to initiate the network request, and handles the network response; 4) The above three steps depend on some of the tool classes. According to the above, we will introduce this open source library in four articles: 1) Network request asynchttprequest;2) network response responsehandlerinterface;3) Network request client synchttpclient and asynchttpclient;4) Others;

Java&android Open Source Library code anatomy のandroid-async-http (How to design an elegant Android network request framework that supports both synchronous and asynchronous requests) begins

Related Article

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.