Site Map

Lexical and Coding Conventions

Language keywords, along with class-/object-/file-names are rendered in a bold, mono-spaced font throughout this site.

Wherever you see the word 'Object', it means something that can be generated by means of a call to JavaScript's Object constructor, or which can be instantiated thus:

   var MyObj = { };

However, where you see the term 'object' (lower-case 'O', no typographic emphasis), it means an object in the orthogonal, computer-science sense of a 'typed area of storage'. The term can be taken in this case to mean everything from a lowly boolean to an array or complex user-defined object, irrespective of its actual 'class' within the JavaScript programming language.

At any point in this site, where you encounter terms such as 'Bool' 'Str' or 'Num', you should take these to mean 'Boolean', 'String' and 'Number' respectively, in the sense of the native classes that ECMAScript defines. These abbreviations are used in order to reduce verbiage.

All HTML-relevant examples assume the following DOCTYPE:

   <!DOCTYPE html>

...And all JS code-samples assume the presence of the 'use strict' directive at the local or higher scope in question.

Cookies

Where cookies are enabled, this site sets a single, first-party cookie on your machine, with the sole intent of generating useful visitation-statistics.

In gathering gathering such data, Dodeca Technologies Ltd. remains unable to identify you personally, nor, as far as the law allows, will the company share any visitation information it acquires with third parties. It follows that Dodeca's use of cookies on this site does not constitute an invasion of your privacy, and you should note also that all popular web-browsers allow you to permit only selected sites to set cookies on your machine.

General

Overview

Principal Components
Auxiliaries: Definition-Object Management
Auxiliaries: Exception Management
Dog-Food Consumption
Test Suite
ECMAScript Proxies
Defects and Inaccuracies
Copyright

Client
Synergy

Introduction
The Ideal
Principle
Custom-Stream Anatomy
Reporting Method-Return Values
Taking it Further

Site Map

Lexical and Coding Conventions
Cookies

Acquire

Purchase Process
Contact

Design by Contract – AJS_Validator

Motivation

Constraining Type, Value and State
Conditional Clutter
Special Comments
Hungarian Notation
Elidable Logic
The Case for Method-Call Interception
AJS_Validator Defined
Easier Library-Management
Better Documentation
Better Design
Non-DbC Benefits

Starting
Out

Introduction
Importing AJS_Validator
ValidationDefs
ValidationDef Maintenance
AJS_Validator Exceptions
Enabling/Disabling AJS_Validator

ValidationDefs

Applying ValidationDefs
ValidationDef Queues
ValidationDef Immutability
Multiple ValidationDefs
Allowing Method-Owner Changes
Suspension and Resumption
ValidationDefCtrls

ArgDefs
and
RtnDefs

Disallowing Arguments
ArgDefs
RtnDefs
Disallowing Value/Reference Return
Arg-/Rtn-Def Re-Use

Simple
Constraints

The NeverUndefined Property
The NeverNull Property
Never-Negative/-Zero/-Positive/-Fractional
The MaxVal and MinVal Properties
The MaxLen and MinLen Properties
The RegExp Property
Never-Extensible/-NotSealed/-NotFrozen

Classes

Specifying Classes
The AllowClasses Property
Host Class-Names
The DisallowClasses Property

Tags

Overview
The ApplyTag Property
Native AJS_Validator Tags
Tags and Method-Owner Names
Tags and Object-Inextensibility
Preventing-Extensions, Sealing and Freezing
The AllowTags Property
The DisallowTags Property

Validation
Model

Overview
Validation Model
Property Concurrence and Collisions

Pre- and
Post-Validators

Overview
preValidators and postValidators
Processing Order
Pre-/Post-Validator Examples
Pre-/Post-Validators and Exceptions
External Validators
Pre-/Post-Validators and Suspension/Resumption
Factory Methods
ValidationDefCtrl Management
Pre-/Post-Validators and Argument Injection/Mutation

Ancillary Methods

