0
0

More than 3 years have passed since last update.

MVCモデルのいろいろ

Posted at

MVCは何ですか???

MVCは、ユーザーインタフェースをもつアプリケーションソフトウェアを実装するためのデザインパターンである。

(Ref:https://bit.ly/2GQbO6V)

M(Model):入力や表示に関連しない処理、システムのビジネスロジックを処理する
V(VIEW):入力や表示に関連する処理
C(Controller):モデルとビューの橋渡して制御する

具体の例

Model:データの処理する。(DBからデータの取得、DBへの保存)
View:ユーザーが実際に見る画面を示す。
Controller:Viewからリクエストを受け取り、Modelへ処理の命令を出す。(Modelから処理の結果を受け取り、レスポンスとして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