CommunityToolkit.Mvvm은 .NET 생태계에서 MVVM 패턴을 구현하는 데 도움을 주는 라이브러리입니다. 마치 레고 블록처럼, MVVM 패턴을 구현하는 데 필요한 기본적인 기능들을 제공하여 개발자가 직접 MVVM 패턴을 구현하는 수고를 덜어주는 역할을 합니다. ObservableObject, RelayCommand 등 MVVM에서 자주 사용되는 클래스와 인터페이스를 제공하며, 이를 통해 개발자는 비즈니스 로직에 집중할 수 있도록 돕습니다.
CommunityToolkit.Mvvm은 라이브러리에 속합니다. 즉, MVVM 패턴을 구현하는 데 필요한 도구를 제공하지만, 애플리케이션의 전체적인 구조를 강제하지는 않습니다. 개발자는 이 라이브러리를 사용하여 자유롭게 MVVM 패턴을 구현할 수 있습니다.
상황
선택한 방법
CommunityToolkit.Mvvm을 사용하기로 하였습니다. 그 이유는 다음과 같습니다.
CommunityToolkit.Mvvm 설명
This package includes a .NET MVVM library with helpers such as:
- ObservableObject: a base class for objects implementing the INotifyPropertyChanged interface.
- ObservableRecipient: a base class for observable objects with support for the IMessenger service.
- ObservableValidator: a base class for objects implementing the INotifyDataErrorInfo interface.
- RelayCommand: a simple delegate command implementing the ICommand interface.
- AsyncRelayCommand: a delegate command supporting asynchronous operations and cancellation.
- WeakReferenceMessenger: a messaging system to exchange messages through different loosely-coupled objects.
- StrongReferenceMessenger: a high-performance messaging system that trades weak references for speed.
- Ioc: a helper class to configure dependency injection service containers.