Core JavaScript Framework

The Core JavaScript Framework or "CoreJS" is a client-side JavaScript library which provides tools for creating object-oriented and event-driven JavaScript code. It is used by the Echo3 Framework but is not in any way dependent upon it (CoreJS is designed be used independently).

Additionally, CoreJS is packaged with the CoreDoc tool, which works similarly to JavaDoc to generate API specifications from embedded comments in JavaScript code. It features the ability to parse classes defined using CoreJS' Core.extend() architecture.

CoreJS' JavaScript framework consists of two JavaScript files:

  • Core.js provides fundamental JavaScript core langauge extensions, including:
    • Core.extend() method of declaring JavaScript classes using classical object-based (rather than prototype-based) inheritance. Supports reservation of internal variable names in classes, abstract properties and their verification in concrete class declarations, and virtual/final modifiers, again verified at declaration time.
    • Method wrapper to enable invocation of specific methods of object instances (e.g., in response to events).
    • Array manipulation utilities.
    • Memory-efficient wrapper for large / frequently modified associative arrays (in order to work around specific substantial Internet Explorer memory leaks).
  • Core.Web.js provides web/browser-specific extensions, including:
    • Cross-platform DOM manipulation utilities.
    • Cross-platform calculation of rendered element size and position.
    • Cross-platform XMLHttpRequest object.
    • Cross-platform DOM event registration.
    • EventProcessor mechanism to enable capturing and bubbling event listener registration in all browsers, including Internet Explorer (which does not natively support capturing listeners).
    • Browser detection and query-able browser quirk flags.
    • Capability to dynamically retrieve and install JavaScript modules.
    • Virtual positioning library to enable efficient four-sided CSS positioning in Internet Explorer 6.
    • Object-oriented task scheduling (higher level API wrapping window.setTimeout/Interval() methods.

The fundamental "Core.js" library may be used without "Core.Web.js" if desired. The libraries are contained entirely within a single namespace, "Core". The libraries DO NOT modify the prototypes of any built in JavaScript objects.