title: Clarification and naming convention for Model and ViewModel in MVVM
body: <p>I'm confused in what should be a model or a view model and how should these be named.</p>
  
  <p>For simplicity sake, I'll leave the <code>INotifyPropertyChange</code> out of it.</p>
  
  <p>The following class is clearly a model:</p>
  
  <pre><code>class CountryModel
  {
      public string Name { get; set; }
      public string Location { get; set; }
  }
  </code></pre>
  
  <p>What you mostly see on the web is that a view model would be defined as follows:</p>
  
  <pre><code>class CountryViewModel
  {
      public CountryViewModel
      {
          // initialize data (not ideal place, I know, but keeping it simple!)
      }
  
      public ObservableCollection&lt;CountryModel&gt; Countries
      {
          private get;
          set;
      }
  }
  </code></pre>
  
  <p>Why isn't the above a model of <code>Countries</code>, i.e. <code>CountriesModel</code>, for example? Why is it considered a view model?</p>
  
  <p>Should that technically be the case? Should we have another class for the view model, then?</p>
  
  <pre><code>class CountryViewModel
  {
      private ObservableCollection&lt;CountryModel&gt; _countries = new ....;
  
      public CountryViewModel
      {
  
      }
  
      public ObservableCollection&lt;CountryModel&gt; Countries
      {
          private get { return _countries ?? _countries = LoadCountries(); }
          set { _countries = value; }
      }
  
      private ObservableCollection&lt;CountryModel&gt; LoadCountries()
      {
          ObservableCollection&lt;CountryModel&gt; countries = new ...;
          foreach (CountryModel country in CountriesModel)
          {
             countries.add(country);
          }
          return countries;
      }
  }
  </code></pre>
  
  <p>Is the above making sense? I just don't understand why it seems to be a standard and why you would call <code>CountriesViewModel</code> when to me it should be <code>CountriesModel</code> and a <code>CountryViewModel</code> should be created accessing the data from the <code>CountriesModel</code>.</p>
  
  <p>Also, if you stick to what's on the web, i.e. <code>CountryModel</code> and <code>CountryViewModel</code> that contains an observable collection of <code>CountryModel</code>, then how would you deal with countries containing each a list of cities? I would have a <code>CityModel</code> as a POCO and then for the list of cities, I would create a <code>CityViewModel</code> having an observable collection of <code>CityModel</code>.</p>
  
  <p>But then what? Am I supposed to make the <code>CityViewModel</code> part of my <code>CountryModel</code>? That doesn't seem right at all! Maybe it is and someone could clarify that. This is where I get confused even more as I would have created a <code>CountryModel</code> with properties <code>Name</code>, <code>Location</code> and a property of type <code>List&lt;CityModel&gt;</code>, but how do I represent this correctly in MVVM?</p>
  
  <p>How to define this correctly? Especially the part where you have a list of objects and each of those objects contains another list. Which is a model, a view model and how do I handle the list inside my model?</p>