A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.aspectjs.com/ below:

AspectJS

AspectJS is distributed as a zip file, the contents of which are itemised in the second table you see here, and comprises four principal components.

These comprise the AJS object, which implements the basic method-call-interception mechanism, and three client-resources that use the services of that object. While it is entirely possible to use the AJS object directly, the clients automate its use in the implementation of techniques that, otherwise, would require a mass of proprietary code on your part.

The nature of those clients is as follows:

Note that the use of a given client does not require a good understanding of the AJS object, nor does independent use of that object require an understanding of its clients.

Note too that the AJS and AJS_Validator objects make no use of native or host types, nor does AJS_Logger unless you use the 'default stream', which relies only upon the console object. This means that all those elements of the product will run on any platform, not just web browsers (AJS_ODL is, by definition, a browser-related component).

Auxiliaries: Definition-Object Management

The three clients conform to a common model, in that their operation pivots on the concept of user-defined 'definition objects', which for AJS_Validator, AJS_Logger and AJS_ODL are dubbed 'ValidationDefs', 'LogDefs' and 'LoadDefs' respectively.

Definition objects act as 'instruction packets' that guide the operation of a given AJS-client, and all the clients need to manage such packets in exactly the same way. Given this, a component that forms an auxiliary to the clients is provided in the form of AJS_DefMgr, which implements that common management-functionality in a single place.

You need not understand the use of AJS_DefMgr when working with the clients – just follow the very simple instructions in the relevant user-guide – but do be aware that the behaviour of definition queues etc. is common to all the clients. Given this, the documentation pertaining to that behaviour is carried in the Overview page for AJS_DefMgr, which avoids repetition in the client user-guides, and which you are advised to read before doing anything substantive with a given client.

Note also that you do not need to use AJS_DefMgr at all if you are working with the AJS object directly.

Auxiliaries: Exception Management

The clients also delegate exception management to a discrete handler that, from their point of view, is a simple call-back function reference that you must provide at the point of instantiation, and which they call whenever an exceptional condition has arisen, instead of simply throwing an exception natively themselves.

This indirection permits arbitrary, user-defined behaviour when a problem arises. You may, for example, wish that an exception object be thrown with an informative message, a detailed stack analysis and, critically, information that indicates the location of the trouble within the application, rather than the location at which it was detected. Alternatively, you may wish to deploy an application where such notifications are piped back to you from client to server rather than being reported to your user.

Given this, AspectJS furnishes you with two other auxiliary components, in the form of ThrowException.js and ThrowExeption_Remote.js, which implement exactly the functionality described above. If you wish to see a sample of the kind of exception notifications you receive when using either of these two resources, see the Exception Notification Gallery in the AJS_Validator user-guide. Like AJS_DefMgr, these are free-standing components that you can use independently from all other elements of AspectJS, and do note here that the delegation of exception management allows you to use proprietary exception-handler implementations of your own.

Note that, as with AJS_DefMgr, you do not need to use the stock exception-managers if you are working with the AJS object directly.

Note also that the exception-management indirection that the clients support allows you to link the functionality of AJS_Validator and AJS_Logger together to yield an equivalent to the cockpit voice recorders that modern aircraft carry. This idea is explored in depth on the Client Synergy page.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4