Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <h1><strong>Some summaries</strong></h1> <p>There are several methods mentioned above that are good practices but I thought I might sum them up with short explanations. Below are some of the most popular libraries being used currently for http networking, asynchronous work / threading, and caching.</p> <h2><strong>My current project (just preferences)</strong></h2> <p>I personally am currently using <strong>Otto</strong>, <strong>Loaders</strong>, <strong>Volley</strong>, <strong>Ormlite</strong>, and a network stack based on <strong>Apache</strong> and <code>Service</code>s. I do hope to replace, the network stack at some point with either <strong>Volley</strong>, <strong>Retrofit</strong>, and maybe eventually <strong>Robospice</strong>.</p> <p>I <em>personally</em> very much like Otto and Volley</p> <hr> <h1><strong>RoboSpice (Modular)</strong></h1> <ul> <li><strong><a href="https://github.com/octo-online/robospice">https://github.com/octo-online/robospice</a></strong></li> <li><strong><a href="http://www.youtube.com/watch?v=ONaD1mB8r-A">http://www.youtube.com/watch?v=ONaD1mB8r-A</a></strong></li> <li>a plugin / modular approach to long-running tasks</li> <li>this is like the "swiss-army-knife" of libraries, but you need to know what each tool does.</li> <li>Handles REST calls</li> <li>persists data through orientation and other changes</li> <li>can handle disk and memory caching )</li> <li>works with various HTTP libraries and persistence libraries (Gson, Jackson, Spring, <a href="https://github.com/square/okhttp"><strong>OkHttp</strong></a>, and many of the below libraries)</li> <li>beta for <a href="http://ormlite.com/sqlite_java_android_orm.shtml"><strong>Ormlite</strong></a> support, I think</li> </ul> <h1><strong>Retrofit (REST)</strong></h1> <ul> <li><strong><a href="https://github.com/square/retrofit">https://github.com/square/retrofit</a></strong></li> <li>Annotation library to make REST very easy. Works with Robospice.</li> </ul> <h1><strong>Volley (Networking data &amp; Images)</strong></h1> <ul> <li><strong><a href="https://android.googlesource.com/platform/frameworks/volley">https://android.googlesource.com/platform/frameworks/volley</a></strong> </li> <li><strong><a href="https://developers.google.com/events/io/sessions/325304728">https://developers.google.com/events/io/sessions/325304728</a></strong></li> <li>This is the networking code that runs the Google Play Store</li> <li>Fast, reliable</li> <li>Handles most caching for you with some sensible defaults</li> <li>very easy to use</li> <li>built specifically for very fast image, json, etc loading</li> <li>Handles all threading for you.</li> </ul> <h1><strong>Picasso (images)</strong></h1> <ul> <li><strong><a href="https://github.com/square/picasso">https://github.com/square/picasso</a></strong> </li> <li>Http library for loading images</li> <li>fast</li> <li>very easy to use</li> </ul> <h1><strong>Loaders (Android)</strong></h1> <ul> <li>well supported</li> <li>persist through orientation change and save/load of fragment state</li> <li>can be difficult to get right</li> <li>no caching</li> </ul> <h1><strong>AsyncTask (Android)</strong></h1> <ul> <li>simple way for background work from the UI thread</li> <li>must be canceled and be careful about tasks that return after an activity or fragment is torn down.</li> </ul> <h1><strong>Otto (event bus)</strong></h1> <ul> <li><strong><a href="https://github.com/square/otto">https://github.com/square/otto</a></strong> </li> <li>Event bus that makes a-sync work between components and fragments easy</li> <li>Very powerful <code>@Produce</code> ability retains the last event and can produce it on demand for any new interested subscribers to the bus</li> </ul> <h1><strong>Headless Fragments (?)</strong></h1> <ul> <li>I personally have never seen this used other than Vogella's tutorials, so I'm not sure on this one.</li> </ul> <h1><strong>Service (Android)</strong></h1> <ul> <li>The old school way</li> <li>ultimate control, you must do everything yourself</li> <li>usually used with Appache or HURL client and </li> <li>pass Parcels around via Intents</li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload