Documentation
dcl is a micro library written in JavaScript for node.js
and modern browsers that implements OOP with mixins + AOP at both “class” and
object level.
Getting started
- Installation - super-simple ways to install
dcl - Tutorial - hands-on with
dcl - Cheatsheet - look up common operations
Module documentation
- mini.js - minimal
dclkernel, you might want to use it on browsers to conserve bandwidth- dcl() - the composition engine
- dcl.superCall() - super call decorator
- dcl.js - full
dclkernel that includes chaining control and AOP support- dcl.advise() - general advice decorator
- dcl.chainBefore() - “before” chaining directive
- dcl.chainAfter() - “after” chaining directive
- advise.js - object-level AOP with dynamic advisement
- advise() - general advice directive
- inherited.js - dynamic super calls without decorators
- inherited() - super call
- debug.js - error-checking and introspection facility
- dclDebug.log() - log information of classes and objects
Library documentation
dcl comes with a small library of useful advices, mixins, and base classes:
- Advices - various debugging, cache, and AOP helpers
- Bases - constructor helpers
- Mixins - life-cycle helpers
Advanced topics
- Decorator - explains the concept of decorators, and how they are used in
dcl - Supercalls in JS - discussion of different methods to do supercalls in JavaScript,
their pros and cons, and what was selected for
dcland why - Constructors - desigining robust mixin-aware constructors
- Multi-stage construction - implementing multi-stage construction
- Destructors - destructing objects and freeing its resources is a serious business
- OOP and JS - discussion of advanced OOP, its deficiencies, and ways to overcome its problems
- OOP in JS slides - my presentation at
ClubAjax partially based on the blog post above;
dclwas introduced as an experiment to create a balanced OOP + AOP package, which helps leverage mixin-based techniques
