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 3 years have passed since last update.

MVCモデルとは

プログラムの処理を役割を分けて開発をする考え方です

MVCとは[model(モデル)],[view(ビュー)],[controller(コントローラー)]の頭文字からきてます

model,view,controllerに役割が決まっており、該当する処理を場所ごとに書いていきます

Model

処理した結果をデータベースに反映させることができます

また、データベースからデータを取得して、controllerに送る部分でもあります

View

ユーザーが実際見る画面を示しています

controllerから受け取ったデータを画面に表示したり、ユーザーからのリクエストをcontrollerに送る部分でもあります

Controller

viewとmodelを操作する部分です

viewからリクエストを受け取り、modelへの処理を命令をだします

また、modelから処理の結果を受け取り、レスポンスとしてviewに返します

まとめ

MVCモデルとはModel,View,Controllerでプログラムの処理をわけて開発する考えのこと

MVCモデルを採用することで、どこの処理がどこに記述されているかがわかること

0
0
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
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?