일민 형이 메신저를 통해 UML 관련 내용을 물어왔다. 스프링 책을 쓰는 가운데 Dependency Injection(이하 DI)을 시각화하여 설명하기 위해 UML을 사용하는 과정에서 개념을 확인하고 있는 듯 했다. '책 쓰는 과정이 참 힘들구나'하는 생각이 잠깐 스쳤다. 일민 형이 확인하고자 하는 내용은 위키피디아 페이지에서 본 다음 사항이었다. 순간, 위키피디아에 이런 문장이 있음에 잠시 놀랐다.
다른 관계된 일도 있어서 오랜만에 UML Specification을 찾았다. 위 내용에 해당하는 부분은 이렇게 쓰였다.
위키피디아의 설명이 내용도 쉽고, 링크(link)와 비교해서 설명해서 개념을 익히기에 좋다. 링크와 dependency 차이를 이해할 수 있는 내용을 UML Specification에서 찾아보니 Association과 link 사이의 관계에서 비슷하게 설명한 내용을 찾을 수 있다.
이는 객체와 클래스 차이와 유사하며, 마찬가지로 실행시점과 정의시점의 차이와 유사하다.
뒤척이다가 DI와 관계된 UML 표기법을 찾았다.
A UML link is run-time relationship between instances of classifiers,
while a dependency is a model-time relationship between definitions.
다른 관계된 일도 있어서 오랜만에 UML Specification을 찾았다. 위 내용에 해당하는 부분은 이렇게 쓰였다.
The presence of dependency relationships in a model does not have any runtime semantics implications, it is all given in terms of the model-elements that participate in the relationship, not in terms of their instances.
위키피디아의 설명이 내용도 쉽고, 링크(link)와 비교해서 설명해서 개념을 익히기에 좋다. 링크와 dependency 차이를 이해할 수 있는 내용을 UML Specification에서 찾아보니 Association과 link 사이의 관계에서 비슷하게 설명한 내용을 찾을 수 있다.
An association describes a set of tuples whose values refer to typed instances. An instance of an association is called a link.
이는 객체와 클래스 차이와 유사하며, 마찬가지로 실행시점과 정의시점의 차이와 유사하다.
뒤척이다가 DI와 관계된 UML 표기법을 찾았다.
The substitution relationship denotes runtime substitutability that is not based on specialization. Substitution, unlike specialization, does not imply inheritance of structure, but only compliance of publicly available contracts. A substitution
like relationship is instrumental to specify runtime substitutability for domains that do not support specialization such as certain component technologies. It requires that (1) interfaces implemented by the contract classifier are also implemented by the substituting classifier, or else the substituting classifier implements a more specialized interface type. And, (2) the any port owned by the contract classifier has a matching port (see ports) owned by the substituting classifier.
like relationship is instrumental to specify runtime substitutability for domains that do not support specialization such as certain component technologies. It requires that (1) interfaces implemented by the contract classifier are also implemented by the substituting classifier, or else the substituting classifier implements a more specialized interface type. And, (2) the any port owned by the contract classifier has a matching port (see ports) owned by the substituting classifier.
UML Superstructure Specification, v2.2 134쪽

이올린에 북마크하기
이올린에 추천하기