If you are a user of Version 1.0 of AspectJS, you should be aware of the changes and improvements that Version 1.1 introduces, and which this page documents.
Do note that this page is temporary, and will not persist beyond June 2009, at the very latest. Given this, you should not create links to this page.
First, there is no AJS_HP object any longer (the 'high performance' version of the technology). This is because changes to the AJS object made it impracticable to extend and support that technology in tandem, and doing so would have negated the net benefit of giving developers a choice in this respect.
Furthermore, the addSymmetricWrapper function has been dropped. It was only ever a convenience that wrapped a call to addWrapper, and the AJS object now implements its functionality by using the arguments that describe the prefix as default arguments for the suffix, if arguments for the latter are omitted.
This simplifies a number of facets of the product, not least by ridding it of a method-name that was much too long.
The exception-swallowing policy imposed upon affix functions has also been rescinded.
The motivation for this originally was that interceptees and their callers should be utterly oblivious of the action of affixes. In practice, however, this proved to be troublesome because it required the use of call-backs to propagate exception notifications, and this created far greater complications.
Additionally, the order of the arguments that affix functions receive has changed.
The degree to which one debates such issues internally is surprising, and there is the ever-present fear that one has still got it wrong. For example, the static argument that is passed to affixes on their invocation could be dropped, which would simplify matters considerably. Were this change to be implemented, the role that the static argument performs could then be fulfilled by using an affix function that forms part of a closure.
However, such a technique is sufficiently advanced to dissuade inexperienced JavaScript developers from ever using AspectJS in important contexts. Moreover, that modus operadum would, at times, carry its own awkward complications, so it is likely that foisting it on developers would not be the best decision.
Version 1.0 allowed affix functions to remove themselves from their interceptees. While, ostensibly, this seems entirely reasonable, it was incorrect because it made it possible to confuse the affix dispatch-mechanism, and thereby constituted a bug.
Version 1.1 therefore disallows affix-self removal, thereby fixing the problem. This does not constitute a restriction, however, because an affix function can set its execution count to 1 when it executes, whereupon it will be removed automatically, as soon as it terminates. See the relevant section in the tutorial for more information on this.
Note that there was a similar problem in the Event Marshaller library, in that the earlier version allowed response functions to post new events to its marshaller while that object was dispatching its queue. This too is disallowed in the upgraded version. See the relevant section in that library's tutorial for more information on this.
Further to the changes covered above, the implementation of the AJS object has been re-factored radically to improve its robustness, efficiency and reliability.
Internally, Version 1.1 is now a considerably different and superior product that now gives no access to its inner workings, and is therefore impervious to inept, lazy or malicious developers.
This means that it is impossible now for client-code to tinker with the links etc that make up a given chain of affixes that are attached to a given interceptee.
The technology also supports a number of new features. There is now a full complement of affix getters and setters, along with the ability to suspend and resume the action of affixes while leaving them in place.
More substantial additions include the aJS_DbC function, which implements Version 1.0's rigorous but intrinsic argument-checking as extrinsic functionality, thus giving developers all the benefits of a Design by Contract approach when building a system, but none of its (substantial) overheads when deploying that system.
Similarly, AJS_Logger is a new component that enables developers to log their systems' use of AspectJS - a feature that, like the effects of aJS_DbC, can be enabled and disabled with a single statement.
Furthermore, the supplementary libraries' intrinsic argument-checking has also been re-implemented extrinsically, in the same manner as aJS_DbC.
Plans for future additions to the product include a general-purpose DbC component that will allow developers to use AspectJS to enforce argument and result checking on pretty much any method, although the precise details here have yet to be worked out.
A similar, general-purpose logging-component is also planned, which will allow the instrumentation of arbitrary methods; but again, the full details here have yet to come into focus.
What does seem certain is that neither of these components will be as challenging to develop as were aJS_DbC and AJS_Logger, which, speaking poetically, were nothing less than 'A Nightmare on Recursion Street'.
Additonal supplementary libraries are also planned that will complement AspectJS in the same fashion as the existing ones, while remaining compact, modular and independent from that resource (as the exisiting ones also are).
Whatever the case, however, potent upgrades will be available through 2009, and available to existing customers at a considerable discount, as stated on the Purchase page.