서버사이드 Dart(3) - 다트의 주요 라이브러리들

Dart API

https://api.dartlang.org/stable/2.2.0/index.html

기초가 되는 Dart 라이브러리:

  • dart:core: strings, numbers, collections, errors, URIs 같은 코어 기능들이 있다.
  • dart:html: 웹앱을 위한 DOM 조작 기능들이 있다.
  • dart:io: 웹앱이 아닌 앱을 위한 I/O 기능들이 있다.

dart:core를 제외하고 필요한 라이브러리는 import 해야 한다.

import 'dart:async';
import 'dart:math';

[pub 패키지 매니저](pub package manager)에서 더 많은 라이브러리들을 설치할 수 있다.

Libraries

Core

dart:async

Future, Stream 같은 클래스와 함께 비동기 프로그래밍을 지원하는 기능들이 들어있다.

dart:collection

dart:core의 collection 클래스를 보충하는 클래스와 유틸이 들어있다.

dart:convert

json, utf-8 등 다른 데이터 표현들 사이에 컨버팅을 위한 인코더, 디코더가 들어있다.

dart:core

빌트인 타입들과 collection, 핵심 기능들이 들어있다.

dart:developer

디버거, 인스펙터 같은 개발도구와 인터렉션하는 기능들이 들어있다.

dart:math

수학 상수와 함수들, 랜덤수 발생기가 들어있다.

dart:typed_data

unsigned 8 byte integer, SIMD numeric type 등 고정사이즈 데이를 효과적으로 다룰 수 있는 list들이 들어있다.

VM

dart:cli

dart:io

웹앱이 아닌 앱을 위한 파일, 소켓, HTTP 등의 IO 기능들이 들어있다.

dart:isolate

isolate를 사용해 병행프로그래밍을 할 수 있다. isolate는 스레드와 달리 isolate 간에 메모리를 공유하지 않고 메시지로만 통신한다.

dart:mirrors

Dart의 기초적인 리플렉션 기능들이 들어있다. 리플렉션은 인스펙션과 동적 invocation을 지원한다.

Web

dart:html

브라우저, DOM과 인터렉션이 필요한 웹앱을 위한 HTML 요소와 기능들이 들어있다.

dart:indexed_db

클라이언트에서 쓰는 key-value 저장소에 대한 기능들이 들어있다. 이 저장소는 인덱스를 지원한다.

dart:js

자바스크립트를 운용하기 위한 기능들이 들어있다.

dart:js_util

Utility methods to efficiently manipulate typed JSInterop objects in cases where the name to call is not known at runtime. You should only use these methods when the same effect cannot be achieved with @JS annotations. These methods would be extension methods on JSObject if Dart supported extension methods.

dart:svg

SVG포맷을 지원하는 기능들이 들어있다.

dart:web_audio

브라우저에서 높은 수준의 오디오 프래그래밍을 할 수 있는 기능들이 들어있다.

dart:web_gl

브라우저에서 3D 프로그래밍을 할 수 있는 기능들이 들어있다.

dart:web_sql

브라우저에서 SQL로 데이터를 저장할 수 있는 기능들이 들어있다.