title: Where Do You Store Data in a GUI Application?
body: <p>I've always heard that you should separate GUI/Data/Logic components, like the MVC pattern.
  So, I am wondering: In a GUI application, where do you actually store the data?</p>
  
  <p>Here is an example (using C# terminology):<br />
  Suppose you have a GUI that takes user input, does some analysis, and displays results in a table.<br /> The user can have several analyses in one window, so there is a ListView at the bottom that allows the user to select which analysis is currently displayed (the selected item gets displayed).</p>
  
  <p>In order to display this, the analysis data must be stored somewhere.<br /> I have always done one of two things:<br /></p>
  
  <ol>
  <li>Put all the data into a single object and store it in the ListViewItem's "Tag" property</li>
  <li>Extend "ListViewItem" and just add whatever properties I need.</li>
  </ol>
  
  <p>But, this means I am storing the data inside of the ListViewItem.
  Is there a more appropriate place to keep track of the data?</p>
  
  <p>I could add it as private members to the main form, but that seems like the same thing.
  The only other thing I can think of is to make some global class that I can reference whenver I need to.</p>
  
  <p>Thanks.</p>