A list of open source frameworks for the first time you use an Android project

Source: Internet
Author: User

Since there was no Android development experience, although Java is familiar with, but to the Android or some do not adapt, after all, is another set, thinking that Android should also have a lot of frameworks can help me do a lot of things, so back and forth tried a few, and ultimately not ideal. For example, the first thing I used was

Thinkandroid

Thinkandroid (a thinkandroid tutorial address: http://my.oschina.net/u/1046077/blog/127603) Although there are many features used, such as under, very complete, And the following features are needed to do an Android project

    • MVC module

    • How to use the IOC module:

    • Database module

    • How to use the HTTP module:

    • Asynchronous Get method

    • Synchronous Get method

    • To download files using http:

    • Caching Module methods

    • How to use the Print module

    • Downloader module

    • Download background Run

    • Configurator module:

    • Network Status Detection module:

But later found that the framework for a long time did not maintain, and secondly, because it is a more troublesome project, so a sure to modify a lot, the framework is not convenient to change, at that time the framework of the source have looked over, tossing the nearly half a month, or decided to give up (not he does not use, just not flexible, For example you want to use this framework, your application,activity must inherit this framework, do not inherit can not use the framework, because now Android a lot of new activity, then you have to think of his taactivity change is also very troublesome).

Later found a more powerful integration framework (this means that the function of the synthesis, similar to the first), called

Droidparts

(Official website: http://droidparts.org)

The

function is also very powerful, basically covers the above features, and the framework is relatively flexible, the author also named their activity activity, and the added code is very small, so if you want to integrate a special activity come in, It only takes one or two lines of code to change. His function is as follows:

    • DI  -Injection of views, fragments, Services, anything.: Dependency Injection
    • orm  -Efficient persistence utilizing Cursors & fluent Api.:orm Object Relational model is to convert SQLite to object-oriented, like Hibernate
    • Eventbus  for subscribing to and posting Events.:eventbus
    • simple  JSON   (DE) Serialization capable of handling nested Objects.:json convert
    • improved  asynctask  &  intentservice  with Exceptions & Result reporting support.: Synchronous asynchronous request
    • L ogger that Figures out tags itself & logs any object: Log
    • restclient  for GETting, putting, POSTing, deletin G & Inputstream-getting, also speaks JSON.: Simple restful client
    • imagefetcher  to asynchronously Attach images to imageviews, with caching, Cross-fade & transformation support.: Picture loading and caching
    • numerous  U TILs .: Other tools (such as some new components)

This is very good for me, the framework is very flexible, but also easy to customize, do the general simple project should have no problem, I also so the Generals net document completely translated a series in the blog, this framework I have used for more than half a month time, why later gave up! The reason is that all of his functions are basically their own implementation, so, led to a problem is not strong customization, the overall function is strong, but each small function is relatively weak, so I gave up.

Later on GitHub looking for Ah, and found a framework (in fact, is not a framework, it should be a demo project), the name is Android Bootstrap, but here to plug a little is, there is another Android Bootstrap, And the bootstrap in the web is a bit of a correspondence, the Android Bootstrap is an Android component style collection (there are some text icons), this I used in the use of droidparts also inherited the tool, and later gave up (no use, Because the art has already put the interface design, I want this to be useless), back to the point of our protagonist.

Android Bootstrap

Official website: http://www.androidbootstrap.com/

GitHub Address: Https://github.com/AndroidBootstrap/android-bootstrap

Android Bootstrap is a demo project that integrates the tools that are commonly used in Android development (these open source tools basically cover all the features of the two aggregate frameworks we mentioned above), and then do a few initial features (such as Android account Management), Basically the open source tools are integrated into the use, so we can take this project as a prototype of our project to develop. Now my program has been doing a long time, a person does a bit slow, but also gradually entered the state, and later I integrated a number of open source tools to achieve different functions, overall, choose this project program to develop my app is right. Now you can make a list of all the open source tools I've used in my project to give you a reference (many of the tools I've chosen are carefully selected, except for the initial few basic reservations):

This is not to say, Android's own

Compile ' com.android.support:support-v4:19.+ ':

You don't have to say that, Android.
Compile ' com.android.support:appcompat-v7:19.+ '

This tool should know that the JSON toolkit developed by Google, because we are using JSON to transmit data, so we often have to convert between the object and the JSON string, the tool is not displayed, but in the following retrofit this tool called the
Compile ' com.google.code.gson:gson:2.2.4 '

This tool is to do picture loading, we know that the image of our app is definitely implemented first display placeholder, and then asynchronously loaded, the middle involved (asynchronous loading, memory, hard disk cache, etc.) a lot of things, this tool through a simple API (a chain of API style, I like it) to achieve, In the middle of the matter does not need us to worry about, but heard that another image caching tool, more powerful than this function, what to forget, but this tool absolute cow
Compile ' com.squareup.picasso:picasso:2.3.2 '

Dependency Injection: Simply to help us unify the new object, see my blog for details.
Compile ' com.squareup.dagger:dagger:1.2.1 '

Dagger compiler tool, because dagger will use a lot of annotations, this tool is that our annotations are not processed by reflection, but directly generated code, fast, and the following several annotation tools the same way, see my blog details
Compile ' com.squareup.dagger:dagger-compiler:1.2.1 '

View injection: We often findbyid, setonclicklistener these methods, very cumbersome, and look at the code is messy, this tool is to use annotations to instantiate your view, of course, there are other features, see my blog details
Compile ' com.jakewharton:butterknife:5.0.0 '

This tool seems to be based on httpclient, but I'm not using this now, I'm completely used retrofit
Compile ' com.github.kevinsawicki:http-request:3.0 '

This tool is also known as an open source tool for Viewpager indicators (Viewpager is now a very popular view)
Compile ' com.actionbarsherlock:viewpagerindicator:[email protected] '

Pusher: Notification framework, not yet started
Compile ' com.github.kevinsawicki:android-pusher:0.6 '

A toolset, like the most frequent toaster.showlong|showshort I'm using now, is actually the package of my own toast class.
Compile ' com.github.kevinsawicki:wishlist:0.9 '

Eventbus: is used to decouple the various classes, such as my fragment and activity interaction, the usual is to define an interface and then passed in the operation, with this directly post, very convenient, of course, his function is very powerful, You can refer to my blog (preferably the official English document, my post is a simple translation)
Compile ' com.squareup:otto:1.3.4 '

RESTful is now a more popular web design style bar, I actually also like this style, this tool absolutely handsome explode, write a request only to write interface, implementation is by the tool to help you take care of, in fact, we send the request does not need to write logic code (only need to send URL, parameters, headers, etc., which can be set by annotations)
Compile ' com.squareup.retrofit:retrofit:1.6.1 '

This is a simple picture slider that supports the caption text below the picture
Compile ' com.daimajia.slider:library:[email protected] '

Waterfall flow, with this but it cost me a lot of kung fu, because he does not support pull home in more, I in his and Pulltorefresh integration but spent a lot of time (two days)
Compile ' com.etsy.android.grid:library:1.0.5 '

Rounded graphics tool, can be understood as a view, this view can set your components are round, oval, border, etc., very flexible
Compile ' com.makeramen:roundedimageview:1.3.0 '

Drop-down refresh pull-up component, very well-known, support a lot of components (such as Listview,webview,viewpager, etc.)
Compile ' com.mcxiaoke.pulltorefresh:library:2.5.3 '

, you can use property animations on systems older than 3.0, which is a package that is backwards compatible with the new animation features of 3.0
Compile ' com.nineoldandroids:library:2.4.0 '

This is a tool to do field validation: For example, you can use annotations on a textview, and constrain the TextView text to be a mailbox format
Compile (' eu.inmite.android.lib:android-validation-komensky:0.9.2 ') {

Exclude module: ' Support-v4 '
}

Of course, there are some necessary tools I have not listed, the most obvious such as ORM (because it is not used yet), logs, etc.

See no, this is not covered by the previous mentioned two in the framework of almost all of the tools, with so many tools although the cost of learning to improve some, but each small function is very powerful, so, or this strategy is more reliable! We feel that with more than 10 open source tools will take a lot of time, in fact, each tool has demo and sample, tutorials, and most of these tools are not like many Java toolkit so many features, so his API is very simple, learning is actually pretty fast!

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.