title: Javascript - how to define class factory as Extjs style?
body: <p>I am trying to create a <code>Extjs</code> style object-oriented UI library for my project, but didn't know how to declare the class structure.</p>
  
  <p>I need to create instance of the UI object in following style:</p>
  
  <pre><code>var Corejs = {}; // the top object of my library,
  // var Corejs = function() {}; // or maybe should put it this way,
  window.$C = Corejs;
  // here should define a `Panel` class, that belong to Corejs in some format,
  var aPanel = $C.create('Corejs.Panel', {width: '200px', height:'100px'});
  </code></pre>
  
  <p>Can anyone help me to add the lines that define the <code>Panel</code> class, so  that I could create its instance in the way shows above.</p>