0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

 ソフトウェアアーキテクチャはソフトウェアの構造であり、ソフトウェアをどう分割して構成するかを決めます。

 MVVMは以下の規則により、ソフトウェアを分割します。

規則1: ソフトウェアをUIとUI以外に分ける。
規則2: ソフトウェアをView/ViewModel/Modelに分ける
規則3: ViewとViewModelはUIである。
規則4: ViewにはUIの状態とコードを含まない。
規則5: 依存の方向は View->ViewModel->Modelの一方向のみ

規則3と規則4より、UIの状態とUIコードはViewModelに存在する。

規則3より、ModelはUI以外であり、UIの状態とUIコードは含まれない。

規則5より、
ViewModelはViewを知らない。(アクセスできない)
ModelはViewModelを知らない。(アクセスできない)

 アーキテクチャはソフトウェアをどう構成するかを決めるものです。
実装の詳細は決めません。

※)バインドはMVVMではありません。
バインドはMVVMの実装の一例です。

ViewModelのデータの変化でViewを変化させるよう
フレームワークで対応する場合
Viewのコードで対応する場合

もあります。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?