title: Differences between Proxy and Decorator Pattern
body: <p>Can you give any good explanation what is the difference between <em>Proxy</em> and <em>Decorator</em>?</p>
  
  <p>The main difference I see is that when we assume that <em>Proxy</em> uses <em>composition</em> and <em>Decorator</em> uses <em>aggregation</em> then it seems to be clear that by using multiple (one or more) <em>Decorators</em> you can modify/ add functionalities to pre-existing instance (decorate), whereas <em>Proxy</em> has own inner instance of proxied class and delegates to it adding some additional features (proxy behaviour).</p>
  
  <p>The question is - Does <em>Proxy</em> created with aggregation is still <em>Proxy</em> or rather <em>Decorator</em>? Is it allowed (by definition in GoF patterns) to create <em>Proxy</em> with aggregation?</p>