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 893387
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T14:12:46+00:00 2026-05-15T14:12:46+00:00

I am currently designing a new .NET application and would like to keep it

  • 0

I am currently designing a new .NET application and would like to keep it UI independant.

Whilst I initally would like to use WPF, I would like to have the option of swapping the UI to ASP or WinForms if necessary.

In a layered design:

View – Interface Controller (ViewModel) – Model – Persistance

is it possible to design the Interface Controller so that it will work with different view technologies, or will I need to replace the interface controller at the same time as the View?

  • 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-05-15T14:12:47+00:00Added an answer on May 15, 2026 at 2:12 pm

    Take a look at my answer to the question “Silverlight with MVVM Inheritance: ModelView and View matching the Model”.

    The answer I gave works for your situation too.

    In a nutshell, I define the following general interfaces:

    public interface IModel
    {
    }
    
    public interface IViewModel
    {
    }
    
    public interface IViewModel<M> : IViewModel
        where M : IModel
    {
        void Bind(M model);
    }
    
    public interface IView
    {
    }
    
    public interface IView<VM> : IView
        where VM : IViewModel
    {
        void Bind(VM viewModel);
    }
    

    Which allow me to define specific interfaces like this:

    public interface IPersonModel : IModel
    {
    }
    
    public interface IPersonViewModel : IViewModel<IPersonModel>
    {
    }
    
    public interface IPersonView : IView<IPersonViewModel>
    {
    }
    

    By implementing your layers against these interfaces you can swap your implementation of the IView<VM> interface with WPF, Silverlight, Windows Forms or even ASP.Net.

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

Sidebar

Related Questions

I am creating a new web service for an application and am currently designing
I am currently designing a native android application. I am planning to use jQuery
I'm currently about to start designing a new application. The application will allow a
I'm currently designing a brand new database. In school, we always learned to put
Currently I am designing a new website and I want to plan it properly.
I am currently designing a Membership/Profile scheme for a new project I am working
I'm currently designing an application which I will ultimately want to move to Windows
I'm designing some new class diagrams for extending an existing office automation application. In
I am designing a standard ASP.Net site with a SQL database. I have a
I'm currently designing a small website and I'd like to implement the forgot your

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.