[轉(zhuǎn)]Android2017最新面試題(3-5年經(jīng)驗(yàn)個(gè)人面試經(jīng)歷)

http://blog.csdn.net/huangqili1314/article/details/72792682

20141123154112649.png

主流第三方框架總結(jié)(結(jié)合2017年Android百大框架排行榜,按個(gè)人認(rèn)識(shí)排序):
參考來源:http://www.cnblogs.com/jincheng-yangchaofan/articles/7018780.html

1. Retrofit

一句話介紹:Retrofit是一款類型安全的網(wǎng)絡(luò)框架,基于HTTP協(xié)議,服務(wù)于Android和java語言

上榜理由:Retrofit以21.8k的stars量雄踞github中android子標(biāo)題榜首,第一當(dāng)之無愧。

官網(wǎng)地址 http://square.github.io/retrofit/

https://github.com/square/retrofit

作者:square團(tuán)隊(duì)

使用:

compile 'com.squareup.retrofit2:retrofit:2.3.0'

2.okhttp

一句話介紹:okhttp是一款基于HTTP和HTTP2.0協(xié)議的網(wǎng)絡(luò)框架,服務(wù)于java和android客戶端

上榜理由,okhttp以20.4k的stars量雄踞github中android子標(biāo)題第二名。大型公司比如淘寶也封裝的是okhttp。Retrofit2.0開始內(nèi)置okhttp框架,Retrofit專注封裝接口完成業(yè)務(wù)需求,okhttp專注網(wǎng)絡(luò)請(qǐng)求的安全高效,筆者將兩者區(qū)分開,是想讓后來學(xué)習(xí)者知道,這是兩套框架,學(xué)習(xí)框架原理時(shí)可以分開學(xué)習(xí),以免理解混亂。

官網(wǎng)地址 http://square.github.io/okhttp/

github https://github.com/square/okhttp

作者:square團(tuán)隊(duì)

使用:

compile 'com.squareup.okhttp3:okhttp:3.8.0'

3.Butter Knife

一句話介紹:Butter Knife所提供了一種能力——使用注解生成模板代碼,將view與方法和參數(shù)綁定。

上榜理由:github上16.5K個(gè)star,配合Androidstudio提供的Butter Knife插件,幫助開發(fā)者省卻了頻繁findviewbyid的煩惱,最新的Butter Knife還提供了onclick綁定以及字符串的初始化,初學(xué)者可以查閱Butter Knife以及Butter Knife插件進(jìn)一步學(xué)習(xí)!

官網(wǎng)地址:http://jakewharton.github.io/butterknife/

github:https://github.com/JakeWharton/butterknife

作者:JakeWharton ,也是square團(tuán)隊(duì)成員之一

使用:

dependencies {
  compile 'com.jakewharton:butterknife:8.6.0'
  annotationProcessor 'com.jakewharton:butterknife-compiler:8.6.0'
}

5. glide

一句話介紹:glide是一款專注于提供流暢劃動(dòng)能力的“圖片加載和緩存框架”

上榜理由:15.9k個(gè)star,圖片加載類框架排名第一的框架,google 在2014開發(fā)者大會(huì)上演示的camera app就是基于gilde框架開發(fā)的

github https://github.com/bumptech/glide

作者 Bump Technologies團(tuán)隊(duì)

使用:

repositories {
  mavenCentral()
}

dependencies {
    compile 'com.github.bumptech.glide:glide:3.8.0'
    compile 'com.android.support:support-v4:19.1.0'
}

8.EventBus

一句話介紹:EventBus是一款本地組件間通信框架

上榜理由:組件間通信框架star量第一:14.8k,在大型項(xiàng)目的Activities,fragments,Threads,Services都可以看到它的使用場(chǎng)景,盡管EventBus在向未創(chuàng)建的組件傳遞事件時(shí)有些局限,僅適合在“活著的”組件間傳遞消息,但仍不妨礙它活躍在各個(gè)大型項(xiàng)目各個(gè)場(chǎng)景里。

