Android Development — Some of the best practices

    xiaoxiao2021-03-25  75

    Use Static Final For Constants (static 15%-20% faster)

    RecyclerView (replaces ListView and GridView)

    Don’t use a database unless you really need to

    You can think about realm it’s really awesome!

    RxJava is the best alternative to AsyncTasks and so much more

    Retrofit is the best networking library there is

    Don’t write your own HTTP client, use Volley or OkHttp libraries

    Shorten your code with RetroLambda

    Combine RxJava with Retrofit and RetroLambda for maximum awesomeness!

    Package by Feature, not layers

    for example: ├─ data │ ├─ local │ ├─ model │ └─ remote ├─ injection │ ├─ component │ └─ module ├─ ui │ ├─ main │ ├─ detail │ └─ etc.. ├─ util └─ views ├─ adapters └─ widgets

    11.Put passwords and sensitive data in gradle.properties

    12.FlatBuffers is an efficient cross platform serialization library, so use it

    13.think about Dagger2 or BufferKnife.

    原文参考链接:https://laanayabdrzak.github.io/

    转载请注明原文地址: https://ju.6miu.com/read-40097.html

    最新回复(0)