Introduction to 6 recommended Android Open source frameworks

Source: Internet
Author: User

Although we do not necessarily use the framework when doing the app, but some good framework of the idea is very valuable to learn

1, Volley

Project Address Https://github.com/smanikandan14/Volley-demo
(1) Asynchronous download of JSON, image, etc.;
(2) Ordering of network requests (scheduling)
(3) Priority processing of network requests
(4) Cache
(5) Multi-level cancellation request
(6) Linkage with activity and life cycle (simultaneous cancellation of all network requests at end of activity)

2, Android-async-http

Project Address: Https://github.com/loopj/android-async-http
Document Description: http://loopj.com/android-async-http/
(1) Processing request results in an anonymous callback
(2) Making HTTP requests outside the UI thread
(3) File breakpoint upload
(4) Smart retry
(5) Default gzip compression
(6) Support parsing into JSON format
(7) Cookies can be persisted to sharedpreferences

3, afinal framework

Project address: Https://github.com/yangfuhai/afinal
There are four main modules:
  (1) Database module: An ORM framework in Android that uses a thread pool to manipulate SQLite.
  (2) Annotation module: An IOC framework in Android that allows UI binding and event binding in a fully annotated manner. No need for Findviewbyid and Setclicklistener.
  (3) Network module: encapsulates HTTP data requests via HttpClient, supports Ajax loading, and supports downloading and uploading of file functions.
  (4) Picture cache module: When loading bitmap through Finalbitmap,imageview, there is no need to consider the phenomenon of image dislocation when the Oom and Android containers quickly slide during the bitmap loading process.
             Finalbitmap can configure the number of thread preempted threads, cache size, cache path, Loads display animations, and so on. Finalbitmap memory management uses the LRU algorithm,
             Do not use weak references (android2.3 after Google has not recommended the use of weak references, android2.3 after the forced recovery of soft and weak references, details of the official Android document),
              better management of bitmap memory. Finalbitmap can customize the downloader to extend other protocols to display network pictures, such as FTP. You can also customize the bitmap display,
             Play animations when ImageView display pictures (the default is the gradient animation display).

4. Xutils Frame

Project Address: Https://github.com/wyouflf/xUtils
There are four main modules:
(1) Database module: The ORM Framework in Android, a line of code can be used to increase the deletion of the search;
Support transactions, closed by default;
Annotations can be used to customize table names, column names, foreign keys, uniqueness constraints, NOT NULL constraints, check constraints, etc. (Please note the table and column names when confusion is required);
Support for binding foreign keys, saving entities when the foreign key associated entities are automatically saved or updated;
Automatic loading of foreign key associated entities, support delay loading;
Support chain expression query, more intuitive query semantics, refer to the following introduction or sample examples.
(2) Note module: The IOC framework in Android, full annotation can be UI, resource and event binding;
New event binding mode, the use of obfuscation tools can still work properly;
Currently supports 20 commonly used event bindings, see Viewcommoneventlistener Class and package com.lidroid.xutils.view.annotation.event.
(3) Network module: Support synchronous, asynchronous way of request;
Support large file upload, upload large files will not oom;
Support Get,post,put,move,copy,delete,head,options,trace,connect request;
Download support 301/302 Redirect, support setting whether to rename downloaded files according to Content-disposition;
A request to return text content (by default, only get requests enabled) supports caching, setting the default expiration time and the expiration time for the current request.
(4) Picture cache module: When loading the bitmap, there is no need to consider the phenomenon of the image dislocation when the Oom and the Android container move quickly during the bitmap loading process.
Support to load network pictures and local images;
The memory management uses the LRU algorithm, better manages the bitmap memory;
Configurable line preempted thread count, cache size, cache path, load display animation, etc...

5, thinkandroid

Project address: Https://github.com/white-cat/ThinkAndroid
There are the following modules:
  (1)   MVC module: Implementing the separation of views from the model.
  (2)   IOC module: The IOC module in Android, which is fully annotated to allow UI binding, reading of resources in Res, and initialization of objects.  
  (3)   Database module: An ORM framework in Android that uses a thread pool to manipulate SQLite.   
  (4)   HTTP Module: Encapsulates HTTP data requests via HttpClient and supports asynchronous and synchronous loading.
  (5)   Cache module: With simple configuration and design can be well implemented cache, the cache can be configured arbitrarily
  (6)   Picture Cache module: ImageView loading pictures without taking into account the image during the loading process of oom and the Android container rapid sliding when the picture dislocation phenomenon.
  (7)   Configurator module: an easy to implement pairing configuration, the current configuration file can support the preference, the properties of the configuration to access.
  (8)   Log printing module: Can be quickly and easily to achieve log printing, support for the expansion of log printing, currently supports writing to SDcard local printing, as well as console printing
  (9)   Downloader module: Can be a simple implementation of multi-threaded download, background download, breakpoint continuation, download control, such as Start, pause, delete and so on.
  (10) Network Status Detection module: Check the network status when it is changed

6, Loonandroid

Project Address: Https://github.com/gdpancheng/LoonAndroid
The main modules are:
(1) Auto-inject frame (only need to inherit the application within the frame)
(2) Picture loading frame (multi-cache, automatic recovery, maximum memory security)
(3) Network request module (inherits basically all HTTP requests now)
(4) Eventbus (integration of an open source framework)
(5) Validation Framework (integrated open source framework)
(6) JSON parsing (supports parsing into collections or objects)
(7) database (I don't know who wrote it and forgot it)
(8) Multi-threaded breakpoint Download (automatically determine whether to support multi-threading, to determine whether it is redirected)
(9) Automatic Update module
(10) A series of tool classes

One of the volley, 13 has been studied, extensibility is very good, personal more like the style. Other such as Android-async-http, afinal is also quite good.

From: http://www.jb51.net/article/51052.htm

Introduction to 6 recommended Android Open source frameworks

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.