官網(wǎng)地址 http://greenrobot.org/eventbus/documentation/how-to-get-started/

github https://github.com/greenrobot/EventBus

作者 greenrobot

使用:

compile 'org.greenrobot:eventbus:3.0.0'

10.picasso

一句話介紹:強(qiáng)力的圖片下載、緩存框架

上榜理由:本榜單出現(xiàn)的第三款圖片類框架,不同的是picasso更強(qiáng)調(diào)圖片下載,你可以將picasso集成進(jìn)你的項(xiàng)目中,你也可以結(jié)合gilde和UIL與picasso,三者一齊封裝至你的項(xiàng)目中,按需所用。

官網(wǎng)地址 http://square.github.io/picasso/

github https://github.com/square/picasso

作者 square團(tuán)隊(duì)

使用:

compile 'com.squareup.picasso:picasso:2.5.2'

12.fresco

一句話介紹:一款可以管理圖片內(nèi)存的框架

上榜理由:github上12.8k個(gè)star,圖片類排行榜第四名,facebook的出身證明了它并非是重復(fù)造的輪子,在管理圖片內(nèi)存領(lǐng)域上有著它的一片天地,漸進(jìn)式加載、加載gif都是它與前三位相比獨(dú)有的特性

官網(wǎng)地址: https://www.fresco-cn.org/

github https://github.com/facebook/fresco

作者 facebook

使用:

dependencies {
  // 其他依賴
  compile 'com.facebook.fresco:fresco:0.12.0'
}

下面的依賴需要根據(jù)需求添加:

dependencies {
  // 在 API < 14 上的機(jī)器支持 WebP 時(shí),需要添加
  compile 'com.facebook.fresco:animated-base-support:0.12.0'

  // 支持 GIF 動(dòng)圖,需要添加
  compile 'com.facebook.fresco:animated-gif:0.12.0'

  // 支持 WebP (靜態(tài)圖+動(dòng)圖),需要添加
  compile 'com.facebook.fresco:animated-webp:0.12.0'
  compile 'com.facebook.fresco:webpsupport:0.12.0'

  // 僅支持 WebP 靜態(tài)圖,需要添加
  compile 'com.facebook.fresco:webpsupport:0.12.0'
}

13.RxAndroid

一句話介紹:一款A(yù)ndroid客戶端組件間異步通信的框架

上榜理由:github上12.7k個(gè)star,位居組件通信框架的第二名,僅在EventBus之后,如果要問兩者的區(qū)別,Eventbus是用來取代組件間繁瑣的interface,RxAndroid是用來取代AnsyTask的,并不沖突;當(dāng)然RxAndroid的優(yōu)點(diǎn)并不僅限于此,更多優(yōu)雅的實(shí)現(xiàn),可以去官網(wǎng)查閱!

github https://github.com/ReactiveX/RxAndroid

作者 JakeWharton

使用:

compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
compile 'io.reactivex.rxjava2:rxjava:2.1.0'

18.androidannotations

一句話介紹:一款基于注解的快速開發(fā)框架

上榜理由:與Butterknife一樣基于注解,利用注解快速完成view的初始化,不同的是androidannotations提供了更多的能力:簡單的線程模型等;筆者只接觸過Butterknife,無法更進(jìn)一步敘述androidannotations的優(yōu)勢(shì),如果你志在深入了解注解的妙用,可以嘗試探索一下!

官網(wǎng)地址 http://androidannotations.org/

github https://github.com/androidannotations/androidannotations

作者: WonderCsabo

28.greenDAO

一句話介紹:greenDAO是一款高效、快速的SQLite型數(shù)據(jù)庫

上榜理由:greenDAO的star數(shù)量與Realm不相上下,且與EventBus師出同門,也是由greenrobot團(tuán)隊(duì)開發(fā)維護(hù)的,質(zhì)量有所保證,但若拷問筆者Realm與greenDao兩者的優(yōu)劣性,只能具體到實(shí)際使用當(dāng)中,模擬線上的使用情形,進(jìn)行高強(qiáng)度測(cè)試后才能下判斷,故在此不能一言兩語說完,深表遺憾

