Core.JS

Core JavaScript Framework FAQ

Q: Can CoreJS be used with other JavaScript libraries, e.g., Prototype, Dojo, etc.?
A: Generally speaking, yes. It should work with any framework that does not modify the prototype of the "Object" object in such a way that non-standard properties are encountered during iteration. That is, it could fail if in an environment where the following code displayed an alert:

for (var x in {}) { alert "THIS IS BAD."; }

Q: Does CoreJS modify the prototypes of any built-in JavaScript objects?

Download

Core JS does not yet have a released version, but it is available from Subversion. The JS files are also provided in Echo3 downloads.

Source Code Repository

The latest Core JS source code is available from the Subversion repositories. Please note that builds checked out from Subversion will likely be less stable than released versions.

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.

Shared Prototype

The JavaScript Inheritance Problem

JavaScript is an object-oriented language, but several of its design characteristics are significantly different from common modern object-oriented languages, like Java or C#. The key issue is JavaScript's "prototype-based inheritance" where a class is derived from an instance of an object, state and all, rather than from a base class.

JavaScript Literals

The following offers a brief introduction to JavaScript's literal syntax for defining objects and arrays. This has been included for programmers who might be fairly new to JavaScript programming and have not previously seen this syntax.

Object Literals

A literal syntax exists in JavaScript for object definition. The following code...

var foo = new Object();

foo.alpha = 90;

foo.bravo = function() {
   return 7;
};

...can be represented as...

var foo = {

    alpha: 90,

    bravo: function() {
       return 7;
  

Developer's Guide

This guide provides an introduction to using the Core JavaScript Framework (CoreJS). The Core JavaScript Framework is divided up into multiple modules. The "Core Library" provides fundamental low-level capabilities, such as the ability to create and extend objects in JavaScript using classical inheritance. The "Web Library" provides web-specific features, such as the cross-platform CSS rendering and DOM manipulation.

Syndicate content