PhanVanLinh / NBSurveyApp

0 stars 0 forks source link

There are some issue with source code organization #56

Open hoangnguyen92dn opened 3 years ago

hoangnguyen92dn commented 3 years ago

https://github.com/PhanVanLinh/NBSurveyApp/blob/9fe9ff4c822698dd42e52d7eef138296ff6b0244/app/src/main/java/com/linh/androidnbsurveyapp/di/UseCaseModule.kt#L1

https://github.com/PhanVanLinh/NBSurveyApp/blob/9fe9ff4c822698dd42e52d7eef138296ff6b0244/app/src/main/java/com/linh/androidnbsurveyapp/ui/feature/home/HomeActivity.kt#L36-L37

https://github.com/PhanVanLinh/NBSurveyApp/blob/9fe9ff4c822698dd42e52d7eef138296ff6b0244/app/src/main/java/com/linh/androidnbsurveyapp/ui/feature/login/LoginActivity.kt#L30-L31

https://github.com/PhanVanLinh/NBSurveyApp/blob/9fe9ff4c822698dd42e52d7eef138296ff6b0244/data/src/main/java/com/linh/data/source/mapper/SurveyDataMapper.kt#L8-L47

https://github.com/PhanVanLinh/NBSurveyApp/blob/9fe9ff4c822698dd42e52d7eef138296ff6b0244/app/src/main/java/com/linh/androidnbsurveyapp/common/ViewExtension.kt#L7-L17

https://github.com/PhanVanLinh/NBSurveyApp/blob/9fe9ff4c822698dd42e52d7eef138296ff6b0244/data/src/main/java/com/linh/data/source/mapper/AccessTokenDataMapper.kt#L7-L28

https://github.com/PhanVanLinh/NBSurveyApp/blob/9fe9ff4c822698dd42e52d7eef138296ff6b0244/app/src/main/java/com/linh/androidnbsurveyapp/ui/model/mapper/SurveyModelMapper.kt#L7-L17

PhanVanLinh commented 3 years ago

1) This is my mistake, I copy it from another project 2) Yes, it better when we can move those methods to base class 3) Already think about using mapper method with kolin extension but it will have a problem. If we use toEntity as a extension method, when you are using Entity class, IDE will suggest a method toEntity (but in most of the time, I don't want that methods). Also, I think Entity class with extension method will bigger than normal Entity class (I have not test it yet) 4), Yes, we should use a clear name 5) This is my mistake. Actually, I disable auto optimize import because my current laptop performance is not so good. For another issue, I should use Analyze Tools to find and clean the code