Kuan-Hsien / Android-Study-Group

Stay Hungry, Stay Foolish.
3 stars 0 forks source link

讀書會計畫 #3

Open Kuan-Hsien opened 5 years ago

Kuan-Hsien commented 5 years ago

計畫

【日期】主題 講者
1 -【06/19】MVVM introduction & Observer pattern & Android Jetpack - ViewModel/LiveData/Room/Databinding Ken
2 -【07/03】Proguard & Retrofit 2 Justin
3 -【07/24】Unit-Test for RxJava Wunbin
4 -【09/04】Deeplink & Android Jetpack - Workmanager Ruby
5 -【09/26】Scope Functions + LaunchMode & Intent Flag & NavUtils & TaskStackBuilder EnHan & Ken
6 -【11/14】Paging Huang



預告

這裡只放每次讀書會的預告,筆記另外開 issue 紀錄。


1. MVVM Introduction

GitHub: https://github.com/Kuan-Hsien/android-mvvm-demo

許多公司開始使用 Kotlin 寫新專案,也陸續導入新元件來讓程式碼更精簡,架構更清楚。 但是直接升級到使用 Kotlin + Lamdba 表示式,導入 Rx 和一些新元件,寫新的架構等等,對剛從 Java 入門,原本寫 MVP 架構的同學會有點吃力。

我們會循序漸進的聊到這些技術,第一場會先從 MVVM 架構搭配 Architecture Component 的元件開始介紹,並用一個 Java 寫的 Demo App 來作為範例。預計涵蓋三個主題:

1. MVP vs MVVM 架構

2. 觀察者模式的概念和實作方法。

3. Android Jetpack 中的幾個元件的特色,以及在 MVVM 所扮演的角色

另外 Google 出的這些新元件,都靈活運用了物件導向的概念,建議大家複習包含繼承、多型、抽象類別和介面等觀念。有空也可以看看 Google 的 Codelab 或是 sunflower 等範例。


2. Proguard & Retrofit 2

GitHub: https://github.com/xis2007/Android-Study-Group-Retrofit

Android SDK 内建的優化及混肴機制 Proguard,主要功能包括壓縮和優化程式,以及混淆程式碼來大幅降低反編譯後的可讀性,是非常重要的功能。這次主要希望幫助大家理解其 Proguard 背後的工作原理,日後在建立新的專案或擴充專案時,能夠更有效率的整合 Proguard 的功能,保護專案。

Retrofit 2 作爲最常使用的 HTTP 請求發送架構,跟 OkHttp 一樣由 Square 公司開發,因為封裝了 OkHttp 而更加便於使用。學會 Retrofit 2 之後,能夠讓程式更加簡潔,並加速開發。


3. Introduction of Unit-Test for RxJava

GitHubhttps://github.com/KevinJ1008/TaipeiZooApiSample (Find mvvm and test package)

We may have some opportunities to write Unit Test, no matter TDD or just build it after you finish your function. And you may use a lot RxJava in your project nowadays because of simply programming and chain style. but you may with some confusion when you willing to build Unit Test. Therefore, this topic will introduce some simple concept when you starting Test building.

1. Simple concept introduction before starting Unit Test

2. What necessary lib we need

3. RxJava observer type introduction

4. Start building RxJava Unit Test and case discussion


4. WorkManager & DeepLinks

GitHubhttps://github.com/rubysun137/Work-Manager

WorkManager

Android 8 之後對 background service 增加了一些限制,但使用 Google 推出的 JobScheduler,Firebase Job Dispatcher 等方案都需要判斷裝置支援的版本。此外在使用 Background Services 的時候,因為 app 經常在背景執行,會造成裝置電量快速消耗。Google 在 Jetpack 系列推出了 WorkManager 來解決這些問題。

DeepLink

簡單介紹 android 的幾種深層連結: deep link, app link, install referrer, deferred deep link


6. Paging

GitHubhttps://github.com/huang840801/Paging-Demo

Android 應用程式中要呈現列表(List)資料,都會使用 RecyclerView 這個元件,

雖然 RecyclerView 已經非常方便,將大部分處理列表資料的邏輯都寫好了,

但是要處理 分頁 這個功能時還是相當麻煩,

於是 Google 在 2018 年推出了 Paging 這個組件專門來處理分頁這個邏輯。


時間

記錄成員有參加的一些活動,讀書會安排上可以和這些活動錯開。

時間 社群活動
星期二 Swift Taipei
星期三 Android code club / Android Developer 月會 / iOS 讀書會 / Dart 教學
星期四 Android Taipei / Flutter Codelab / AppWorks School 每月隨意聊
xis2007 commented 5 years ago

預告2 Proguard & Retrofit 2

Android SDK 内建的優化及混肴機制 Proguard,相信很多人都聽過,但並不一定真正接觸過,可能現在的專案沒有使用,或者是有在使用,但前人已經完成相關設定,所以不需要再多做些什麽。但對於 Proguard 有基本的瞭解,能夠幫助開發者理解其背後的工作原理,日後在建立新的專案或擴充專案時,能夠更有效率的整合 Proguard 的功能,保護專案。

Retrofit 2 作爲最常使用的 HTTP 請求發送架構,跟 Okhttp 一樣由 Square 公司開發,封裝了 Okhttp,因此擁有 Okhttp 的效能,但又更加便於使用。學會 Retrofit 2 之後,能夠讓程式看起來更加簡潔,開發速度也會更加快速。

Sample https://github.com/xis2007/Android-Study-Group-Retrofit

KevinJ1008 commented 5 years ago
  1. Introduction of Unit-Test for RxJava

GitHub:https://github.com/KevinJ1008/TaipeiZooApiSample Find mvvm and test package

We may have some opportunities to write Unit Test, no matter TDD or just build it after you finish your function. And you may use a lot RxJava in your project nowadays because of simply programming and chain style. but you may with some confusion when you willing to build Unit Test. Therefore, this topic will introduce some simple concept when you starting Test building.

  1. Simple concept introduction before starting Unit Test

  2. What necessary lib we need

  3. RxJava observer type introduction

  4. Start building RxJava Unit Test and case discussion

rubysun137 commented 5 years ago
  1. WorkManager & DeepLinks

Android 8 之後 background service 的限制越來越多,之後推出了JobScheduler,Firebase Job Dispatcher 之類的來做替換。但是這些支援的版本都不夠低,造成你可能需要寫一段很長的if和else程式碼來判斷裝置的情況,來選擇合理的API。而在使用 Background Services 的時候,因為 app 經常在背景自行執行,從而造成裝置電量快速消耗。Google 在 Jetpack 系列推出了 WorkManager 來解決這些問題

DeepLink 簡單介紹 android 的幾種深層連結: deep link, app link, install referrer, deferred deep link

sample https://github.com/rubysun137/Work-Manager

huang840801 commented 4 years ago

5. Paging

Android 應用程式中要呈現列表(List)資料,都會使用 RecyclerView 這個元件,

雖然 RecyclerView 已經非常方便,將大部分處理列表資料的邏輯都寫好了,

但是要處理 分頁 這個功能時還是相當麻煩,

於是 Google 在 2018 年推出了 Paging 這個組件專門來處理分頁這個邏輯。

sample https://github.com/huang840801/Paging-Demo