구현이 아닌 인터페이스를 바탕으로 프로그래밍을 하면, 유연성과 확장성이 뛰어난 코드를 만들 수 있습니다.



interface

http://www.martinfowler.com/bliki/ImplicitInterfaceImplementation.html

http://homepage.mac.com/keithray/blog/2006/01/06/



Minimal Interface : 사용자가 원하는 기능을 모두 제공하는 범주내에서 가장적은 수의 메소드만 갖도록 API를 설계하는 것이다.

http://blog.empas.com/ahnyounghoe/read.html?a=11710135

http://younghoe.info/33

http://younghoe.info/35



인터페이스를 익히는데는 시간이 필요하다. 많은 메소드를 인터페이스로 갖는 클래스를 잘 쓰이지 않을 뿐 아니라 외면 당하기 일쑤다. 적은 수의 집약적인 기능을 갖도록 메소드를 유지해야 사용자들이 클래스를 이해하고 사용하는데 수월하다.


자바나 C# 의 interface 키워드를 사용하는 경우처럼 타입으로 정의한 순수 인터페이스를 사용하는 경우라면 메소드 숫자를 줄여야 할 이유가 또 있다. 인터페이스 구현자의 부담을 줄여야 한다는 점이다. 인터페이스의 메소드 숫자가 많으면 이를 모두 구현해야 하기 때문에 상당한 양의 작업이 요구된다. (추상 클래스를 mixin 으로 활용하면 부담을 줄일 수 있다.)


Human Interface : Minimal Interface의 반대개념

http://blog.empas.com/ahnyounghoe/read.html?a=11685433



Fluent Interface

http://martinfowler.com/bliki/FluentInterface.html

http://blog.empas.com/ahnyounghoe/read.html?a=11849977&c=1139862



Duck Interface

http://martinfowler.com/bliki/DuckInterface.html

http://blog.empas.com/ahnyounghoe/read.html?a=11888723&c=1139862



나같은 경우는 경험상 Minimal Interface가 더 유용할거라고 생각을 한다.
Posted by ologist
 TAG

블로그 이미지
ologist

공지사항

Yesterday170
Today58
Total33,499

달력

 « |  » 2012.02
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29      

최근에 받은 트랙백

글 보관함