搜尋此網誌

2017年9月10日 星期日

【Android】Starter Pattern

ref:
https://hackernoon.com/object-oriented-tricks-4-starter-pattern-android-edition-1844e1a8522d

Static Starter

To avoid disappointment at runtime, it’s nice to define a contract within the target class itself. Use a static starter method for this:
Android Studio also has a built-in live template for the starter:
This helped me avoid a lot of confusion maintaining a project with about 150,000 lines of code over the period of 3 years.

沒有留言: