< documentation

app/boot/ 1.0.x

usage

Booting your application is an simple, and really just an extension of the jQuery document ready event handler making use of the $.boot

The only thing you need to focus on with a boot strapping process is selecting your environment, triggering the boot process, and optionally include any additional setup steps that are required for your application.

options

In general there may be no difference between a client.js and server.js boot file, but generally we know from experience that there are different environmental setting we have to have for each, so the convention has kept it easy enough to help us remember where we are working. (It can be easy to forget you are working with jquery-claypool!)

  • client.js
    If your doing your server side development with jquery.claypool, you'll want to check this out too.
  • server.js
    If your doing your server side development with jquery.claypool, you'll want to check this out too.

examples

The general structure of a boot file, client or server is usually like the following:


jQuery.noConflict();
(function($)&#x7B;
    
    //A static logger for any initialization routines we might add here
    var log = $.logger("Site");
    
    //Select an environment
    //The environments are described in environments.js
    try&#x7B;
       $.env('defaults', "dev.server");
       //$.env('defaults', "appengine.server");
       
    }catch(e)&#x7B;
       log.error("Environmental selection is invalid!").exception(e);
    }
    
    $(document).ready(function()&#x7B;
        log.info("Initializing Application");
        $.boot(function()&#x7B;
          //you can do additional initialization here
            log.info("Successfully Initialized Application");
            //preload all application data
            $.$('#docsModel').get();
            $.$('#releasesModel').get();
            $.$('#newsModel').get();
            $.$('#eventsModel').get();
            $.$('#examplesModel').get();
            log.info("Successfully Preloaded Caches");
        });
    });    
    
})(jQuery);  

app/boot/ releases

Project

Guides

This guide is applicable to both the jquery-claypool client and server application frameworks. Where the two differ functionally the documentation will provide notes and examples of usage in each environment.