Android MVP pattern package structure

前端 未结 3 1708
一整个雨季
一整个雨季 2020-12-16 00:11

I saw various great tutorials on MVP pattern in android, but the authors all seem to have different practice on packaging.

The first tutorial I saw did the packaging

3条回答
  •  Happy的楠姐
    2020-12-16 00:53

    The good practice is to separate stuffs by feature (sometimes considered as module) and layer, not by their role. Reason: class/interface name already told that, e.g LoginView, LoginPresenter, LoginFragment, LoginActivity etc.

提交回复
热议问题