我的疑问是如何在 Android 应用程序中实现一个干净且易于维护的代码?,我正在尝试应用Uncle bob - clean code
规则,但随着我继续开发,有时必须打破一些规则,我以 Activity 结束700 行(我没有使用 Fragment,700 行似乎是一个“做太多事情”的类)所以我想知道是否有人尝试过正确使用 Fragment 的 Android 应用程序并可以回答这些问题:
1- does it really impact on Activity lines length (at least less than 300-500 [not strictly this numbers but a "reasonable" Class length] lines)?
2- does code keep clean and easy over the time?, not necessary with Uncle bob rules but considering best practice in OO while coding.
3- does it have a considerable impact in terms of "Performance"?
4- does Fragment help to support in a more simple way a wide fan of Screens?"
5- ignoring developer skills, what "should" be the way to go non-Fragment activities or activities with rich Fragment use?
注意:这不是复制到Android - Activity 与 FragmentActivity 的尝试?因为这里的主题不是关于选项卡格式,而是关于 android 开发的最佳实践。
对不起我的英语不好 ;)。