Implementation and AspectJ Explanation

AspectJ Explanation

What does implementation mean?

In software development, one speaks of implementation when it comes to converting a previously planned design into executable program code. Generally speaking, the word means nothing else than implementation, execution or implementation.

When it comes to implementation, the point is that a plan has been drawn up or a concept has been drawn up, which is now to be brought into a usable form with the means available. In software development in particular , this usually means that planned functionalities are implemented – regardless of whether they are individual functions and algorithms or the entire program.

If only individual functions (e.g. new functions for an existing software) are implemented, it is also part of the implementation that these functions are integrated into the existing program as planned. Furthermore, the term implementation can also mean that a certain program is the implementation of the associated specifications (“Program X is the implementation of specification X”).

Implementation in the software lifecycle

The life cycle of software begins with a problem, e.g. B. the desire to have a specific task solved by software. This is followed by the analysis of the problem, e.g. B. to find out the feasibility and the requirements. Then the requirements for the system are precisely defined; this is followed by the design of the system and components, e.g. B. of system architecture, algorithms or data model.

After all these steps, the preparation is complete and what has developed from the problem into concrete specifications can be implemented. This is followed by the test phase and commissioning. In the event of errors, change requests or additional requirements, the cycle always runs through the analysis and design phases before it finally comes to implementation.

Implementation of hardware and systems

In other areas of IT, implementation is also used when the task at hand is to put something previously planned into practice. It can e.g. For example, it is also about installing and commissioning hardware according to previously developed guidelines or setting up a network according to specifications.

Implementation can also be used when implementing protocols or when realizing more complex IT systems. Here, too, it is always planned first how exactly the requirements from the problem can be met. The implementation then turns these approaches into reality.

What is AspectJ?

AspectJ is a seamlessly integrable extension for Java to enable aspect-oriented programming. It was developed in the Xerox Palo Alto Research Center and is available as a stand-alone program and for the Eclipse IDE.

AspectJ is an open source project, which expands Java with functionalities for aspect-oriented programming ( AOP ). More precisely, the Java module extends the use and convenient handling of aspects that play a central role for the AOP. A separate compiler is also part of the extension. In addition, AspectJ can also be used in combination with other frameworks such as the Spring Framework for aspect-oriented programming.

Develop with aspects

Aspect-oriented programming focuses on cross-cutting concerns: the developer designs his software in such a way that related functionalities are implemented as so-called aspects. One aspect contains all functionalities from all layers of the software that are required for a specific task, e.g. B. for the authentication of users or for logging. When programming aspects with AspectJ, a combination of AspectJ-specific commands and conventional Java code is formulated.

Join points and point cuts in AspectJ

Join points can be used to determine how and where the aspects are integrated into the program, e.g. B. when a method is called or a variable is referenced. A set of join points is called a point cut. AspectJ also offers an implementation of these principles and can therefore select point cuts in order to access specific join points.

Control processes with advice

With Advice, AspectJ offers a dynamic possibility to control exactly which tasks should take place at which point in time at the interweaving points of the respective point cut. The developer can control the point in time in three steps: before, around and after. Advice with the time before is executed as soon as the specified join point has been reached, but before the join point is dealt with. Advice with the time around is carried out when the join point is reached and provides control over when the program should continue with the join point. And advice with the time after is carried out after the join point has been reached and the functionality it contains has been carried out.

AspectJ compiler

The module has its own compiler or Aspect Weaver, which converts the AspectJ-specific instructions into bytecode and merges them with the rest of the Java code.

AspectJ Explanation