Aspect-oriented Programming - Join Point Models

Join Point Models

The advice-related component of an aspect-oriented language defines a join point model (JPM). A JPM defines three things:

  1. When the advice can run. These are called join points because they are points in a running program where additional behavior can be usefully joined. A join point needs to be addressable and understandable by an ordinary programmer to be useful. It should also be stable across inconsequential program changes in order for an aspect to be stable across such changes. Many AOP implementations support method executions and field references as join points.
  2. A way to specify (or quantify) join points, called pointcuts. Pointcuts determine whether a given join point matches. Most useful pointcut languages use a syntax like the base language (for example, AspectJ uses Java signatures) and allow reuse through naming and combination.
  3. A means of specifying code to run at a join point. AspectJ calls this advice, and can run it before, after, and around join points. Some implementations also support things like defining a method in an aspect on another class.

Join-point models can be compared based on the join points exposed, how join points are specified, the operations permitted at the join points, and the structural enhancements that can be expressed.

Read more about this topic:  Aspect-oriented Programming

Famous quotes containing the words join, point and/or models:

    Each man, if he attempts to join himself to others, is on all sides cramped and diminished of his proportion; and the stricter the union, the smaller and the more pitiful he is. But leave him alone, to recognize in every hour and place the secret soul, he will go up and down doing the works of a true member, and, to the astonishment of all, the work will be done with concert, though no man spoke.
    Ralph Waldo Emerson (1803–1882)

    Consider a man riding a bicycle. Whoever he is, we can say three things about him. We know he got on the bicycle and started to move. We know that at some point he will stop and get off. Most important of all, we know that if at any point between the beginning and the end of his journey he stops moving and does not get off the bicycle he will fall off it. That is a metaphor for the journey through life of any living thing, and I think of any society of living things.
    William Golding (b. 1911)

    Friends broaden our horizons. They serve as new models with whom we can identify. They allow us to be ourselves—and accept us that way. They enhance our self-esteem because they think we’re okay, because we matter to them. And because they matter to us—for various reasons, at various levels of intensity—they enrich the quality of our emotional life.
    Judith Viorst (20th century)