Technology is not much, know some common, good enough. The following is the recently organized "Price/performance" of the relatively high Android open source framework, should be relatively practical.
1, Volley
Project Address Https://github.com/smanikandan14/Volley-demo
- Asynchronous download of JSON, image, etc.;
- Ordering of network requests (scheduling)
- Priority handling of network requests
- Cache
- Multi-level cancellation requests
- Interaction 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: http://loopj.com/android-async-http/
- Processing request results in an anonymous callback
- Making HTTP requests outside the UI thread
- File Breakpoint Upload
- Smart Retry
- Default gzip compression
- Support parsing into JSON format
- Cookies can be persisted to sharedpreferences
3. Afinal Frame
Project Address: https://github.com/yangfuhai/afinal
There are four main modules:
- Database module: An ORM framework in Android that uses a thread pool to manipulate SQLite.
- Note module: The IOC framework in Android, which is fully annotated to enable UI binding and event binding. No need for Findviewbyid and Setclicklistener.
- Network module: Encapsulates HTTP data requests through HttpClient, supports AJAX loading, supports downloading and uploading file functions.
- Picture Cache module: When loading bitmap through Finalbitmap,imageview, there is no need to take into account the phenomenon of image dislocation when the Oom and Android containers quickly slide during bitmap loading.
Finalbitmap can configure the number of thread preempted threads, cache size, cache path, load display animation, etc. Finalbitmap's memory management uses the LRU algorithm, Not using weak references (after Android2.3, 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 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:
Database module:
- The ORM framework in Android, a line of code can be used for the enhancement and deletion;
- 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.
Note module:
- The IOC framework in Android enables UI, resource and event bindings in a fully annotated manner;
- New event binding mode, the use of obfuscation tools can still work properly;
- Currently supports 20 commonly used event bindings, see View Common Event Listener class and package com.lidroid.xutils.view.annotation.event.
Network module:
- Support synchronous, asynchronous requests;
- 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.
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
The main modules are:
- MVC module: Implements the separation of views from the model.
- IOC module: The IOC module in Android, fully annotated to enable UI binding, reading of resources in Res, and initialization of objects.
- Database module: An ORM framework in Android that uses a thread pool to manipulate SQLite.
- HTTP Module: Encapsulates HTTP data requests via HttpClient and supports asynchronous and synchronous loading.
- Cache module: Through simple configuration and design can be very good cache, the cache can be arbitrarily configured
- 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.
- Configurator module: Can be easily implemented pairing configuration, the current configuration file can support preference, the properties of the configuration to access.
- Log Print module: Can be faster and easier to achieve log printing, support for the expansion of log printing, currently supports sdcard write local printing, and console printing
- Download module: Can be easily implemented multi-threaded download, background download, breakpoint continuation, download control, such as Start, pause, delete and so on.
- Network Status Detection module: When the network status changes, it is checked.
6, Loonandroid
Project Address: Https://github.com/gdpancheng/LoonAndroid
The main modules are:
- Auto-inject framework (only need to inherit app within frame)
- Picture loading frame (multi-cache, auto-recycle, maximum memory security)
- Network Request Module (inherits basically all of the HTTP requests now)
- Eventbus (integration of an open source framework)
- Validation Framework (Integrated open source framework)
- JSON parsing (supports parsing into collections or objects)
- Database (I don't know who wrote it and forgot it)
- Multi-threaded breakpoint Download (automatically determines if multi-threading is supported and determines if it is redirected)
- Automatic Update module
- A range of tool classes
One of the volley in 2013 has been studied, extensibility is very good, personal preferred style. Other such as Android-async-http, afinal is also quite good.
Introduction to six recommended Android open source frameworks