일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 韓国ヒップホップ
- certification
- 스펙정보
- 200-301
- ios
- DevNet
- JMeter
- 韓国
- gbd-200
- 부자아빠가난한아빠
- 한국판뉴딜
- 사양
- 리눅스
- 다음메일
- 4차산업
- 사용자100명
- 일본대학원
- 사양정보
- QA
- 정보처리기사
- 동시접속
- 5G
- 환경정보
- 성능측정
- ads.txt
- move앱
- 스마트시티
- 일본유학
- 명령어
- 코로나바이러스
- Today
- Total
IT 컴퓨터공학 자료실
Event-Driven Programming에 대해 본문
In computer programming, event-driven programming is a programming paradigm in which the flow of the program is determined by events such as user actions (mouse clicks, key presses), sensor outputs, or messages from other programs/threads. Event-driven programming is the dominant paradigm used in graphical user interfaces and other applications (e.g. JavaScript web applications) that are centered on performing certain actions in response to user input.
컴퓨터공학에서, Event-driven programming은 이벤트에 의해 프로그램의 흐름이 결정되는 프로그래밍 패러다임이다. 이벤트는 유저의 action (마우스 클릭, 키 누르기)이나 센서의 output, 다른 프로그램이나 스레드의 메시지를 말한다. Event-driven programming은 그래픽 유저 인터페이스와 사용자에 입력을 받아 수행되는 것이 주된 목적인 어플리케이션에서 사용되는 저명한 패러다임이다.
In an event-driven application, there is generally a main loop that listens for events, and then triggers a callback function when one of those events is detected. In embedded systems the same may be achieved using hardware interrupts instead of a constantly running main loop. Event-driven programs can be written in any programming language, although the task is easier in languages that provide high-level abstractions, such as closures.
Event-driven programming의 패러다임으로 만들어진 어플리케이션에서는, 보통 이벤트를 받아들이는 메인 루프가 있고, 어느 이벤트가 발생했을 때 콜백 function을 발생시킨다. 임베디드 시스템에서는 메인루프를 이용하는 것 대신에 하드웨어 인터럽트로 이와 같은 기능을 구현한다. Event-driven program은 task가 closure같은 추상적인 고레벨 언어라 할지라도, 어떠한 프로그래밍 언어든 간에 표현이 가능하다.
best practice
모범사례
Event-driven programming is widely used in graphical user interfaces, for instance the Android concurrency frameworks are designed using the Half-Sync/Half-Async pattern, where a combination of a single-threaded event loop processing (for the main UI thread) and synchronous threading (for background threads) is used. This is because the UI-widgets are not thread-safe, and while they are extensible, there is no way to guarantee that all the implementations are thread-safe, thus single-thread model alleviates this issue.
event-driven programming은 GUI환경에서 널리 쓰인다. 예를 들면 현재 우리가 쓰는 프레임워크인 안드로이드가 그 예다. 안드로이드는 Half-Sync/Half-Async pattern을 사용해 고안되었으며, 단일-스레드로 구성된 이벤트 루프가 프로세싱되며 (메인 UI 스레드에), 동기화 스레드가 사용되고 있다(background 스레드에). 이런 구조는 UI-위젯이 스레드에 안전하지 않은 반면에 이것들이 확장가능하기 때문이다. 모든 코드들에서 스레드의 안전을 지키는 것은 불가능했기에, 단일 스레드 모델의 출현은 이러한 문제점을 해소시켰다.
출처 : https://en.wikipedia.org/wiki/Event-driven_programming
'etc.. 기타 카테고리 2 > 영어 번역 & 일본어 번역' 카테고리의 다른 글
Separation of Concerns에 대해 (0) | 2015.07.14 |
---|---|
Event Handler에 대해 (0) | 2015.07.14 |
Use-Case Driven Design(ユースケース)에 대해 (0) | 2015.07.14 |
Domain Model에 대해 (0) | 2015.07.14 |
Domain Driven Design에 대해 (0) | 2015.07.14 |