|
26 - Aspect Oriented Programming
Students are invited to participate to the following seminar:
TITLE: Migrating Object Oriented Code to Aspect Oriented Programming
SPEAKER: Mariano Ceccato
DATE: December 15, 2006 at 2:00:00 PM LOCATION: Room 20 - Faculty of Science - Povo
Software systems are so complex that they can not be developed without dividing them into sub-modules. The main drawback in this approach is that there are some system functionalities that can not be assigned to a single module in the system decomposition. Examples of functionalities that suffer this problem are persistence, error management and logging. Since the code fragments that implement these concerns are spread across many units, they are called Crosscutting Concerns. Crosscutting concerns violate the modularization goal that a system is decomposed into small independent parts: their main characteristic is that they are transversal with respect to the units in the principal decomposition, i.e., their implementation consists of a set of code fragments distributed over a number of units. Reasoning about crosscutting concerns can be quite difficult, because it requires to deal with a lot of modules at the same time, in that there is no modularization support for them. For example, to deal with the persistence functionality, we have to understand all the pieces of code that perform persistent storage and retrieval. Crosscutting concerns are sources of problems, because their modification requires that all code portions where such a functionality is implemented be located (problem: scattering) and that all ripple effects associated with the changes be determined (problem: tangling). Aspect Oriented Programming (AOP) aims at solving the two main problems of crosscutting concerns, namely scattering and tangling, by providing a unique place where the related functionalities are implemented. A new modularization unit, called aspect, can be defined to factor out all code fragments related to a common functionality, otherwise spread all over the system. For example, an application can be developed according to its main logical decomposition, while the possibility to serialize and de-serialize some of its objects can be defined in a separate aspect. |
|