官網(wǎng)地址:http://greenrobot.org/greendao/

github https://github.com/greenrobot/greenDAO

使用:

buildscript {
    repositories {
        jcenter()
        mavenCentral() // add repository
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.1'
        classpath 'org.greenrobot:greendao-gradle-plugin:3.2.2' // add plugin
    }
}
 
-----

apply plugin: 'com.android.application'
apply plugin: 'org.greenrobot.greendao' // apply plugin
 
dependencies {
    compile 'org.greenrobot:greendao:3.2.2' // add library
}

48.RxJava-Android-Samples

一句話介紹:一款介紹RxJava使用場(chǎng)景的app

上榜理由:榜單出現(xiàn)的第一個(gè)“僅僅為告訴你如何使用另一個(gè)項(xiàng)目”的開源項(xiàng)目,它可以說是RxJava的用例,你想得到的想不到的RxJava用法這里都有,這就是為什么它以5.2k個(gè)star矗立在這份榜單里的原因。遺憾自己沒有創(chuàng)作這么一個(gè)受人追捧的demo?趕快動(dòng)手寫個(gè)其他的“XX項(xiàng)目用例吧”

github https://github.com/kaushikgopal/RxJava-Android-Samples

作者:kaushikgopal

使用:

clone到本地慢慢探索吧

61.volley

一句話介紹:google推薦使用的Android端網(wǎng)絡(luò)請(qǐng)求框架

上榜理由:4.4k個(gè)star,并不是他不夠優(yōu)秀,而是使用volley已經(jīng)漸漸成為廣大開發(fā)者的習(xí)慣

github h<a target="_blank">ttps://github.com/google/volley</a>(新版volley地址)

作者:google

使用:

clone源碼到本地

62.androidmvp

一句話介紹:一款展示Android端Mvp設(shè)計(jì)的demo

上榜理由:榜單里為數(shù)不多、僅憑展示某種設(shè)計(jì)模式就獲得4.2K個(gè)star的項(xiàng)目,如果你有嘗試mvp的打算,androidmvp可以作為你的前哨站

github https://github.com/antoniolg/androidmvp

作者:Antonio Leiva

使用:

clone到本地

復(fù)習(xí)資料參考:
一個(gè)帖子學(xué)會(huì)Android開發(fā)四大組件:https://www.cnblogs.com/pepcod/archive/2013/02/11/2937403.html
Android數(shù)據(jù)持久化存儲(chǔ)方式:http://blog.csdn.net/YvonneVon/article/details/53438147

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • 在此特此聲明:一下所有鏈接均來自互聯(lián)網(wǎng),在此記錄下我的查閱學(xué)習(xí)歷程,感謝各位原創(chuàng)作者的無私奉獻(xiàn) ! 技術(shù)一點(diǎn)一點(diǎn)積...
    遠(yuǎn)航的移動(dòng)開發(fā)歷程閱讀 11,550評(píng)論 12 197
  • Android 自定義View的各種姿勢(shì)1 Activity的顯示之ViewRootImpl詳解 Activity...
    passiontim閱讀 179,192評(píng)論 25 708
  • 自定義控件學(xué)習(xí) https://github.com/GcsSloop/AndroidNote/tree/mast...
    楷桐閱讀 637評(píng)論 0 5
  • 最新整理的面試題 點(diǎn)我 需要繼續(xù)學(xué)習(xí)的 Android中為啥會(huì)65535的限制,解釋下原因.http://blog...
    Alfred泉閱讀 1,243評(píng)論 0 7
  • 8.3路靜娟【同一本書】~《這是你的船》 正文:雖然早期的職業(yè)生涯使我養(yǎng)成了一些不好的領(lǐng)導(dǎo)風(fēng)格,可同時(shí)我也意識(shí)到,...
    臺(tái)一DDM路靜娟閱讀 306評(píng)論 2 0

友情鏈接更多精彩內(nèi)容