MVC / MVT Model

Peter Oh·2021년 1월 16일
0

Node.js

목록 보기
1/4

Framework Architecture

대규모 프로그램이 유지보수성과 확장성을 겸비하는 것이 주된 목표

MVC Model

Model - 응용 프로그램의 데이터와 그것을 처리하는 로직을 담당하는 부분
View - 모델의 데이터나 데이터의 처리 결과를 사용자가 볼 수 있는 형태로 표현하는 부분
Controller -사용자로부터 입력받은 데이터를 모델에 메시지로 전달해 프로그램을 제어하는 부분

  1. 사용자 입력을 Controller가 받음
  2. Controller는 Model의 메서드를 사용
  3. Model의 메서드는 Model의ㅣ 상태를 바꿈
  4. Model의 상태 변화를 View에 보고하고 View는 Model의 상태에 따라 표시 내용 갱신

MVT Model

기존에 Django에서 사용하던 MVT

Model-View-Template

Model
View
Template

Django is based on MVT (Model-View-Template) architecture. MVT is a software design pattern for developing a web application.

MVT Structure has the following three parts –

Model: Model is going to act as the interface of your data. It is responsible for maintaining data. It is the logical data structure behind the entire application and is represented by a database (generally relational databases such as MySql, Postgres). To check more, visit – Django Models

View: The View is the user interface — what you see in your browser when you render a website. It is represented by HTML/CSS/Javascript and Jinja files. To check more, visit – Django Views.

Template: A template consists of static parts of the desired HTML output as well as some special syntax describing how dynamic content will be inserted. To check more, visit – Django Templates

profile
def backend_engineer():

0개의 댓글