My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
Getting_Started  
Getting started and an overview of the live global object
Phase-Deploy, Phase-Implementation
Updated Oct 1, 2011 by felk...@gmail.com

Getting Started

The first thing you'll need to do is download the source code. Once you have this, include the Javascript and CSS dependencies in the head of your web document.

<!-- LIVE CSS-->
<link rel="stylesheet" href="/path_to_css/live.css" type="text/css" />

<!-- LIVE JS-->
<script type="text/javascript" src="/path_to_js/framework.js"></script>
<script type="text/javascript" src="/path_to_js/live.js"></script>

Instantiating the Global Object

Now that you have the dependencies included, you'll need to instantiate the live global object. This is done by adding the following script block to the head of the web document.

<script type="text/javascript">

    window.live = new live();

</script>

window.live

live is a global, self-contained umbrella object that encapsulates all of the UI's functionality.

As you can see, we assigned the newly created live object as a property of the window object. This ensures that the live object will always have a global scope and can be found easy when looking at objects in a Javascript debugging tool such as FireBug.

Upon runtime, live will begin to construct the rest of the underlying UI library. In addition, live will set up a few useful tools of it's own.

If you are interested in the live global object and what it does, please read the details

Common Library Practices

All libraries configurable, extensible, and object-oriented. Every time a library instantiated, it will only and always accept a single parameter: an library-specific object. No more remembering parameter orders or type. Below is a basic example:

   my_new_tabs = new Tabs({
      container: 'tab-container'
   });

live Bound Libraries

Some libraries are bound to the live global object because they do not need to be re-instantiated once run-time execution happens.

These include:

  • Canopy - Overlay
  • Modal - Modal dialog window with overlay
  • LiveForm - Form management & validation
  • Loader - Loading dialog with overlay
  • KeyCode - Interprets user key codes and key values
  • Time - A time utility

Globally Bound Libraries

The majority of live's libraries have the potential of being used one or more times during or after initial runtime. The libraries are globally bound so they to do not bloat the global object.

These include:

Powered by Google Project Hosting