您的位置:首页 > 移动开发 > Android开发

博客拾起计划-beta1

2016-04-15 10:55 369 查看
最近翻了一下博客,发现上一次发表文章已经是去年的事情了,过去一段时间发生了许多事情,互联网的世界更是出现了翻天覆地的变化,而我在android开发的道路上也越走越远。。。

先来聊一聊现状吧,首先,android MVP 架构火热,越来越多人在自己的项目中使用这种结构,相比于MVC来说,MVP的优点就是分离了controller和业务逻辑的部分,activity只负责界面,通过presenter来进行各种逻辑的操作,代码可读性更高了。这里我看到网上许多人写MVP架构时,项目结构是按照模块划分的,还有另一种方式就是按照功能划分,我个人比较喜欢后一种方式,这种方式可以很方便的找到功能相同的一组代码,不需要分散在项目各处。

然后是一些开发的library,我个人是很喜欢拥抱开源的,一些三方库可以让你的项目更健壮,开发起来也会更便利,出现什么问题也可以上github提交issue跟大家一起讨论。现在我已经把一些三方库当成必须库用在我的每一个项目之中了,下面我提供一些供大家参考:

compile 'com.squareup.okhttp3:okhttp:3.2.0'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.github.orhanobut:logger:1.12'

compile 'com.facebook.fresco:fresco:0.9.0+'
compile 'com.facebook.fresco:imagepipeline-okhttp:0.9.0+'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.github.bumptech.glide:okhttp-integration:1.3.1@aar'

compile 'com.squareup.retrofit2:retrofit:2.0.1'
compile 'com.squareup.retrofit2:adapter-rxjava:2.0.1'
Gson: com.squareup.retrofit2:converter-gson
Jackson: com.squareup.retrofit2:converter-jackson
Moshi: com.squareup.retrofit2:converter-moshi
Protobuf: com.squareup.retrofit2:converter-protobuf
Wire: com.squareup.retrofit2:converter-wire
Simple XML: com.squareup.retrofit2:converter-simplexml
Scalars (primitives, boxed, and String): com.squareup.retrofit2:converter-scalars

compile 'io.reactivex:rxjava:1.1.3'
compile 'io.reactivex:rxandroid:1.1.0'

compile 'com.facebook.stetho:stetho:1.3.1'
compile 'com.facebook.stetho:stetho-okhttp3:1.3.1'
compile 'com.facebook.stetho:stetho-urlconnection:1.3.1'
compile 'com.facebook.stetho:stetho-js-rhino:1.3.1'
我相信以上这些完全不需要我再介绍了吧,很多人都在使用,如果你没见过其中一些,上网搜索一下你会发现惊喜的。
写这篇的目的也是为了提醒自己,把自己走的路记录下来,方便自己回头也方便后来者不走岔路。

以上碎碎念属于今早起床眼睛还没睁开头脑还没清醒时的言语,说了这么多也是在考虑以后发一些新奇技术和开发中遇到的坑的文章,最近很喜欢逛开发者头条掘金泡在网上的日子,我觉得上面一些文章给我启发很大,不过都只是在看,希望以后我也能写出好文章参与进去。

以上,谢谢大家
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息