title: ExtJS - How to use Proxy, Model? How are they related?
body: <p>I've been trying to learn to work with Models and Stores. But the proxy bit is confusing me a lot. So I'm going to list out my understanding here - please point out the gaps in my understanding.</p>
  
  <h2>My understanding</h2>
  
  <ol>
  <li>Models are used to represent domain objects.</li>
  <li>Models can be created by ModelManager, or by simply using the constructor</li>
  <li>Models are saved in Stores</li>
  <li>Stores may be in memory stores, or can be server stores. This is configured using Proxy.</li>
  <li>Proxy tells the store how to talk to a backing store - be that a JSON array, or a REST resource, or a simply configured URL via ajax.</li>
  <li>Stores are responsible for storing models, and Proxies are responsible for controlling/helping with that task.</li>
  <li>When a model's values are changed, its <code>dirty</code> flag gets set. It gets automatically cleared when the model is saved. (more in this later)</li>
  </ol>
  
  <h2>The part that confuses me</h2>
  
  <ol>
  <li>Why is there a <code>proxy</code> config and <code>save</code> method on Model? I understand that models can only be stored on to stores.</li>
  <li>Why is the <code>dirty</code> flag not cleared simply when I add a model object to a store?</li>
  <li>When I add a model object to a store, why does the model not acquire the proxy configured with that store?</li>
  <li><code>proxy</code> is a static configuration for a Model. Does that mean that we cannot use objects of a particular model with multiple data sources? By extension, does this mean having multiple stores for a single model essentially useless?</li>
  <li>When we define a Store, are we defining a class (store-type, if we may call it that), or is it an <em>instance</em> of a store? Reason I ask is when we declare a grid, we simply pass it a store config as <code>store: 'MyApp.store.MyStore'</code> - does the grid <em>instantiate a grid of that type</em>, or is it simply using the store we've already instantiated?</li>
  </ol>
  
  <p>Thanks!</p>
  
  <p>PS: +50 bounty to the person who explains all this :) - will offer bounty after those 48 hours are over..</p>