{"id":42917,"date":"2024-11-13T22:28:13","date_gmt":"2024-11-13T22:28:13","guid":{"rendered":"https:\/\/atmokpo.com\/w\/?p=42917"},"modified":"2024-11-26T06:34:27","modified_gmt":"2024-11-26T06:34:27","slug":"mvvm-7-mvvm%ec%97%90%ec%84%9c%ec%9d%98-viewmodel-%ea%b0%84-%ed%86%b5%ec%8b%a0%ea%b3%bc-%eb%a9%94%ec%8b%9c%ec%a7%95-%ec%8b%9c%ec%8a%a4%ed%85%9c-mediator-%ed%8c%a8%ed%84%b4%ec%9d%84-%ec%82%ac","status":"publish","type":"post","link":"https:\/\/atmokpo.com\/w\/42917\/","title":{"rendered":"[MVVM] 7.MVVM\uc5d0\uc11c\uc758 ViewModel \uac04 \ud1b5\uc2e0\uacfc \uba54\uc2dc\uc9d5 \uc2dc\uc2a4\ud15c, Mediator \ud328\ud134\uc744 \uc0ac\uc6a9\ud55c ViewModel \uac04 \ud1b5\uc2e0"},"content":{"rendered":"<h2>7. MVVM\uc5d0\uc11c\uc758 ViewModel \uac04 \ud1b5\uc2e0\uacfc \uba54\uc2dc\uc9d5 \uc2dc\uc2a4\ud15c, Mediator \ud328\ud134\uc744 \uc0ac\uc6a9\ud55c ViewModel \uac04 \ud1b5\uc2e0<\/h2>\n<p>MVVM (Model-View-ViewModel) \ud328\ud134\uc740 WPF (Windows Presentation Foundation) \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc5d0\uc11c \ub110\ub9ac \uc0ac\uc6a9\ub418\ub294 \ub514\uc790\uc778 \ud328\ud134\uc785\ub2c8\ub2e4. MVVM\uc758 \uc8fc\uc694 \ubaa9\uc801\uc740 UI\uc640 \ube44\uc988\ub2c8\uc2a4 \ub85c\uc9c1\uc758 \ubd84\ub9ac\ub97c \ud1b5\ud574 \uc720\uc9c0\ubcf4\uc218\uc131\uacfc \uc7ac\uc0ac\uc6a9\uc131\uc744 \ub192\uc774\ub294 \uac83\uc785\ub2c8\ub2e4. \uc774 \ud328\ud134\uc5d0\uc11c ViewModel\uc740 View\uc640 Model \uac04\uc758 \uc911\uc7ac\uc790 \uc5ed\ud560\uc744 \ud558\uba70 \ub370\uc774\ud130 \ubc14\uc778\ub529\uc744 \ud1b5\ud574 UI\ub97c \uc5c5\ub370\uc774\ud2b8\ud569\ub2c8\ub2e4. \uadf8\ub7ec\ub098 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc774 \ubcf5\uc7a1\ud574\uc9d0\uc5d0 \ub530\ub77c \uc5ec\ub7ec ViewModel \uac04\uc758 \ud1b5\uc2e0\uc774 \ud544\uc694\ud574\uc9c0\uba70, \uc774\uc640 \uad00\ub828\ub41c \ub2e4\uc591\ud55c \uba54\ucee4\ub2c8\uc998\uc774 \ud544\uc694\ud569\ub2c8\ub2e4. \ubcf8 \uae00\uc5d0\uc11c\ub294 ViewModel \uac04\uc758 \ud1b5\uc2e0\uacfc \uba54\uc2dc\uc9d5 \uc2dc\uc2a4\ud15c, \uadf8\ub9ac\uace0 Mediator \ud328\ud134\uc744 \uc0ac\uc6a9\ud55c ViewModel \uac04 \ud1b5\uc2e0\uc744 \uc790\uc138\ud788 \uc0b4\ud3b4\ubcf4\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n<h3>1. ViewModel \uac04 \ud1b5\uc2e0\uc758 \ud544\uc694\uc131<\/h3>\n<p>MVVM \ud328\ud134\uc5d0\uc11c\ub294 \uac01 ViewModel\uc774 \ud2b9\uc815\ud55c \ubdf0\ub97c \ub2f4\ub2f9\ud569\ub2c8\ub2e4. \uadf8\ub7ec\ub098 \ub300\uaddc\ubaa8 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc5d0\uc11c\ub294 \uc5ec\ub7ec ViewModel\uc774 \uc0c1\ud638\uc791\uc6a9\ud574\uc57c \ud560 \ud544\uc694\uac00 \uc788\uc2b5\ub2c8\ub2e4. \uc608\ub97c \ub4e4\uc5b4, \uc0ac\uc6a9\uc790\uac00 \ud55c ViewModel\uc5d0\uc11c \ub370\uc774\ud130\ub97c \uc785\ub825\ud558\uba74 \uc774 \ubcc0\ud654\uac00 \ub2e4\ub978 ViewModel\uc5d0 \uc601\ud5a5\uc744 \ubbf8\uce60 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc774\ub7ec\ud55c \uc0c1\ud669\uc5d0\uc11c ViewModel \uac04\uc758 \uc758\uc0ac\uc18c\ud1b5\uc774 \ud544\uc218\uc801\uc785\ub2c8\ub2e4.<\/p>\n<p>ViewModel \uac04\uc758 \ud1b5\uc2e0\uc744 \ud544\uc694\ub85c \ud558\ub294 \uacbd\uc6b0\ub294 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4:<\/p>\n<ul>\n<li><strong>\uc0c1\ud0dc \uacf5\uc720:<\/strong> \uc5ec\ub7ec ViewModel\uc774 \ub3d9\uc77c\ud55c \ub370\uc774\ud130\ub97c \uacf5\uc720\ud560 \ub54c<\/li>\n<li><strong>\uc0c1\ud638\uc791\uc6a9:<\/strong> \ud55c ViewModel\uc758 \uc791\uc5c5 \uacb0\uacfc\uac00 \ub2e4\ub978 ViewModel\uc758 \ud589\ub3d9\uc5d0 \uc601\ud5a5\uc744 \uc904 \ub54c<\/li>\n<li><strong>\uc774\ubca4\ud2b8 \ucc98\ub9ac:<\/strong> \uc5ec\ub7ec ViewModel\uc5d0\uc11c \ud2b9\uc815 \uc774\ubca4\ud2b8\uac00 \ubc1c\uc0dd\ud588\uc744 \ub54c<\/li>\n<\/ul>\n<h3>2. ViewModel \uac04\uc758 \ud1b5\uc2e0 \ubc29\ubc95<\/h3>\n<p>ViewModel \uac04\uc758 \ud1b5\uc2e0\uc744 \uc704\ud55c \ubc29\ubc95\uc5d0\ub294 \uc5ec\ub7ec \uac00\uc9c0\uac00 \uc788\uc2b5\ub2c8\ub2e4. \uc5ec\uae30\uc11c\ub294 \ub450 \uac00\uc9c0 \uc8fc\uc694 \ubc29\ubc95\uc778 \uba54\uc2dc\uc9d5 \uc2dc\uc2a4\ud15c\uacfc Mediator \ud328\ud134\uc5d0 \ub300\ud574 \uc124\uba85\ud569\ub2c8\ub2e4.<\/p>\n<h4>2.1. \uba54\uc2dc\uc9d5 \uc2dc\uc2a4\ud15c<\/h4>\n<p>\uba54\uc2dc\uc9d5 \uc2dc\uc2a4\ud15c\uc740 ViewModel \uac04\uc758 \ud1b5\uc2e0\uc744 \uc9c0\uc6d0\ud558\ub294 \uc77c\ubc18\uc801\uc778 \ubc29\ubc95\uc785\ub2c8\ub2e4. \uc774 \uc2dc\uc2a4\ud15c\uc5d0\uc11c\ub294 \ud55c ViewModel\uc774 \uba54\uc2dc\uc9c0\ub97c \ubc1c\uc1a1\ud558\uace0 \ub2e4\ub978 ViewModel\uc774 \uc774\ub97c \uc218\uc2e0\ud558\uc5ec \ubc18\uc751\ud558\ub294 \ubc29\uc2dd\uc73c\ub85c \ub3d9\uc791\ud569\ub2c8\ub2e4. WPF\uc5d0\uc11c\ub294 <strong>MvvmLight<\/strong> \ub610\ub294 <strong>Prism<\/strong>\uacfc \uac19\uc740 \ub77c\uc774\ube0c\ub7ec\ub9ac\ub97c \uc0ac\uc6a9\ud558\uc5ec \uba54\uc2dc\uc9d5 \uc2dc\uc2a4\ud15c\uc744 \uad6c\ud604\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<p>\ub2e4\uc74c\uc740 MvvmLight\ub97c \uc0ac\uc6a9\ud558\uc5ec \uba54\uc2dc\uc9d5 \uc2dc\uc2a4\ud15c\uc744 \uad6c\ud604\ud55c \uc608\uc81c \ucf54\ub4dc\uc785\ub2c8\ub2e4:<\/p>\n<pre><code>using GalaSoft.MvvmLight.Messaging;\n\npublic class FirstViewModel : ViewModelBase\n{\n    public void DoAction()\n    {\n        \/\/ \uc791\uc5c5 \uc218\ud589\n        Messenger.Default.Send(new NotificationMessage(\"Hello from FirstViewModel\"));\n    }\n}\n\npublic class SecondViewModel : ViewModelBase\n{\n    public SecondViewModel()\n    {\n        Messenger.Default.Register<notificationmessage>(this, OnNotify);\n    }\n\n    private void OnNotify(NotificationMessage message)\n    {\n        if (message.Content.ToString() == \"Hello from FirstViewModel\")\n        {\n            \/\/ \uba54\uc2dc\uc9c0 \ucc98\ub9ac\n        }\n    }\n}\n<\/notificationmessage><\/code><\/pre>\n<p>\uc704 \ucf54\ub4dc\ub294 FirstViewModel\uc774 action\uc744 \uc218\ud589\ud558\uba74\uc11c \uba54\uc2dc\uc9c0\ub97c \ubcf4\ub0c5\ub2c8\ub2e4. SecondViewModel\uc740 \uc774 \uba54\uc2dc\uc9c0\ub97c \uc218\uc2e0\ud558\uc5ec \ucc98\ub9ac\ud558\ub294 \uad6c\uc870\uc785\ub2c8\ub2e4. \uc774\uc640 \uac19\uc740 \uad6c\uc870\ub294 ViewModel \uac04\uc758 \ub290\uc2a8\ud55c \uacb0\ud569\uc744 \uc720\uc9c0\ud558\uba74\uc11c\ub3c4 \uac01 ViewModel \uac04\uc758 \uc0c1\ud638\uc791\uc6a9\uc744 \ucd09\uc9c4\ud569\ub2c8\ub2e4.<\/p>\n<h4>2.2. Mediator \ud328\ud134<\/h4>\n<p>Mediator \ud328\ud134\uc740 \uac1d\uccb4 \uac04\uc758 \uc0c1\ud638\uc791\uc6a9\uc744 \uc870\uc815\ud558\ub294 \uc911\uc7ac\uc790\ub85c\uc11c \uae30\ub2a5\uc744 \uc218\ud589\ud558\ub294 \ub514\uc790\uc778 \ud328\ud134\uc785\ub2c8\ub2e4. \uc774 \ud328\ud134\uc744 \uc0ac\uc6a9\ud558\uba74 \uc0c1\ud638\uc791\uc6a9\ud558\ub294 \uac1d\uccb4 \uac04\uc758 \uc758\uc874\uc131\uc744 \uc904\uc774\uace0, \uac1d\uccb4\ub4e4 \uac04\uc758 \ucee4\ubba4\ub2c8\ucf00\uc774\uc158\uc744 \uc911\uc559 \uc9d1\uc911\uc2dd\uc73c\ub85c \uad00\ub9ac\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. MVVM\uc5d0\uc11c Mediator \ud328\ud134\uc744 \uc0ac\uc6a9\ud558\uc5ec ViewModel \uac04\uc758 \ud1b5\uc2e0\uc744 \uad6c\ud604\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<p>\ub2e4\uc74c\uc740 Mediator \ud328\ud134\uc744 \uc0ac\uc6a9\ud558\uc5ec ViewModel \uac04 \ud1b5\uc2e0\uc744 \uad6c\ud604\ud55c \uc608\uc81c \ucf54\ub4dc\uc785\ub2c8\ub2e4:<\/p>\n<pre><code>public interface IMediator\n{\n    void Register(string message, IReceiver receiver);\n    void Send(string message, object data);\n}\n\npublic class Mediator : IMediator\n{\n    private readonly Dictionary<string, list<ireceiver=\"\">&gt; _receivers = new();\n\n    public void Register(string message, IReceiver receiver)\n    {\n        if (!_receivers.ContainsKey(message))\n        {\n            _receivers[message] = new List<ireceiver>();\n        }\n        _receivers[message].Add(receiver);\n    }\n\n    public void Send(string message, object data)\n    {\n        if (_receivers.ContainsKey(message))\n        {\n            foreach (var receiver in _receivers[message])\n            {\n                receiver.Receive(message, data);\n            }\n        }\n    }\n}\n\npublic interface IReceiver\n{\n    void Receive(string message, object data);\n}\n\npublic class FirstViewModel : ViewModelBase, IReceiver\n{\n    private readonly IMediator _mediator;\n\n    public FirstViewModel(IMediator mediator)\n    {\n        _mediator = mediator;\n        _mediator.Register(\"DoSomething\", this);\n    }\n\n    public void DoAction()\n    {\n        \/\/ Action \uc218\ud589 \ud6c4 \ub2e4\ub978 ViewModel\uc5d0\uac8c \uc54c\ub9bc\n        _mediator.Send(\"DoSomething\", null);\n    }\n\n    public void Receive(string message, object data)\n    {\n        \/\/ \uba54\uc2dc\uc9c0 \ucc98\ub9ac\n    }\n}\n\npublic class SecondViewModel : ViewModelBase, IReceiver\n{\n    private readonly IMediator _mediator;\n\n    public SecondViewModel(IMediator mediator)\n    {\n        _mediator = mediator;\n        _mediator.Register(\"DoSomething\", this);\n    }\n\n    public void Receive(string message, object data)\n    {\n        if (message == \"DoSomething\")\n        {\n            \/\/ \uba54\uc2dc\uc9c0 \ucc98\ub9ac\n        }\n    }\n}\n<\/ireceiver><\/string,><\/code><\/pre>\n<p>\uc704 \ucf54\ub4dc\uc5d0\uc11c Mediator \ud074\ub798\uc2a4\ub294 \ub2e4\uc591\ud55c ViewModel\uc744 \ub4f1\ub85d\ud558\uace0, \ud2b9\uc815 \uba54\uc2dc\uc9c0\ub97c \uc218\uc2e0\ud558\uba74 \ub4f1\ub85d\ub41c ViewModel\uc5d0 \uc54c\ub9ac\ub294 \uc5ed\ud560\uc744 \ud569\ub2c8\ub2e4. \uac01 ViewModel\uc740 Mediator\ub85c\ubd80\ud130 \uba54\uc2dc\uc9c0\ub97c \uc218\uc2e0\ud558\uae30 \uc704\ud574 IReceiver \uc778\ud130\ud398\uc774\uc2a4\ub97c \uad6c\ud604\ud574\uc57c \ud569\ub2c8\ub2e4. \uc774 \uad6c\uc870\ub294 ViewModel \uac04\uc758 \uacb0\ud569\ub3c4\ub97c \ub0ae\ucd94\uace0, \uac01 ViewModel \uac04\uc758 \ud1b5\uc2e0\uc744 \ubcf4\ub2e4 \uba85\ud655\ud558\uac8c \ud574\uc90d\ub2c8\ub2e4.<\/p>\n<h3>3. \uba54\uc2dc\uc9d5 \uc2dc\uc2a4\ud15c\uacfc Mediator \ud328\ud134 \ube44\uad50<\/h3>\n<p>\uba54\uc2dc\uc9d5 \uc2dc\uc2a4\ud15c\uacfc Mediator \ud328\ud134\uc740 \ubaa8\ub450 ViewModel \uac04\uc758 \ud1b5\uc2e0\uc744 \uac00\ub2a5\ud558\uac8c \ud574\uc8fc\uc9c0\ub9cc, \uac01\uac01\uc758 \uc811\uadfc \ubc29\uc2dd\uc5d0\ub294 \uc7a5\ub2e8\uc810\uc774 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<p><strong>\uba54\uc2dc\uc9d5 \uc2dc\uc2a4\ud15c\uc758 \uc7a5\uc810:<\/strong><\/p>\n<ul>\n<li>\uad6c\ud604\uc774 \uac04\ub2e8\ud558\uace0 \uc9c1\uad00\uc801\uc785\ub2c8\ub2e4.<\/li>\n<li>\ub2e4\uc591\ud55c \uba54\uc2dc\uc9c0\ub97c \ud1b5\ud574 \uc720\uc5f0\ud55c \ud1b5\uc2e0\uc774 \uac00\ub2a5\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n<p><strong>\ub2e8\uc810:<\/strong><\/p>\n<ul>\n<li>\uba54\uc2dc\uc9c0\uac00 \ub108\ubb34 \ub9ce\uc774 \uc0dd\uae30\uba74 \uad00\ub9ac\uac00 \uc5b4\ub824\uc6cc\uc9c8 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/li>\n<li>\uba54\uc2dc\uc9c0 \ucc98\ub9ac \uc21c\uc11c\ub97c \uad00\ub9ac\ud558\uae30 \uc5b4\ub824\uc6b8 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/li>\n<\/ul>\n<p><strong>Mediator \ud328\ud134\uc758 \uc7a5\uc810:<\/strong><\/p>\n<ul>\n<li>\uac01 ViewModel \uac04\uc758 \uc758\uc874\uc131\uc744 \uc904\uc774\uace0, \uc911\uc7ac\uc790\ub97c \ud1b5\ud574 \ud1b5\uc2e0\uc744 \ucc98\ub9ac\ud558\uc5ec \uad00\ub9ac\uac00 \uc6a9\uc774\ud569\ub2c8\ub2e4.<\/li>\n<li>\uba54\uc2dc\uc9c0 \ucc98\ub9ac \ub85c\uc9c1\uc744 \uc911\uc559 \uc9d1\uc911\ud654\ud558\uc5ec \ucf54\ub4dc\uc758 \uac00\ub3c5\uc131\uc744 \ub192\uc785\ub2c8\ub2e4.<\/li>\n<\/ul>\n<p><strong>\ub2e8\uc810:<\/strong><\/p>\n<ul>\n<li>\uad6c\ud604\uc774 \uc0c1\ub300\uc801\uc73c\ub85c \ubcf5\uc7a1\ud560 \uc218 \uc788\uc73c\uba70, \ucd08\uae30 \uc124\uc815\uc5d0 \ub354 \ub9ce\uc740 \ucf54\ub4dc\uac00 \ud544\uc694\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/li>\n<li>\ud558\ub098\uc758 Mediator\uac00 \ubaa8\ub4e0 \ud1b5\uc2e0\uc744 \ucc98\ub9ac\ud558\ubbc0\ub85c, \ub2e8\uc77c \uc2e4\ud328 \uc9c0\uc810\uc774 \ub420 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/li>\n<\/ul>\n<h3>4. \uacb0\ub860<\/h3>\n<p>MVVM \ud328\ud134\uc5d0\uc11c ViewModel \uac04\uc758 \ud1b5\uc2e0\uc740 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc758 \ubcf5\uc7a1\uc131\uc744 \uad00\ub9ac\ud558\ub294 \ub370 \ub9e4\uc6b0 \uc911\uc694\ud569\ub2c8\ub2e4. \uba54\uc2dc\uc9d5 \uc2dc\uc2a4\ud15c\uacfc Mediator \ud328\ud134\uc740 \uac01\uac01\uc758 \uc7a5\ub2e8\uc810\uc774 \uc788\uc73c\uba70, \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc758 \uc694\uad6c\uc0ac\ud56d\uc5d0 \ub530\ub77c \uc801\uc808\ud55c \ubc29\ubc95\uc744 \uc120\ud0dd\ud558\uc5ec \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc774 \ub450 \uac00\uc9c0 \ubc29\ubc95\uc744 \ud1b5\ud574 ViewModel \uac04\uc758 \ud1b5\uc2e0\uc744 \ubcf4\ub2e4 \ud6a8\uc728\uc801\uc73c\ub85c \uad6c\ud604\ud558\uace0, UI\uc640 \ube44\uc988\ub2c8\uc2a4 \ub85c\uc9c1\uc758 \ubd84\ub9ac\ub97c \uc720\uc9c0\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc774\ub97c \ud1b5\ud574 \uc720\uc9c0\ubcf4\uc218\uc131\uacfc \ud655\uc7a5\uc131\uc744 \uac16\ucd98 WPF \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \uac1c\ubc1c\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<p>\uc774\ub7ec\ud55c \uae30\uc220\ub4e4\uc740 \ucee4\ub2e4\ub780 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \uad6c\ucd95\ud558\ub294 \ub370 \uc788\uc5b4 \ud544\uc218\uc801\uc73c\ub85c \uc775\ud600\uc57c \ud560 \ubd80\ubd84\uc785\ub2c8\ub2e4. \uac1c\ubc1c\uc790\ub294 \uc0c1\ud669\uc5d0 \ub530\ub77c \uac00\uc7a5 \uc801\ud569\ud55c \ubc29\ubc95\uc744 \uc120\ud0dd\ud558\uc5ec \uc0ac\uc6a9\ud558\uace0, \uac01 ViewModel\uc758 lifecycle\uacfc \uc0c1\ud0dc\ub97c \uc798 \uad00\ub9ac\ud558\uc5ec \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc758 \ud488\uc9c8\uc744 \ub192\uc5ec\uc57c \ud569\ub2c8\ub2e4.<\/p>\n<p>\uc55e\uc73c\ub85c \ub354 \ub9ce\uc740 WPF \ubc0f MVVM \uad00\ub828 \uc8fc\uc81c\ub97c \ub2e4\ub8e8\uba70, \ubcf5\uc7a1\ud55c \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc5d0\uc11c\uc758 \uac1c\ubc1c \uae30\uc220\uacfc \uacbd\ud5d8\uc744 \uacf5\uc720\ud560 \uc608\uc815\uc785\ub2c8\ub2e4.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>7. MVVM\uc5d0\uc11c\uc758 ViewModel \uac04 \ud1b5\uc2e0\uacfc \uba54\uc2dc\uc9d5 \uc2dc\uc2a4\ud15c, Mediator \ud328\ud134\uc744 \uc0ac\uc6a9\ud55c ViewModel \uac04 \ud1b5\uc2e0 MVVM (Model-View-ViewModel) \ud328\ud134\uc740 WPF (Windows Presentation Foundation) \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc5d0\uc11c \ub110\ub9ac \uc0ac\uc6a9\ub418\ub294 \ub514\uc790\uc778 \ud328\ud134\uc785\ub2c8\ub2e4. MVVM\uc758 \uc8fc\uc694 \ubaa9\uc801\uc740 UI\uc640 \ube44\uc988\ub2c8\uc2a4 \ub85c\uc9c1\uc758 \ubd84\ub9ac\ub97c \ud1b5\ud574 \uc720\uc9c0\ubcf4\uc218\uc131\uacfc \uc7ac\uc0ac\uc6a9\uc131\uc744 \ub192\uc774\ub294 \uac83\uc785\ub2c8\ub2e4. \uc774 \ud328\ud134\uc5d0\uc11c ViewModel\uc740 View\uc640 Model \uac04\uc758 \uc911\uc7ac\uc790 \uc5ed\ud560\uc744 \ud558\uba70 \ub370\uc774\ud130 \ubc14\uc778\ub529\uc744 \ud1b5\ud574 UI\ub97c \uc5c5\ub370\uc774\ud2b8\ud569\ub2c8\ub2e4. \uadf8\ub7ec\ub098 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc774 \ubcf5\uc7a1\ud574\uc9d0\uc5d0 \ub530\ub77c &hellip; <a href=\"https:\/\/atmokpo.com\/w\/42917\/\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;[MVVM] 7.MVVM\uc5d0\uc11c\uc758 ViewModel \uac04 \ud1b5\uc2e0\uacfc \uba54\uc2dc\uc9d5 \uc2dc\uc2a4\ud15c, Mediator \ud328\ud134\uc744 \uc0ac\uc6a9\ud55c ViewModel \uac04 \ud1b5\uc2e0&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[39],"tags":[],"class_list":["post-42917","post","type-post","status-publish","format-standard","hentry","category-wpf-"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>[MVVM] 7.MVVM\uc5d0\uc11c\uc758 ViewModel \uac04 \ud1b5\uc2e0\uacfc \uba54\uc2dc\uc9d5 \uc2dc\uc2a4\ud15c, Mediator \ud328\ud134\uc744 \uc0ac\uc6a9\ud55c ViewModel \uac04 \ud1b5\uc2e0 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/atmokpo.com\/w\/42917\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[MVVM] 7.MVVM\uc5d0\uc11c\uc758 ViewModel \uac04 \ud1b5\uc2e0\uacfc \uba54\uc2dc\uc9d5 \uc2dc\uc2a4\ud15c, Mediator \ud328\ud134\uc744 \uc0ac\uc6a9\ud55c ViewModel \uac04 \ud1b5\uc2e0 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"og:description\" content=\"7. MVVM\uc5d0\uc11c\uc758 ViewModel \uac04 \ud1b5\uc2e0\uacfc \uba54\uc2dc\uc9d5 \uc2dc\uc2a4\ud15c, Mediator \ud328\ud134\uc744 \uc0ac\uc6a9\ud55c ViewModel \uac04 \ud1b5\uc2e0 MVVM (Model-View-ViewModel) \ud328\ud134\uc740 WPF (Windows Presentation Foundation) \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc5d0\uc11c \ub110\ub9ac \uc0ac\uc6a9\ub418\ub294 \ub514\uc790\uc778 \ud328\ud134\uc785\ub2c8\ub2e4. MVVM\uc758 \uc8fc\uc694 \ubaa9\uc801\uc740 UI\uc640 \ube44\uc988\ub2c8\uc2a4 \ub85c\uc9c1\uc758 \ubd84\ub9ac\ub97c \ud1b5\ud574 \uc720\uc9c0\ubcf4\uc218\uc131\uacfc \uc7ac\uc0ac\uc6a9\uc131\uc744 \ub192\uc774\ub294 \uac83\uc785\ub2c8\ub2e4. \uc774 \ud328\ud134\uc5d0\uc11c ViewModel\uc740 View\uc640 Model \uac04\uc758 \uc911\uc7ac\uc790 \uc5ed\ud560\uc744 \ud558\uba70 \ub370\uc774\ud130 \ubc14\uc778\ub529\uc744 \ud1b5\ud574 UI\ub97c \uc5c5\ub370\uc774\ud2b8\ud569\ub2c8\ub2e4. \uadf8\ub7ec\ub098 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc774 \ubcf5\uc7a1\ud574\uc9d0\uc5d0 \ub530\ub77c &hellip; \ub354 \ubcf4\uae30 &quot;[MVVM] 7.MVVM\uc5d0\uc11c\uc758 ViewModel \uac04 \ud1b5\uc2e0\uacfc \uba54\uc2dc\uc9d5 \uc2dc\uc2a4\ud15c, Mediator \ud328\ud134\uc744 \uc0ac\uc6a9\ud55c ViewModel \uac04 \ud1b5\uc2e0&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/atmokpo.com\/w\/42917\/\" \/>\n<meta property=\"og:site_name\" content=\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-13T22:28:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-26T06:34:27+00:00\" \/>\n<meta name=\"author\" content=\"root\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@bebubo4\" \/>\n<meta name=\"twitter:site\" content=\"@bebubo4\" \/>\n<meta name=\"twitter:label1\" content=\"\uae00\uc4f4\uc774\" \/>\n\t<meta name=\"twitter:data1\" content=\"root\" \/>\n\t<meta name=\"twitter:label2\" content=\"\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04\" \/>\n\t<meta name=\"twitter:data2\" content=\"1\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/atmokpo.com\/w\/42917\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/42917\/\"},\"author\":{\"name\":\"root\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\"},\"headline\":\"[MVVM] 7.MVVM\uc5d0\uc11c\uc758 ViewModel \uac04 \ud1b5\uc2e0\uacfc \uba54\uc2dc\uc9d5 \uc2dc\uc2a4\ud15c, Mediator \ud328\ud134\uc744 \uc0ac\uc6a9\ud55c ViewModel \uac04 \ud1b5\uc2e0\",\"datePublished\":\"2024-11-13T22:28:13+00:00\",\"dateModified\":\"2024-11-26T06:34:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/atmokpo.com\/w\/42917\/\"},\"wordCount\":83,\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"articleSection\":[\"WPF \uac1c\ubc1c\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/atmokpo.com\/w\/42917\/\",\"url\":\"https:\/\/atmokpo.com\/w\/42917\/\",\"name\":\"[MVVM] 7.MVVM\uc5d0\uc11c\uc758 ViewModel \uac04 \ud1b5\uc2e0\uacfc \uba54\uc2dc\uc9d5 \uc2dc\uc2a4\ud15c, Mediator \ud328\ud134\uc744 \uc0ac\uc6a9\ud55c ViewModel \uac04 \ud1b5\uc2e0 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#website\"},\"datePublished\":\"2024-11-13T22:28:13+00:00\",\"dateModified\":\"2024-11-26T06:34:27+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/atmokpo.com\/w\/42917\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/atmokpo.com\/w\/42917\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/atmokpo.com\/w\/42917\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\ud648\",\"item\":\"https:\/\/atmokpo.com\/w\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"[MVVM] 7.MVVM\uc5d0\uc11c\uc758 ViewModel \uac04 \ud1b5\uc2e0\uacfc \uba54\uc2dc\uc9d5 \uc2dc\uc2a4\ud15c, Mediator \ud328\ud134\uc744 \uc0ac\uc6a9\ud55c ViewModel \uac04 \ud1b5\uc2e0\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/atmokpo.com\/w\/#website\",\"url\":\"https:\/\/atmokpo.com\/w\/\",\"name\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/atmokpo.com\/w\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\",\"name\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"url\":\"https:\/\/atmokpo.com\/w\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png\",\"contentUrl\":\"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png\",\"width\":400,\"height\":400,\"caption\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\"},\"image\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/bebubo4\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\",\"name\":\"root\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g\",\"caption\":\"root\"},\"sameAs\":[\"http:\/\/atmokpo.com\/w\"],\"url\":\"https:\/\/atmokpo.com\/w\/author\/root\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[MVVM] 7.MVVM\uc5d0\uc11c\uc758 ViewModel \uac04 \ud1b5\uc2e0\uacfc \uba54\uc2dc\uc9d5 \uc2dc\uc2a4\ud15c, Mediator \ud328\ud134\uc744 \uc0ac\uc6a9\ud55c ViewModel \uac04 \ud1b5\uc2e0 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/atmokpo.com\/w\/42917\/","og_locale":"ko_KR","og_type":"article","og_title":"[MVVM] 7.MVVM\uc5d0\uc11c\uc758 ViewModel \uac04 \ud1b5\uc2e0\uacfc \uba54\uc2dc\uc9d5 \uc2dc\uc2a4\ud15c, Mediator \ud328\ud134\uc744 \uc0ac\uc6a9\ud55c ViewModel \uac04 \ud1b5\uc2e0 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","og_description":"7. MVVM\uc5d0\uc11c\uc758 ViewModel \uac04 \ud1b5\uc2e0\uacfc \uba54\uc2dc\uc9d5 \uc2dc\uc2a4\ud15c, Mediator \ud328\ud134\uc744 \uc0ac\uc6a9\ud55c ViewModel \uac04 \ud1b5\uc2e0 MVVM (Model-View-ViewModel) \ud328\ud134\uc740 WPF (Windows Presentation Foundation) \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc5d0\uc11c \ub110\ub9ac \uc0ac\uc6a9\ub418\ub294 \ub514\uc790\uc778 \ud328\ud134\uc785\ub2c8\ub2e4. MVVM\uc758 \uc8fc\uc694 \ubaa9\uc801\uc740 UI\uc640 \ube44\uc988\ub2c8\uc2a4 \ub85c\uc9c1\uc758 \ubd84\ub9ac\ub97c \ud1b5\ud574 \uc720\uc9c0\ubcf4\uc218\uc131\uacfc \uc7ac\uc0ac\uc6a9\uc131\uc744 \ub192\uc774\ub294 \uac83\uc785\ub2c8\ub2e4. \uc774 \ud328\ud134\uc5d0\uc11c ViewModel\uc740 View\uc640 Model \uac04\uc758 \uc911\uc7ac\uc790 \uc5ed\ud560\uc744 \ud558\uba70 \ub370\uc774\ud130 \ubc14\uc778\ub529\uc744 \ud1b5\ud574 UI\ub97c \uc5c5\ub370\uc774\ud2b8\ud569\ub2c8\ub2e4. \uadf8\ub7ec\ub098 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc774 \ubcf5\uc7a1\ud574\uc9d0\uc5d0 \ub530\ub77c &hellip; \ub354 \ubcf4\uae30 \"[MVVM] 7.MVVM\uc5d0\uc11c\uc758 ViewModel \uac04 \ud1b5\uc2e0\uacfc \uba54\uc2dc\uc9d5 \uc2dc\uc2a4\ud15c, Mediator \ud328\ud134\uc744 \uc0ac\uc6a9\ud55c ViewModel \uac04 \ud1b5\uc2e0\"","og_url":"https:\/\/atmokpo.com\/w\/42917\/","og_site_name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","article_published_time":"2024-11-13T22:28:13+00:00","article_modified_time":"2024-11-26T06:34:27+00:00","author":"root","twitter_card":"summary_large_image","twitter_creator":"@bebubo4","twitter_site":"@bebubo4","twitter_misc":{"\uae00\uc4f4\uc774":"root","\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04":"1\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/atmokpo.com\/w\/42917\/#article","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/42917\/"},"author":{"name":"root","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7"},"headline":"[MVVM] 7.MVVM\uc5d0\uc11c\uc758 ViewModel \uac04 \ud1b5\uc2e0\uacfc \uba54\uc2dc\uc9d5 \uc2dc\uc2a4\ud15c, Mediator \ud328\ud134\uc744 \uc0ac\uc6a9\ud55c ViewModel \uac04 \ud1b5\uc2e0","datePublished":"2024-11-13T22:28:13+00:00","dateModified":"2024-11-26T06:34:27+00:00","mainEntityOfPage":{"@id":"https:\/\/atmokpo.com\/w\/42917\/"},"wordCount":83,"publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"articleSection":["WPF \uac1c\ubc1c"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/atmokpo.com\/w\/42917\/","url":"https:\/\/atmokpo.com\/w\/42917\/","name":"[MVVM] 7.MVVM\uc5d0\uc11c\uc758 ViewModel \uac04 \ud1b5\uc2e0\uacfc \uba54\uc2dc\uc9d5 \uc2dc\uc2a4\ud15c, Mediator \ud328\ud134\uc744 \uc0ac\uc6a9\ud55c ViewModel \uac04 \ud1b5\uc2e0 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/#website"},"datePublished":"2024-11-13T22:28:13+00:00","dateModified":"2024-11-26T06:34:27+00:00","breadcrumb":{"@id":"https:\/\/atmokpo.com\/w\/42917\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/atmokpo.com\/w\/42917\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/atmokpo.com\/w\/42917\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\ud648","item":"https:\/\/atmokpo.com\/w\/en\/"},{"@type":"ListItem","position":2,"name":"[MVVM] 7.MVVM\uc5d0\uc11c\uc758 ViewModel \uac04 \ud1b5\uc2e0\uacfc \uba54\uc2dc\uc9d5 \uc2dc\uc2a4\ud15c, Mediator \ud328\ud134\uc744 \uc0ac\uc6a9\ud55c ViewModel \uac04 \ud1b5\uc2e0"}]},{"@type":"WebSite","@id":"https:\/\/atmokpo.com\/w\/#website","url":"https:\/\/atmokpo.com\/w\/","name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","description":"","publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/atmokpo.com\/w\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Organization","@id":"https:\/\/atmokpo.com\/w\/#organization","name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","url":"https:\/\/atmokpo.com\/w\/","logo":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/","url":"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png","contentUrl":"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png","width":400,"height":400,"caption":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8"},"image":{"@id":"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/bebubo4"]},{"@type":"Person","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7","name":"root","image":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g","caption":"root"},"sameAs":["http:\/\/atmokpo.com\/w"],"url":"https:\/\/atmokpo.com\/w\/author\/root\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/42917","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/comments?post=42917"}],"version-history":[{"count":1,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/42917\/revisions"}],"predecessor-version":[{"id":42918,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/42917\/revisions\/42918"}],"wp:attachment":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/media?parent=42917"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/categories?post=42917"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/tags?post=42917"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}