Overview
Ancillaries Profile
Using the Ancillaries
Exception Notifications
Ancillaries Exceptions and Stack-Offsets
Internal Chaining
Return Values
The isConformant... Methods
Testing for Uniqueness

API

Objects/Types
ValidationDef-Property Collisions
Release History

Method-Call Instrumentation – AJS_Logger

Motivation

Instrumenting Method Calls
Clutter
Conditional Comments
Using a Logging-Object
AJS_Logger

Starting
Out

Introduction
Importing AJS_Logger
LogDefs
Validating AJS_Logger Method-Calls
Enabling/Disabling AJS_Logger

Applying
LogDefs

Applying LogDefs
LogDef Queues
Suspension and Resumption
LogDefs and Constructors

Streams

Streams
Stream-Object Anatomy
Buffering Streams
Enhanced Streams
XHR/WebSocket Streams
Multiple LogDefs

Pre- and
Post-Loggers

Pre- and Post-Loggers
Pre-/Post-Logger Example
Pre-/Post-Loggers and Suspension/Resumption
Factory Methods

API

Objects/Types
Release History

On-Demand Loading – AJS_ODL

Motivation

Redundant Retrieval
Loading on Demand
Clutter
Compounding the Overhead
Using a Loading Manager
The Case for Method-Call Interception

Starting
Out

Introduction
Importing AJS_ODL
LoadDefs
The Attributes Property
Event Handlers
Applying LoadDefs
LoadDef Queues
Multiple LoadDefs
LoadDef Expiry
Validating AJS_ODL Method-Calls

Loading
Methods

AUDIO/VIDEO
EMBED
IFRAME
IMG
LINK
OBJECT
SCRIPT
XHR
XHR Queueing and Dispatch

Caveats

Browser and Event-Handling
Script-Tag Hack Drawbacks
Concurrency
Security

API

Objects/Types
Release History

Method-Call Interception – AJS Object

Motivation

Manipulating Function References
The Challenge of Scaling
The AJS Object

Starting
Out

Introduction
Importing the AJS Object
Applying Prefixes
Applying Suffixes
Applying Wrappers
Symmetric Wrappers
Using Inline Affix-Function Definitions
Validating AJS Method-Calls
Interception Candidates
Intercepting Inner Functions and Call-Backs
Intercepting Constructors

Arguments
and
Returns

Passing Arguments to Interceptees
Interceptee Return-Values
Interceptees and Exceptions
Affixes and Exceptions
Interceptee Arguments and Affixes
Interceptee Return-Values and Suffixes
Argument Mutation/Injection

Affix- and
Wrapper-Ctrls

AffixCtrl Objects
WrapperCtrl Objects
Affix Suspension and Resumption
Removing Affixes
AffixCtrl Life-Cycle
Getting/Setting Affix Functions

Multiple
Affixes

Adding Multiple Affixes
Using addBefore/addAfter
Adding Affixes through WrapperCtrls
Using Interceptee Methods
Multiple Prefix-Function Signatures
Multiple Suffix-Function Signatures
Iterating across Affix Sets
Execution Cardinality
Promoting and Demoting Affixes
Combining Auto-Addition/-Removal

Advanced
Issues

Manipulating Method References
Freezing Method-Owners
Freezing Methods
Freezing AffixCtrl Objects
Function Properties

API

Objects/Types
Release History

Definition-Object Management – AJS_DefMgr

Overview

Motivation
Direct Application
Queued Application
Queue Dynamics
No Method-Name Validation
Applying Definition Objects to Constructors

User
Guide

Introduction
AJS_DefMgr Defined
Creating a Definition Manager
Definition Manager Methods
Method Arguments
Call-Back Arguments

API

Objects/Types
Release History

Exception Handling

API Objects/Type
Release History

Minification

Minification

Introduction
Semantic Equivalence
Controlling the Renaming Policy
Pre-Processing

Published

Published

Transparency on Demand
Link Me A Closure