0
1

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.

MVCとMVVMについて

Last updated at Posted at 2022-11-25

はじめに

MVCとMVVMについて調べたことを簡単に整理しておきたいと思い、ここに記載します。
※本当に簡単にしか書いていないです。

MVCについて

MVC 名称 役割
M Model Viewの値保持/DB接続して値取得/値の計算等を行います。主にビジネスロジックの役割を担います。
V View html/jsp/xhtml等を指します。ユーザーが画面から見える部分の役割を担います。
C Contoroler Viewからの初期表示時/ボタン押下時等に呼び出される部分です。ViewとModelをつなぐ役割を担います。〇〇Action/〇〇Controlerクラスなんかがそれという認識です。

MVVMについて

MVC 名称 役割
M Model MVCのModelと同じで、主にビジネスロジックの役割を担います。
V View MVCのViewと同じで、ユーザーが画面から見える部分の役割を担います。
VM ViewModel ViewとModelの仲介となり、Modelの値をViewに表示させたり、Viewから変更された値をModelに渡す役割を担います。
0
1
1

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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?