The central component of the pattern. It is the application’s dynamic data structure, independent of the user interface. It directly manages the data, logic and rules of the application.
Any representation of information such as a chart, diagram or table. Multiple views of the same information are possible, such as a bar chart for management and a tabular view for accountants.
Accepts input and converts it to commands for the model or view.
어플리케이션을 을 이러한 구성 요소로 나누는 것 외에도, model-view-controller 패턴은 이들 구성요소 사이의 상호관계를 아래와 같이 정의한다.
모델
은 애플리케이션의 데이터를 관리하는 역할을 한다. 컨트롤러
에서 사용자 입력을 수신한다.뷰
는 모델
을 특정 형식으로 표시하도록 렌더링한다.컨트롤러
는 사용자 입력에 응답하고 데이터 모델 객체에 대해 상호 작용을 수행한다. 컨트롤러
는 입력을 수신하고 선택적으로 유효성을 검사한 다음 모델
에 입력을 전달한다.다른 소프트웨어 패턴과 마찬가지로 MVC는 문제에 대해 “솔루션의 핵심”을 표현하면서 각 시스템에 맞게 문제를 조정할 수 있도록 한다. 특정 MVC 설계는 기존의 설명과 크게 다를 수 있다.