You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mình thấy bạn sử dụng VIPER nhưng mình lại k thấy P - Presenter và R - Router ở đâu trong code cả
Vì không có router nên bạn đang khởi tạo các màn hình trực tiếp từ viewController, điểm này cũng chưa ổn vì các màn hình cần được khởi tạo từ phía router
View Controller tương tác trực tiếp với interactor là sai, VC chỉ có thể tương tác vs Presenter, Presenter sẽ tương tác với những thằng khác để lấy kết quả rồi trả về cho VC
Mình vẫn thấy tồn tại logic if không cần thiết ở VC, VC trong viper cần ngu hết sức có thể nên cần cố gắng chuyển toàn bộ những logic như if else sang presenter
The text was updated successfully, but these errors were encountered:
cảm ơn bạn đã dành thời gian xem qua project.
Hiện tại mình đã tách được View và Business logic ra khỏi ViewController rồi, ViewController bây giờ chỉ làm điều hướng dữ liệu nên nó bây giờ có thể xem xét là Presenter nha bạn. The Presenter is the “traffic cop” of the architecture, directing data between the view and interactor, taking user actions and calling to router to move the user between views.
Project chưa điều hướng qua màn hình khác nên mình chưa code Router vào, sẽ bổ sung thêm vào sourcecode ạ :D
The text was updated successfully, but these errors were encountered: