관리 메뉴

IT 컴퓨터공학 자료실

Separation of Concerns에 대해 본문

etc.. 기타 카테고리 2/영어 번역 & 일본어 번역

Separation of Concerns에 대해

윤맨1 2015. 7. 14. 22:22

In computer science, separation of concerns (SoC) is a design principle for separating a computer program into distinct sections, such that each section addresses a separate concern. A concern is a set of information that affects the code of a computer program. A concern can be as general as the details of the hardware the code is being optimized for, or as specific as the name of a class to instantiate. A program that embodies SoC well is called a modular program. Modularity, and hence separation of concerns, is achieved by encapsulating information inside a section of code that has a well-defined interface.

 

컴퓨터공학에서 separation of concerns란 프로그램을 어떠한 부분으로 나눌 것인가에 대한 설계 원리이다. 그리고 한 부분에 대한 단위를 a concern 이라고 정의한다. 하나의 concern은 프로그램에 영향을 주는 코드의 집합이다. concern의 범위는 하드웨어의 세부요소들로 나누거나, 혹은 소프트웨어적으로 인스턴스하는 클래스 단위로도 나눌 수 있다. speration of concern의 개념이 반영된 프로그램을 모듈러 프로그램이라고 한다.

묘듈성과 seperation of concern개념을 이용하면 좋은 인터페이스를 구현할 수 있다.

  

The value of separation of concerns is simplifying development and maintenance of computer programs. When concerns are well-separated, individual sections can be reused, as well as developed and updated independently. Of special value is the ability to later improve or modify one section of code without having to know the details of other sections, and without having to make corresponding changes to those sections.

 

sepreation of concern의 장점은 개발을 단순화 시킬 수 있고, 프로그램의 유지보수를 편리하게 할 수 있다는 점이다. (교수님이 말한 것처럼 hardcoding, badsmell이 나지 않게 한다는 의미이다)

concern들이 잘 나누어지면 코드의 재사용성이 높아지고, 업데이트와 개발을 독립적으로 할 수 있게 된다. 무엇보다도 가장 큰 장점은 프로젝트가 커졌을 때, 다른 부분들을 세부적으로 알지 못하더라도 원하는 부분의 코드를 수정하거나 추가시키는 것이 정말 편하다는 점이다.


출처 : https://en.wikipedia.org/wiki/Separation_of_concerns