title: jQuery Applications Pattern / Architecture
body: <p>im looking best practices for jQuery application architecture.</p>
  
  <p>This sample is working, but i think this is not a best way.</p>
  
  <p>We have Kernel function (loads config, init sub-modules etc.) and Tabs dub-module as sample.</p>
  
  <pre><code>"use strict";
  (function($, app, window) {
  
      app.kernel = function() {
          var self = this;
          app.tabs().init(); // init tabs sub-module
          return self;
      };
  
      app.tabs = function() {
          var self = this;
          self.init = function() {
              console.log('tabs function init');
          };
          return self;
  
      };
  
  })(jQuery, window.SuperPuper || (window.SuperPuper = {}), window);
  
  $(function() {
      new SuperPuper.kernel();
  });
  </code></pre>
  
  <p>Founded some materials for:</p>
  
  <ol>
  <li><a href="http://alexsexton.com/blog/2010/02/using-inheritance-patterns-to-organize-large-jquery-applications/" rel="nofollow">Using Inheritance Patterns to Organize Large jQuery Applications</a></li>
  <li><a href="http://www.intelligiblebabble.com/how-to-write-maintainable-jquery-applications/" rel="nofollow">How To Write Maintainable jQuery Applications</a></li>
  </ol>