| Profile | |||
| Q | A | See | |
| Is AspectJS a component library or a framework? | It is a component library - most of its parts have no inter-dependencies at all, meaning that you can use as much or as little as you require (in contrast to frameworks, which tend to be monolithic with strong inter-dependencies). |
Q: How do you define component? Q: What if there is a name conflict with other libraries? Q: Will it work on non-browser platforms? Q: How permissive are the terms of sale? |
|
| Does it require me to design and implement systems in 'The AspectJS Way'? | No. AspectJS does not prescribe an approach to application design and implementation, and does not require you to abandon established and proven techniques in favour of some presumed 'better way'. The product's simple goal is to solve large classes of problem that are relatively intractable using conventional approaches. |
Q: Can I use it to augment the functionality of an existing...? Q: Can I use it alongside other libraries? Q: Why is Method-Call Interception useful? Q: Most of the supplementary components...? |
|
| Is it easy to use? | Yes, the core technology - the AJS object - supports just three methods of interest (the fourth simply returns the version number of the product). In the simplest case, you define an affix function, and then pass that, along with two other arguments, to one of those three methods. |
Q: Can I not just implement MCI myself? |
|
| Is it amenable to JavaScript novices? | Yes. Moreover, the tutorial was developed with that in mind. Just use a little of the product's capabilities at first, and move up from there when you have more confidence. |
Q: Does MCI foster good design? Q: Do you provide free technical support? |
|
| How scalable is it? | In principle, infinitely. While platform limits apply, there is no design-limit to the number of methods that can be intercepted, or to the number of affixes that can be attached to those methods. |
Q: Can I apply multiple affix-functions...? Q: Can I apply affixes to methods en masse...? |
|
| How reliable is it? | Very, if not completely. The self-test utilities that accompany AJS_Logger and aJS_DbC perform 52,681 separate tests, all of which use the AJS object. The product passes all of these. |
Q: Will it work on non-browser platforms? |
|
| How likely are the APIs to change in future? | Highly unlikely. The product's design and implementation is stable, mature and optimised, therefore no changes to its API are expected. |
Q: Can I publish a library of which AspectJS forms a part? Q: If I create an affix library...? |
|
| Application | |||
| Q | A | See | |
| Can I use it to augment the functionality of an existing or legacy code-base? | Yes, this is one of the product's intended applications. |
Q: Why is Method-Call Interception useful? Q: Can I not just implement MCI myself? Q: Can I apply affixes to methods en masse...? Q: Can I publish a library of which AspectJS forms a part? |
|
| Can I use it alongside other libraries? | Yes, the product is designed to minimise the potential for collision with other libraries, and to maximise the potential for co-operation with the same. |
Q: Why is Method-Call Interception useful? Q: Can I not just implement MCI myself?> Q: Can I apply affixes to methods en masse...? |
|
| What if there is a name conflict with other libraries? | The product is designed to allow this. In the event of a name conflict, you should rename the relevant AspectJS component to something else. You may also have to use the new name in a very few method-calls to other components (should you use them). None of this will affect functionality, which is to say that AspectJS has near-zero 'fragility'. | Q: How likely are the APIs to change in future? | |
| Will it work on non-browser platforms? | Yes. AspectJS will work on both server and client platforms, as well as in non web-based contexts. All it requires is an interpreter that is compliant with ECMAScript V3.0. |
Q: Is AspectJS a component library or a framework? |
|
| Security | |||
| Q | A | See | |
| Are there any undocumented methods? | No. Unlike many other libraries, AspectJS has no undocumented methods - the product is exactly as this site describes it, and conceals no 'back doors' through which it can be compromised. |
Q: How reliable is it? Q: How likely are the APIs to change in future? Q: Does AspectJS use the same terminology as AspectJ? |
|
| Does it make any potentially-insecure calls like 'eval' or 'document.write'? | No. | Q: How reliable is it? | |
| Is it possible to write code that tinkers with the inner data-structures that the product creates and maintains? | No. | Q: How reliable is it? | |
| MCI | |||
| Q | A | See | |
| Why is Method-Call Interception useful? | Method-Call Interception (MCI) allows the addition of functionality to methods without having to insert code into the body of those methods. This means that you can augment a system without having to perturb established, stable and working technology. In essence, it is a way of combining functionality while keeping it de-coupled. |
Q: Can I use it to augment the functionality of an existing...? Q: What is an 'affix' function? Q: Can I apply multiple affix-functions...? Q: If I create an affix library...? |
|
| Can I not just implement MCI myself? | You can, although you will have to contend with a number of significant challenges once you move beyond your simplest requirements. These challenges include being able to add multiple affixes to a given method, and, from there, managing such affix-sets. AspectJS resolves these and many other issues for you. | ||
| Why is the ability to add multiple affixes to a given method important? | It allows the augmentation of functionality with multiple factors. Without it, developers would have to conflate those factors into single affix-functions, thus reprising the very problem that prompted the use of MCI originally. The ability to add multiple affix-functions therefore allows those functions to do one thing alone, and independently of each other. This has huge benefits in terms of modularity, comprehension, re-use and testing. |
Q: How scalable is it?
Tutorial: Multiple Affixes Applications: On-Demand Loading - Logging the Application... |
|
| Does MCI foster good design? | Yes, being able to add functionality to methods without editing their code enables those methods to be designed and developed to do one thing and one thing alone. This aids modularity, comprehension, validation/verification and testing. | ||
| Does MCI foster code re-use? | Yes, the same affix function(s) can be used when intercepting different methods (in, potentially, different applications). |
Q: Can I use it to augment the functionality of an existing...? Q: Can I apply multiple affix-functions...? |
|
| Does MCI foster efficiency? | Yes, the re-use rather than replication of functionality means you need less code to do the same thing. In the context of the web, this means less bandwidth is required to transmit an application's code, and means that the code arrives faster. |
Q: Can I use it to augment the functionality of an existing...? Q: Can I use it alongside other libraries? |
|
| Does MCI aid Test-Driven Development (TDD)? | Yes. As the DbC adjuncts and AJS_Logger demonstrate, interface contracts can be policed rigorously through MCI. Moreover, the policing mechanism can be enabled and disabled trivially, thus expediting (de)implementation of a test regimen. Similar benefits arise, for the same reasons, from the ability to log method-calls using MCI. |
Q: What does aJS_DbC do? Q: Most of the supplementary components...? Q: What does AJS_Logger do? |
|
| Does this mean that 'affix libraries' are possible? | Yes, this is the nature of aJS_DbC and AJS_Logger. It is also the nature of the DbC adjuncts for the supplementary components in AspectJS. |
Q: Is it amenable to JavaScript novices? Q: Can I use it to augment the functionality of an existing...? Q: Can I apply affixes to methods en masse...? Q: What does aJS_DbC do? Q: What does AJS_Logger do? Q: Do you provide free technical support? Q: If I create an affix library...? |
|
| AOP | |||
| Q | A | See | |
| What is the connection/distinction between MCI and AOP? | MCI is simply the idea of intercepting method calls. AOP is the notion that we can reify the use of MCI into a well-defined approach to system design and development. |
Q: Why is Method-Call Interception useful? Q: Does MCI foster code re-use? Q: Does MCI foster efficiency? Q: Does MCI foster good design? |
|
| Isn't Aspect Orientation just a non-entity? | No. As an approach, Aspect Orientation is highly orthogonal, has demonstrable benefits, and unlike (for example) Object Orientation, can be defined rigorously. |
Q: Why is Method-Call Interception useful? Q: Does MCI foster code re-use? Q: Does MCI foster efficiency? Q: Does MCI foster good design? |
|
| Does AspectJS use the same terminology as AspectJ? | No, the only specific terms it uses are 'interceptee', 'affix' and 'wrapper'. Other than that it uses entirely conventional terms such as 'method' and 'object'. The only similarities are the 'addBefore' and 'addAfter' method-names, but these have a different meaning in AspectJS. |
Q: What is an 'affix' function? |
|
| Why does it not use the same terminology as AspectJ? | The terms that AspectJ establishes (such as 'advice', 'pointcut' etc) seem rather unintuitive or even counter-intuitive (at least to this developer). To invoke Occam's Razor, such terms seem unnecessary, given that the notion of 'affixing' something is an everyday concept. | ||
| Definitions | |||
| Q | A | See | |
| How do you define 'component'? | Any statically-defined object or function that performs a well defined role, with minimal dependencies on other objects/functions, and which can be used in a wide variety of contexts. | Q: Is AspectJS a component library or a framework? | |
| What distinguishes the 'core', 'adjunct' and 'supplementary' components? | The core technology is the AJS object, the adjuncts are aJS_DbC and AJS_Logger, and the supplementary components are simple, optional and stand-alone resources that can be used independently of each other, in combination with each other, and in combination with the core and adjunct components. |
Q: What does aJS_DbC do? |
|
| What is an 'affix' function? | An affix or affix-function is an ordinary function that may be an inner function or an object-method, and which executes either before and/or after an object method when that method is called. |
Q: Does this mean that 'affix libraries' are possible? |
|
| What is an 'interceptee'? | An interceptee is an object-method that possesses (or is about to possess) one or more affix functions. | ||
| What is an 'Affix' object? | It is an object that is generated by adding an affix function to a method, and which permits manipulation of that affix function. |
Q: Can I use it to augment the functionality of an existing...? |
|
| What is a 'Wrapper' object? | It is an object that contains a reference to an Affix object that corresponds to a prefix to a method, and a reference to an Affix object that corresponds to a suffix to that method. Wrappers are 'helper' objects that facilitate the collective manipulation of a prefix and suffix. | ||
| Use | |||
| Q | A | See | |
| How do I manipulate an affix function? | By calling the methods of its corresponding Affix object. |
Q: Is it possible to write code that tinkers...? |
|
| Can I apply multiple affix-functions to the same method? | Yes, an unlimited number of affixes can be applied to a given interceptee. |
Q: How scalable is it? |
|
| Can I change the execution order of multiple affixes? | Yes, simply call the promote or demote method of the Affix object(s) concerned. |
Q: Is it possible to write code that tinkers...? |
|
| Can I remove affixes? | Yes, just call the remove method of the Affix object that corresponds to the affix function concerned. | ||
| Can I set affixes to execute only a finite number of times? | Yes, by passing a value for the 'Execs' argument when you call one of the AJS-object's methods to add the affix to the interceptee. Alternatively, you can use the setExecs method of the corresponding Affix object(s). | ||
| Can I apply affixes to methods en masse using just a single call? | Yes, this is the role of 'findIn', the supplementary object-member locator function. |
Q: How scalable is it?
Object-Member Locator: Overview |
|
| Functions can have methods in the same way as 'conventional' objects, can I intercept calls to these too? | Yes. | ||
| Can I intercept calls to inner functions? | No. This is because inner functions are not members of a given object (even though they have 'membership' of their enclosing function's scope). | Tutorial: Inner Functions | |
| Can I intercept changes to 'value' objects? Eg. Can I detect a change to MyObj.SomeValue, where 'SomeValue' is a simple number? | No, the way that JavaScript works precludes this. To get the effect you seek you should change the value of 'SomeValue' only by calling a small function that makes the change for you (a 'mutator'). You can then intercept calls to that function. | ||
| Can I edit the code to make the AJS object a member of another object, so as to take it out of global scope? | Yes, the product is designed to allow this. |
Q: What if there is a name conflict with other libraries? Q: What if I simply embed the code in a trivial wrapper...? |
|
| Adjuncts | |||
| Q | A | See | |
| What does aJS_DbC do? | It is an optional function that, should you choose to use it, your code should call just once. That call puts an affix-based mechanism in place that will throw an exception whenever your (or someone else's) code makes a bad call to an AJS method. It is therefore an optional, powerful and invaluable aid to debugging that can be disabled trivially whenever you wish to lose the overheads it incurs. |
Q: How reliable is it? |
|
| Most of the supplementary components each have a 'DbC adjunct-function', what do they do? | They do the same thing for those components that aJS_DbC does for the AJS object - they put an affix-based mechanism in place that throws an exception whenever your (or somebody else's) code makes a bad call to the component in question. They are therefore an optional, powerful and invaluable aid to debugging that can be disabled trivially whenever you wish to lose the overheads they incur. |
Q: What does aJS_DbC do? |
|
| What does AJS_Logger do? | It is similar to aJS_DbC, and is an optional object that, when initialised, generates messages whenever your (or someone else's) code calls a method of the AJS object, or a method of an Affix or Wrapper object. It therefore enables developers to log the number, frequency and types of calls that their applications make to AspectJS components, and is an optional, powerful and invaluable aid to debugging and profiling. |
Q: What does aJS_DbC do? |
|
| Copyright | |||
| Q | A | See | |
| How permissive are the terms of sale? | Very. In essence, you can do what you want with the listings that you buy here, as long as you do not sell or give them away directly; and if you modify them substantially then you are on your own. Those are pretty reasonable terms. | Terms of Sale | |
| Can I publish a web-site/application that is implemented using all or part of AspectJS? | Yes, go for it. |
Q: Can I use it alongside other libraries? |
|
| Can I publish a library of which AspectJS forms a part? | Yes, as long as the bulk of your library is not the bulk (or greater) of the code that constitutes AspectJS. |
Q: Can I use it alongside other libraries? |
|
| What if I simply embed the code in a trivial wrapper, and then distribute that? | The terms preclude this because the bulk of your 'product' would be the bulk (or greater) of the code that constitutes AspectJS. | ||
| What if I change the code and/or function-signatures, and then distribute that directly? | You would have to change it a great deal in order to distinguish it from the genuine article. Moreover, doing so would create a non-optimal version of the product, which helps nobody. | Terms of Sale | |
| Support | |||
| Q | A | See | |
| If I create an affix library, will you include it in the AspectJS distribution set, and pay me a fair proportion of the revenues? | Yes, this benefits everybody (although it would depend on the nature and quality of your work). The best thing is to get in touch first to discuss your idea. | ||
| Do you provide free technical support? | Yes. Note that the more that customers/visitors pose questions and give feedback the better the product and this site will become. This benefits everybody. | Contact Form | |