-
Notifications
You must be signed in to change notification settings - Fork 7
Mvi/docs #173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
mvi-arch/README.md
Outdated
| У MviViewModel есть один абстрактный метод для обработки внешних событий пользователя. | ||
| События должны наследоваться от интерфейса-маркера ViewAction. Также у MviViewModel есть | ||
| livedata, которая держит в себе single state экрана. То есть у MviViewModel есть один вход и один выход. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Какой метод для обрабатки внешних событий?
- Он не абстрактный
- По аналогии с ViewAction от чего наследуется SingleState экрана?
mvi-arch/README.md
Outdated
| Помимо ограничений в количестве потока данных MviViewModel использует AssistedInject в конструктор для | ||
| получения inititalState через конструктор и механизм для сохранения данных экрана в Bundle - SavedStateHandle. | ||
| AssistedInject используется для передачи SavedStateHandle из фрагмента, который подключает ViewModel. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Помимо ограничений в количестве потока данных - лишнее здесь
- Если я правильно понял, то речь идёт о navArgs, которые прокидываются из фрагмента во MviViewModel и доступны внутри неё
mvi-arch/README.md
Outdated
|
|
||
| ### MviStoreViewModel | ||
|
|
||
| MviStoreViewModel наследуется от MviViewModel. Единственная ценность этого класса - он хранит в себе список Store, передает Action внутрь Store |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
передает Action внутрь Store - запятая
mvi-arch/README.md
Outdated
| ### MviStoreViewModel | ||
|
|
||
| MviStoreViewModel наследуется от MviViewModel. Единственная ценность этого класса - он хранит в себе список Store, передает Action внутрь Store | ||
| комбинирует стейты всех сторов в ожин большой стейт. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
в один
mvi-arch/README.md
Outdated
| - [Доклад про MVI от Сергея Рябова](https://youtu.be/hBkQkjWnAjg) | ||
| - [Доклад про эволюцию презентационных паттернов](https://youtu.be/J0YPKcDKumk) | ||
| - [Доклад про расширяемую архитектуру в Lyft](https://www.youtube.com/watch?v=_cFHtjIWjCc) | ||
| - [Презентация доклада со внутреннего митапа](Доклад Илюхи) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
добавить линк
navigation-cicerone/README.md
Outdated
| Для использования Single-Activity подхода возникают ситуации, когда несколько экранов нужно объединить одной родительской сущностью. | ||
| Объединение необходимо для хранения общего dagger компонента на flow или организации собственной навигации. | ||
| Раньше можно было использовать Activity. Но в Single-Activity должно быть только одно активити на приложение. В такой архитектуре можно использовать | ||
| parent fragment для всех экран - FlowFragment. FlowFragment обладает своей навигацией. Для навигации используется childFragmentManager этого фрагмента. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
для всех экранов
mvi-arch/README.md
Outdated
|
|
||
| ### Почему всегда не использовать MviStoreViewModel | ||
|
|
||
| Реализация полного MVI требует много кода. Для простых экранов, то есть для 85 процентов экранов рекомендуется использовать MviViewModel. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Реализация полного MVI требует много кода. Для простых экранов, то есть для 85 процентов экранов рекомендуется использовать MviViewModel. | |
| Реализация полного MVI требует много кода. Для простых экранов (т.е для большиства экранов) рекомендуется использовать MviViewModel. |
|
|
||
| // TODO: перенести в список | ||
| // Переменная, которая отвечает за отображение лоадера в конце списка. Если переменная равна true, лоадер не будет показан | ||
| internal var fullData = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
странное название для переменной, которая отвечает за то, чтобы быть флагом наличия или отсутствия лоадера
| object RefreshFailed : Error() | ||
| } | ||
|
|
||
| // Способы обработки ошибки |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Способ реакции на ошибку
| } | ||
|
|
||
| sealed class Error { | ||
| // Ошибка загрузки новой страницы |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
бесполезный комментарий
|
|
||
| sealed class Error { | ||
| // Ошибка загрузки новой страницы | ||
| object NewPageFailed : Error() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NewPageLoadingFailed
| // Ошибка загрузки новой страницы | ||
| object NewPageFailed : Error() | ||
|
|
||
| // Ошибка обновления страницы |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
бесполезный комментарий
| object NewPageFailed : Error() | ||
|
|
||
| // Ошибка обновления страницы | ||
| object RefreshFailed : Error() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RefreshPageFailed
| import javax.inject.Inject | ||
|
|
||
| /** | ||
| * Base parent fragment for fragments of hole feature. FlowFragment has own navigator based on childFragmentManager. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Наверное все-таки не hole
| })) | ||
| } | ||
|
|
||
| // При байндинге одного из последних элементов списка запускается загрузка следующей страницы |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Комментарий сомнительной полезности
No description provided.