1 / 2

MVC 모델이란 ? Model , View , Controller - 상세 설명

MVC 모델이란 ? Model , View , Controller - 상세 설명

gabby
Download Presentation

MVC 모델이란 ? Model , View , Controller - 상세 설명

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MVC 모델이란? Model, View, Controller -상세 설명 하나의 jsp나 스윙(Swing)과 같은 화면에 모든 처리 로직을 모아 두는 것이 아니라 모델 역할, 뷰 역할, 컨트롤러 역할을 하는 클래스를 각각 만들어서 개발하는 모델을 이야기한다. 보통 MVC모델을 이야기할 때에는 웹 환경에서의 jsp MVC 모델을 이야기하지만, 개념에 더 쉽게 접근하기 위해서는 스윙이나 SWT기반의 2 티어 애플리케이션을 만들 때의 관점에서 접근하겠다. 다음의 그림을 바탕으로 알아보자 컨트롤러(Controller) Public void changeXPosition(intnewXPosition); Public void changeYPosition(intnewYPosition); 컨트롤러(Controller) Public void changeXPosition(intnewXPosition); Public void changeYPosition(intnewYPosition);

  2. 가. 디자인 패턴은? 코드를 재사용하는 것과 마찬가지로 경험을 재사용하는 것이다. 나. 스트래티지패턴(Strategy Pattern)이란? 알고리즘군을정의하고 각각을 캡슐화하여 교환해서 사용할 수 있도록 만든다. 스트래티지을 활용하면 알고리즘을 사용하는 클라이언트와는 독립적으로 알고리즘을 변경할 수 있다. 다. 객체지향의 기초 1. 추상화 2. 캡슐화 3. 다형성 4. 상속 라. 객체지향 원칙 1. 바뀌는 부분은 캡슐화 한다. 2. 상속보다는 구성을 활용한다. 3. 구현이 아닌 인터페이스에 맞춰서 프로그래밍 한다. 4. 서로 상호작용을 하는 객체 사에서는 가능하면 느슨하게 결합하는 디자인을 사용해야 한다. 5. 클래스는 확장에 대해서는 열려 있지만 변경에 대해서는 닫혀 있어야 한다.(OCP) 6. 추상화된 것에 의존하라. 구상 클래스에 의존하지 않도록 한다.

More Related