An advice can run before , after , or around aspect-oriented programming
William G. Griswold,Macneil Shonle,Kevin Sullivan,Yuanyuan Song,Nishit Tewari,Yuanfang Cai
2005-01-01
Abstract:ureElement class hierarchy named moveBy or whose names start with set. The advice updates a graphical display after any such call completes. We’ve devised a practical design approach that can significantly improve the modularity of programs written using AspectJ-style AOP. Our approach employs crosscut programming interfaces, or XPIs. XPIs are explicit, abstract interfaces that decouple aspects from details of advised code.3 Without limiting the possibilities for AO advising or requiring new programming languages or mechanisms, our approach better modularizes aspects and advised code. It allows for their separate and parallel evolution and produces a better correspondence between programs and designs. The problem Our approach emerged from an experiment using common AOP methods to improve the design of HyperCast,4 a 300-class, 50,000-LOC Java system for multicast overlay networks. The common approach for developing aspects is to write PCDs directly against the implementations of the code to be advised. Some AOP methodologists even argue that designers should be able to write programs without knowing aspect modules’ actual or potential integration, a goal called obliviousness.5 This idea has found currency in the practitioner-oriented press.6 We found that such approaches led to programs that were unnecessarily hard to develop, understand, and change. First, our designers had to inspect all the code to identify the relevant join points for the PCDs to encompass. Second, these join points weren’t exposed consistently, so we needed complex PCDs and advice Modular Software Design with Crosscutting Interfaces