Wednesday, December 27, 2006
내가 알고 있는 것들을 어떻게 이용할까?
XML, XML Namespace, Xerces Parser (SAX Model, DOM Model)
RDF(Resource Description Framework), RDF Schema,
UML(Unified Modeling Language),
RSS(RDF Site Summary or Really Simple Syndication),
Web Service Standards
SOAP-Simple Object Access Protocol
WSDL-Web Service Description Language
UDDI-Universal Description, Discovery and Integration
and so on
이것들을 조합해서 어떤 작품들을 만들어 낼 수 있을까 고민을 해봐야 겠다.
XML은 데이터를 표현하기 위한 표준 방법이다. 프로그램을 작성할 때 File 입/출력을 XML 형식으로 하면 Interoperability(호환성)을 확보할 수 있다.
RDF는 원래 Web Resource에 대한 Metadata를 기술하기 위한 것이다. XML 형식으로 표현되며, (Resource, Property, Value)의 Triple이 기본 구성요소이다. RDF는 굳이 Web Resource가 아니더라도 활용할 수 있다. 예를 들어, 내가 작성하는 프로그램에 대한 Metadata를 RDF로 표현할 수도 있다. 그것이 어떻게 활용될지는 잘 모르겠지만 (프로그램도 하나의 Web Resource로 생각할 수도 있겠다. Internet에 공개될 것이므로)
Web Service API는 프로그램이 Web과 소통하는 통로를 열어준다. Web 업체들이 제공하는 Open API를 사용하여 프로그램이 Standalone으로 동작할 뿐만 아니라 Internet과 연동하여 다양한 추가 기능을 제공할 수도 있다. 프로그램이 서버로 동작하여 Open API를 외부에 제공할 수도 있을 것이다. 아니면 프로그램 자체를 Web Service API를 이용하여 작성하는 것도 생각할 수 있다. PC에 Web Service 동작환경(주로 Apache-Tomcat-Axis 조합)을 설치하고, 프로그램의 기능들을 Web Service API로 구현한다. 최종 프로그램은 이러한 Web Service API를 조합하여 사용자 Interface를 제공하게 된다. 마지막 경우에서는 개인 PC에서 제공하는 API와 외부 Internet에서 제공하는 API가 동일한 것으로 취급된다. 즉, 프로그래밍의 영역이 Web 전체가 되는 것이다
UML Diagrams
2. class/object diagram : To model static structure of a system.
3. statechart : to model object(system) states and their transitions.
4. activity diagram : to model dynamic behaviour of the model.
5. sequency diagram : to model message passing between entities.
6. collaboration diagrams : to model interaction between objects over time.
7. component diagram : to model concrete software unit and their interrelations.
8. deployment diagram : to model the arrangement of run-time components on run-time resources.
9. package concept : decompose a complex model into simpler sub-models.
(divide and conquer)
Principle: Separation of Concerns
** Divide and conquer 와 비슷한 뜻인듯
** Software Modeling에서 매우 중요하게 생각하는 원리중의 하나이다.
Origin : From Wikipedia,
The term separation of concerns was probably coined by Edsger W. Dijkstra in his paper On the role of scientific thought.
Let me try to explain to you, what to my taste is characteristic for all intelligent thinking. It is, that one is willing to study in depth an aspect of one's subject matter in isolation for the sake of its own consistency, all the time knowing that one is occupying oneself only with one of the aspects. We know that a program must be correct and we can study it from that viewpoint only; we also know that it should be efficient and we can study its efficiency on another day, so to speak. In another mood we may ask ourselves whether, and if so: why, the program is desirable. But nothing is gained --on the contrary!-- by tackling these various aspects simultaneously. It is what I sometimes have called "the separation of concerns", which, even if not perfectly possible, is yet the only available technique for effective ordering of one's thoughts, that I know of. This is what I mean by "focussing one's attention upon some aspect": it does not mean ignoring the other aspects, it is just doing justice to the fact that from this aspect's point of view, the other is irrelevant. It is being one- and multiple-track minded simultaneously.
소프트웨어 엔지니어링 문제
"네? 4번 메뉴를 클릭하면 프로그램이 죽는다구요?"
"교차로에서 지도 표시가 제대로 안된다고 하는데, 이게 재현이 가능한가요?"
"어제는 잘 돌아갔는데, 오늘은 죽네요."
"DB 연결 모듈에서 오류가 발생하는 것 같은데요? 네? DB 연결 모듈은 아무 이상 없다고요?"
"BF존에서 캐릭터가 자주 다운된다는데, 회사 서버에서는 재현이 안되요."
...
2. 에러의 원인이 무엇인지 자동으로 알 수는 없을까?
--> 어떤 S/W component가 오류를 발생시키는가?
--> 해당 S/W component의 어느 부분이 오류를 발생시키는가?
(오류 Localization 문제)
오류 정보를 Data Mining하여 발생한 오류와 동작중인 S/W 모듈들의 연관관계를 파악하면
도움이 될 것 같다.
예를 들어, A라는 소프트웨어에서 계속해서 "비정상 종료" 보고가 올라오는데, 이 경우, 항상
B라는 DLL이 같이 동작하고 있다면, A S/W와 B DLL 사이의 충돌이 있을 가능성이 매우 높다.
3. 프로그램을 개발하면서 자주 접하는 버그들
1. memory leakage
- 메모리를 Heap에서 할당한 후, 해제하지 않아 계속해서 메모리 사용량이 증가하는 문제
프로그램 실행 직후에는 잘 감지되지 않고, 시간이 좀 지나야 문제를 발생시킴. 예를 들어
1시간에 4MB memory leak이 발생한다면, 4GB 메모리를 가진 시스템에서는 1000시간 후에
메모리 부족 문제가 발생하게 됨.
2. dangling pointer
- 포인터가 이미 삭제된 데이터 오브젝트를 가리키는 경우. 오브젝트가 사용하던 메모리
영역이 재사용되지 않고 유지되는 경우에는 포인터로 데이터를 사용해도 별 문제가 발생
하지 않음 (물론 이렇게 하는 것 자체가 잘못된 것임) 하지만, 재사용되는 경우에는 illegal
memory access 문제가 발생함. memory leakage와 마찬가지로 찾아내기 힘든 버그임.
3. array bound violation (배열 영역 벗어나는 경우)
- 배열을 선언하고, 사용하는 과정에서 배열의 index 범위를 벗어나는 경우에 발생하는 문제
이다. 다행이도 최근 컴파일러나 디버거는 이러한 문제들을 미리 검사하여 경고를 해준다.
하지만, 배열이 동적으로 할당되는 경우(Heap에서)에는 걸러지지 않는다. 배열 접근 시
index의 범위를 항상 검사하여 안전성을 확보하는 것이 좋다.
4. endless loop (무한 루프)
- For 혹은 While 같은 제어문의 조건식이 항상 참이 되는 경우이다. 이 경우 프로그램은
종료되지 않고, 같은 코드를 무한히 반복 수행한다. Endless loop 때문에 앞에서 말한
Memory leakage 문제나 array bound violation 문제가 발생할 수도 있다.
[ZDNet펌] UML이란?
블로그 > 바람의 칭칭
http://blog.naver.com/jsham76/100027058657 ![]() | |
![]() | |
|
UML 이전의 모델링 체계
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||















