locked
MVVM pattern in WCF RRS feed

  • Question

  • I wanted to create Console application containing MVVM pattern implemented and consuming WCF serice. Can anybody provide me some links explaining MVVM pattern implementation in general and consuming WCF service in MVVM. thanks in advance.

    Sunday, March 11, 2012 5:59 PM

Answers

  • On 3/14/2012 6:12 AM, _Sanika wrote:
    > Yeah I know. Thanks for the update. Cal i have MVC as an client and
    > apply MVVM in that?
     
    MVC is for Web UI based solutions, MVVM is for WPF/Silverlight UI based
    solutions and MVP is for Windows UI and ASP.NET UI based solutions,
    which the purpose of the patterns are to separate business logic or the
    model logic from the UI.
     
    What you would need for a non-UI based solution like a Console
    application would be Service Layer that would sit between the Console
    client and the WCF service. The Service Layer would consume the WCF
    service and is actually the client to the WCF service, and the Console
    application would call methods in the Service layer that called methods
    in the WCF service.
     
    • Marked as answer by Yi-Lun Luo Friday, March 16, 2012 9:29 AM
    Wednesday, March 14, 2012 7:03 PM

All replies

  • Below is few good starting point 

    http://mvvmlight.codeplex.com/

    http://msdn.microsoft.com/en-us/magazine/dd419663.aspx

    http://mvvmfoundation.codeplex.com/


    Tanvir Huda Application Architect/Consultant

    Monday, March 12, 2012 2:05 AM
  • Hello, Tanvir has provided some resources about MVVM. But note MVVM is a pure client side design pattern. You cannot use it across client and server. For example, you can define a view model on the client side, create a view on the client side. But you can't define a view model on the server side, and create a view on the client side. In addition, console applications usually do not have views. MVVM is usually used in UI applications, such as Silverlight and JavaScript.

    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
    If you have feedback about forum business, please contact msdnmg@microsoft.com. But please do not ask technical questions in the email.

    Monday, March 12, 2012 12:00 PM
  • Yeah I know. Thanks for the update. Cal i have MVC as an client and apply MVVM in that?
    Wednesday, March 14, 2012 10:12 AM
  • On 3/14/2012 6:12 AM, _Sanika wrote:
    > Yeah I know. Thanks for the update. Cal i have MVC as an client and
    > apply MVVM in that?
     
    MVC is for Web UI based solutions, MVVM is for WPF/Silverlight UI based
    solutions and MVP is for Windows UI and ASP.NET UI based solutions,
    which the purpose of the patterns are to separate business logic or the
    model logic from the UI.
     
    What you would need for a non-UI based solution like a Console
    application would be Service Layer that would sit between the Console
    client and the WCF service. The Service Layer would consume the WCF
    service and is actually the client to the WCF service, and the Console
    application would call methods in the Service layer that called methods
    in the WCF service.
     
    • Marked as answer by Yi-Lun Luo Friday, March 16, 2012 9:29 AM
    Wednesday, March 14, 2012 7:03 PM