Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9195059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T21:33:09+00:00 2026-06-17T21:33:09+00:00

I am writing an application using WPF and the MVVM design pattern (I’m new

  • 0

I am writing an application using WPF and the MVVM design pattern (I’m new to the MVVM pattern too). This application manages and keeps track of films the user has watched. It also needs to contact external websites in order to download metadata for films. I’m doing this by using .NET TMDb and Rotten Tomatoes libraries.

Currently, I have a Movie class in the Models folder and that class contains all the properties of a film and the methods and logic required to set up the TMDb/RT library, search for matching results, and then download all the metadata. However, this is making my Movie class quite a bit more cluttered and heavy than what I think it should be.

Does it make more sense to move the methods and logic for accessing the third party APIs to the MovieViewModel or even another class altogether? How simple should the Model classes be?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T21:33:10+00:00Added an answer on June 17, 2026 at 9:33 pm

    How simple should the Model classes be?

    Usually, POCO-simple. It’s safe to think of model layer as of domain-objects definition + business logic. Domain objects will usually be simply data holders (like mentioned POCO classes) while business logic is anything that’s needed to perform your application’s requested functionality (data retrieval, persistence, communication with other APIs and so forth).

    ViewModel is glue that binds it all together and feeds to view.

    Does it make more sense to move the methods and logic for accessing the third party APIs to the MovieViewModel or even another class altogether?

    Yes. For the sake of separation of concerns, testability or generally not cluttering view model layer (model classes can be easily reused in view model when implemented correctly [POCO-correctly that is]).

    Also, consider separating your model even further:

    Model.Entities -- POCO domain objects
    Model.Contract -- interfaces for your business logic
    Model.*        -- concrete implementations of above
    

    This has multiple advantages:

    • Your entities (domain objects) are not mixed up with data access layer (which tends to be common abuse). As a result, it’s very easy to replace data layer or add new database support,
    • Entities assembly is easily reusable in other projects due to its simplicity (remember, POCOs only),
    • View models need to know about entities and contracts assemblies only – they stay clean and once again it’s easy to replace/reuse implementations,
    • Your project will stay loosely coupled, modular and flexible.

    Overall, minor mistakes (or casual laziness) when designing/implementing model layer will snowball terribly at later stages of the project. Pulling entire DAL to VM, linking 3rd party API assemblies to VM (“because the slipped with model code”), impossibility to write unit tests are all outcome of poor layers design. As a result, instead of reusable view models you end up unmaintainable monsters which everybody’s afraid to touch.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a WPF application using the MVVM pattern, based on the following article:
I'm writing an application in WPF using the MVVM-pattern and will really often use
I'm writing an application in WPF using the MVVM pattern. In my application I've
I'm writing a WPF application using a MVVM pattern and using Prism in selected
I'm very new to WPF and am writing an application using this example as
I'm writing a WPF application while mostly adhering to the MVVM design pattern. The
I am writing an application using the MVVM pattern. I am providing data to
I am writing an application using WPF, MVVM, and PRISM regions. I have two
I'm currently learning how to write a WPF application using the MVVM pattern. I'm
I am developing a WPF application using the MVVM pattern as described by Josh

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.