-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor Ptt Project #1
Comments
In GitLab by @in_in_mm on Oct 28, 2020, 22:11 assigned to @kenhuang1120 and unassigned @in_in_mm |
In GitLab by @in_in_mm on Oct 28, 2020, 22:11 assigned to @in_in_mm and unassigned @kenhuang1120 |
In GitLab by @in_in_mm on Oct 29, 2020, 00:41 |
In GitLab by @in_in_mm on Oct 29, 2020, 21:58 changed the description |
In GitLab by @in_in_mm on Oct 31, 2020, 13:29 marked this issue as related to #2 |
In GitLab by @in_in_mm on Oct 31, 2020, 22:17 mentioned in merge request !2 |
In GitLab by @in_in_mm on Oct 31, 2020, 23:30 marked the task 整理專案 Config as completed |
In GitLab by @in_in_mm on Nov 3, 2020, 01:03 mentioned in merge request !5 |
In GitLab by @in_in_mm on Nov 3, 2020, 11:16 marked the task reformat 並加入 lint check (git hook) as completed |
In GitLab by @in_in_mm on Nov 5, 2020, 00:40 marked this issue as related to #6 |
In GitLab by @TakumaLee on Nov 5, 2020, 13:35 可以一同建立 Unit Test,搭配測試 ViewModel 確保邏輯正確 |
In GitLab by @in_in_mm on Nov 5, 2020, 14:11 made the issue visible to everyone |
In GitLab by @in_in_mm on Nov 6, 2020, 00:24 可能要先有個簡單的架構出來,才比較好寫測試? 我有想過要不要改的時候至少寫個最簡單的測試出來也好,主要是不太可能有辦法一步到位。 我之前寫 Unit 的經驗是如果沒有先把 class 間的依賴關係切的很清楚的話,要嘛實作起來很痛苦,不然就是寫出來的測試粒度太粗反而沒有實質上的意義 倒是可以考慮之後整理程式碼的時候先寫測試再完成程式 |
In GitLab by @Aidan79225 on Nov 10, 2020, 23:22 marked this issue as related to #12 |
In GitLab by @Aidan79225 on Nov 19, 2020, 22:35 marked this issue as related to #18 |
In GitLab by @Aidan79225 on Nov 19, 2020, 22:37 marked this issue as related to #19 |
In GitLab by @in_in_mm on Nov 25, 2020, 13:32 changed title from Refactor {-code base-} to Refactor {+Ptt Project+} |
In GitLab by @in_in_mm on Nov 25, 2020, 13:34 changed the description |
In GitLab by @in_in_mm on Nov 25, 2020, 14:20 changed the description |
In GitLab by @in_in_mm on Nov 26, 2020, 17:09 changed the description |
In GitLab by @in_in_mm on Oct 28, 2020, 22:10
前言
規劃專案重構的思路。
因為當前迫切的需求是在 github open source ,所以第一階段目標是能讓其他人能夠協作為優先。
以下是大概的重構思路,有 highlight 的是必須要做的,其他則是有空時可以慢慢改。
Detail
整理專案:統一專案風格、刪除個人訊息
調整專案配置
:刪除多餘的檔案,整理 git 、 gradle 等 config 的設定格式化
:reformat 程式碼並加入一些基本的 lint ,規則以 google 的 coding style 為準抽象化:之後專案會以 MVVM 為目標,但須先將專案的 controller 及資料層的公開方法介面化
定義 scope
:專案大致會先分成View
、ViewModel
、Repository
ISP
:將大的 interface 切割成單一職責的小模塊控制反轉
:把 class 依賴的 interface 改成建構子注入其他:這些是可做可不做,或是需要邊做邊想的事情
非同步調用
:要想一下這個專案的實作方式,主流大概有 Callback、RxJava、Coroutines、(LiveData) 等 Select a concurrency design pattern to simplify code that executes asynchronously #13Thread Handle
:整理執行緒的調用方式,最好可以用 thread pool 之類的方式集中處理Error Handle
:錯誤處理的機制database:有需要改成 Room 之類的嗎?因為需要存的 local 資料不多,可以考慮用 android keystoreDiscussion
重構會分成幾個階段,第一階段會先 整理專案。
第二階段初步抽象化後,改為由下往上開發,從最底層的資料層重構,先建立一個 MVVM 結構。
Appendix
以下是之前 slack 整理的專案可能會用到技術選型或是套件 (感謝 @chrisynchen 整理)
Networking:
ImageLoader:
Architecture:
Async work:
DI:
CI/CD:
Test libs:
The text was updated successfully, but these errors were encountered: