Collect some frames from the Internet, write programs lazy These frameworks are very useful, must be written down, in order to write less code later, with others good framework 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 functionality 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 in, only 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 conversion
- Improved asynctask & intentservice with Exceptions & result reporting support.: Synchronous Asynchronous request
- L Ogger that figures out tag itself & logs any object.: Log
- restclient for GETting, putting, POSTing, DELETing & Inputstream-getting, also speaks JSON.: Simple RESTful client
- Imagefetcher to asynchronously attach images to imageviews, with caching, Cross-fade & Transformation Suppor T.: Picture Loading and caching
- Numerous Utils .: 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.+ ':
Don't say it, Android's own 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 shown, but in the following retrofit this tool called 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 things do 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 bull compile ' com.squareup.picasso:picasso:2.3.2 '
Dependency Injection: Simply to help us unify the new object, see my blog post 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 a few annotation tools the same way, details see my blog 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, details see my blog compile ' com.jakewharton:butterknife:5.0.0 '
This tool seems to be based on httpclient, but I do not use this now, I am completely using 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 also a very popular view) compile ' com.actionbarsherlock:viewpagerindicator:[ Email protected] '
Pusher: Notification framework, not yet started with compile ' com.github.kevinsawicki:android-pusher:0.6 '
A toolset, like the most frequent toaster.showlong|showshort I'm using now, is actually Android's own toast class package 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, 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 via annotations) compile ' com.squareup.retrofit:retrofit:1.6.1 '
This is a simple picture slider that supports the caption text below the image compile ' com.daimajia.slider:library:[email protected] '
Waterfall flow, with this but 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 component is round, oval, border, etc., very flexible compile ' com.makeramen:roundedimageview:1.3.0 '
Drop-down refresh pull-up component, very famous, support many components (such as Listview,webview,viewpager, etc.) Compile ' com.mcxiaoke.pulltorefresh:library:2.5.3 '
, you can use the property animation on a system prior to 3.0, is a backward compatible 3.0 of the new animated features of the package compile ' com.nineoldandroids:library:2.4.0 '
This is a tool to do field validation: For example, you can use annotations on a textview, the text that constrains this textview must 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.