DCL

An elegant OOP with mixins + AOP for JavaScript.

dcl added to jam

dcl was added to jam — the RequireJS-based package manager for front-end projects. If you use jam to manage your project dependencies, you can install dcl like this:

1
jam install dcl

Micro update: 1.0.2

New update was pushed out. Changes:

  • Some instances of new Function were replaced with function(){} to bypass Content Security Policy restrictions, because new Function even without any parameters is considered to be eval (???), and forces to allow eval globally.

This update doesn’t affect any functionality, and can be safely skipped, if you don’t work with security-constrained environments.

Inroduction to dcl

David Walsh has asked me to do a guest blog post. When I offered him to write about dcl, he agreed, and here we go: Introduction to dcl.

If you don’t read David’s blog regularly, and you are serious about web applications, you are missing out. He frequently publishes very interesting articles on JavaScript, CSS, new development in browsers, and so on. Check out his tutorials, demos, and in-depth articles. Get yourself in the know.

1.0.1 is out

1.0.1 is a minor update. This version has following changes:

  • Added getInherited() as an alias for inherited.get() to simplify its use. Now there is no need to use call() or apply() to specify its instance.
  • Added tests for dcl exceptions.
  • Added tests for canned advices and mixins.
  • Changed export names for <script> inclusion.
  • Error messages are better formatted.
  • Minor clean up, better comments, documentation updates.

So far dcl has proved to be fairly stable, no major bugs were found. Almost all changes in 1.0.1 are backward-compatible, and upgrading to it should be transparent.

The only non-compatible change is export names with <script> tags, which are not recommended anyway – when in browser please use an AMD loader like RequireJS.

1.0 is public

Finally after months of private use 1.0 version of dcl is out in the open.

What is dcl? It is a micro library for OOP/AOP. It works in node.js and modern browsers, supports AMD, and completely open source.