Goon 1.0 Released Today

Goon is a JavaScript tool for DOM-based on-demand script loading

Features

  • Independent
    Goon is a selfcontained script, no external library needed
  • Short
    Goon is less than 2 KB (packed)
  • Rigorous
    Goon guarantees that required scripts are executed before the requiring script is executed
  • Clean
    Goon is tree oriented. Each gooned script is a node: if it’s not required by another node, then it’s a root, and if it’s not requiring any node, then it’s a leaf. Loading goes from root to leaves, while execution goes the other way around.
  • Easy
    Goon’s nodes are calls to the Goon() function, nodes’ results are available as entries of the goon repository, and the last tree’s result by means of the goony shortcut
  • Elegant
    Goon provides a simple environment, where a node can access imported results by means of this, and export its own results by means of return
  • Flexible
    Goon can load the same node many times in the same tree and its behavior can be tailored by specifying how each script is required: in link mode, in exec mode, or in redo mode
  • Flexible
    Goon’s nodes can be used as roots for their subtrees, without any modification, simply by loading them directly from a page
  • Flexible
    Gooned pages can load all the needed trees, each with its own root, and they can be completely independent or grafted
  • Flexible
    Goon’s loading trees can be transplanted between hosts, for example from localhost to a deployment host, by changing the query string used for loading Goon itself

Files

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.