4
MVP에서 "로드 중"피드백을 제어하는 것은 무엇입니까?
void displayData()
{
display.startShowingLoadingIcon();
startLoadingData();
}
void onDataLoaded()
{
display.stopShowingLoadingIconAndDisplayData(data);
}
void displayData()
{
display.startShowingLoadingIcon();
startLoadingData();
}
void onDataLoaded()
{
display.stopShowingLoadingIconAndDisplayData(data);
}
두 번째 솔루션이 마음에 듭니다. 그것은로드 피드백과 같은 것으로 분명히 사용자 인터페이스 결정입니다. 발표자가 사용자 상호 작용에 대해 알 필요가 없도록하고 싶습니다. 또한 첫 번째 솔루션은 사용자가 요청을 취소하고 다른 것이 나타나면 약간의 유연성을 제공합니다. 반면에 첫 번째 솔루션은 구현이 더 간단하며 디스플레이에 대해 알 필요가 없습니다. 발표자.
당신은 무엇을합니까?