Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
article

Cooperative aspect-oriented programming

Published: 01 March 2009 Publication History

Abstract

Aspect-oriented programming (AOP) seeks to improve software modularity via the separation of cross-cutting concerns. AOP proponents often advocate a development strategy where programmers write the main application (base code), ignoring cross-cutting concerns, and then aspect programmers, domain experts in their specific concerns, weave in the logic for these more specialized cross-cutting concerns. This purely oblivious strategy, however, has empirically been shown to tightly couple aspects to base code in many cases, hindering aspect modularity and reuse. In essence, the more intricate the weaving between the cross-cutting concern and the base code (lexically and/or semantically), the harder it becomes to: (a) robustly specify how to weave the aspects in at the required points, (b) capture interactions between aspects and base code, and (c) preserve the correct weaving as the base code evolves. We propose an alternate methodology, termed cooperative aspect-oriented programming (Co-AOP), where complete lexical separation of concerns is not taken as an absolute requirement. Instead, cross-cutting concerns are explicitly modeled as abstract interfaces through explicit join points (EJPs). Programmers specify where these interfaces interact with base code either through explicit lexical references or via traditional oblivious aspects. This explicit awareness allows base code and aspects to cooperate in ways that were previously not possible: arbitrary blocks of code can be advised, advice can be explicitly parameterized, base code can guide aspects in where to apply advice, and aspects can statically enforce new constraints upon the base code that they advise. These new techniques allow aspect modularity and program safety to increase, and bring us towards a cooperative AOP paradigm. We illustrate our methodology via an example on transactions, and also give an initial evaluation of cooperative AOP through an empirical study on program extensibility comparing both the traditional and cooperative AOP methodologies. Initial results show that cooperative AOP techniques result in code that is less complex with lower overall coupling, facilitating extensibility.

References

[1]
abc Project, abc. The AspectBench Compiler. http://aspectbench.org
[2]
Aldrich, J., Open modules: Modular reasoning about advice. In: ECOOP¿05,
[3]
Avgustinov, P., Christensen, A.S., Hendren, L., Kuzins, S., Lhoták, J., Lhoták, O., de Moor, O., Sereni, D., Sittampalam, G. and Tibble, J., abc: An extensible AspectJ compiler. Transactions on Aspect-Oriented Software Development. v1. 293-334.
[4]
Beck, K., . In: Computer, vol. 32. IEEE Computer Society Press.
[5]
Bonér, J., AspectWerkz¿Dynamic AOP for Java. In: AOSD¿04,
[6]
L. Bussard, Towards a pragmatic composition model of CORBA services based on AspectJ, in: Workshop on Aspects and Dimensions of Concerns of ECOOP¿02, 2000
[7]
Butler, M., Hoare, T. and Ferreira, C., Communicating sequential processes. In: Lecture Notes in Computer Science, vol. 3525/2005. Springer. pp. 133-150.
[8]
Cacho, N., Sant¿Anna, C., Figueiredo, E., Garcia, A., Batista, T. and Lucena, C., Composing design patterns: A scalability study of aspect-oriented programming. In: AOSD¿06,
[9]
M. Ceccato, P. Tonella, Measuring the effects of software aspectization, in: 1st Workshop on Aspect Reverse Engineering, Delft, The Netherlands, 2004
[10]
Chidamber, S. and Kemerer, C., A metrics suite for object oriented design. IEEE Transactions on Software Engineering. v20 i6. 476-493.
[11]
Clifton, C., Leavens, G. and Obliviousness, modular reasoning and the behavioral subtyping analogy. In: SPLAT¿03,
[12]
Colyer, A., Towards widespread adoption of AOSD. In: AOSD¿03,
[13]
Fetzer, C., Hogstedt, K. and Felber, P., Automatic detection and masking of nonatomic exception handling. IEEE Transactions on Software Engineering. v30 i8. 547-560.
[14]
Filho, F.C., Cacho, N., Figueiredo, E., Maranhao, R., Garcia, A. and Rubira, C.M.F., Exceptions and aspects: The devil is in the details. In: FSE¿06,
[15]
Filman, R. and Friedman, D., Aspect-Oriented Programming is Quantification and Obliviousness. 2005. Addison-Wesley.
[16]
Fuad, M., Deb, D. and Oudshoorn, M., Adding self-healing capabilities into legacy object oriented application. In: ICAS¿06,
[17]
Gamma, E., Helm, R., Johnson, R. and Vlissides, J., Design Patterns: Elements of Reusable Object-Oriented Software. 1995. Addison-Wesley Longman Publishing Co. Inc., Boston, MA, USA.
[18]
Garcia, A., Sant¿Anna, C., Chavez, C., da Silva, V.T., de Lucena, C. and von Staa, A., Software Engineering for Multi-Agent Systems II. 2004. Springer.
[19]
Garcia, A., Sant¿Anna, C., Figueiredo, E., Kulesza, U., Lucena, C. and von Staa, A., Modularizing design patterns with aspects: A quantitative study. In: AOSD¿05,
[20]
Ghosh, S., France, R.B., Simmonds, D.M., Bare, A., Kamalakar, B., Shankar, R.P., Tandon, G., Vile, P. and Yin, S., A middleware transparent approach to developing distributed applications. Software: Practice and Experience. v35 i12. 1131-1154.
[21]
Goldman, S., Detlefs, D., Dever, S. and Russell, K., New compiler optimizations in the Java HotSpot virtual machine. In: JavaOne 2006,
[22]
Gosling, J., Joy, B., Steele, G. and Bracha, G., Java Language Specification. 2005. 3rd ed. Addison-Wesley.
[23]
Gosling, J., Joy, B., Steele, G. and Bracha, G., Java Language Specification. 2005. 3rd ed. Addison-Wesley Professional.
[24]
Greenwood, P., Bartolomei, T., Figueiredo, E., Dosea, M., Garcia, A., Cacho, N., Sant¿Anna, C., Soares, S., Borba, P., Kulesza, U. and Rashid, A., On the impact of aspectual decompositions on design stability: An empirical study. In: ECOOP¿07,
[25]
Griswold, W., Sullivan, K., Song, W., Shonle, M., Tewari, N., Cai, Y. and Rajan, H., Modular software design with crosscutting interfaces. IEEE Software. v23 i1. 51-60.
[26]
S. Gudmundson, G. Kiczales, Addressing practical software development issues in AspectJ with a pointcut interface, in: Workshop on Advanced Separation of Concerns of ECOOP¿01, 2001
[27]
T. Harris, Exceptions and side-effects in atomic blocks, Science of Computer Programming 58 (3)
[28]
K. Hoffman, P. Eugster, EJP extension to the AspectBench Compiler. http://www.cs.purdue.edu/homes/kjhoffma/
[29]
Hoffman, K. and Eugster, P., Bridging Java and AspectJ through explicit join points. In: PPPJ¿07,
[30]
Hoffman, K. and Eugster, P., Towards reusable components with aspects: An empirical study on modularity and obliviousness. In: ICSE¿08,
[31]
IBM, BEA Systems, Microsoft, Arjuna, Hitachi, IONA, Web Services Transactions Specifications, 2005
[32]
Java Pet Store. https://blueprints.dev.java.net/petstore/
[33]
Kiczales, G., Hilsdale, E., Hugunin, J., Kersten, M., Palm, J. and Griswold, W., An overview of AspectJ. In: ECOOP¿01,
[34]
Kiczales, G., Lamping, J., Menhdhekar, A., Maeda, C., Lopes, C., Loingtier, J.-M. and Irwin, J., Aspect-oriented programming. In: ECOOP¿97,
[35]
Kiczales, G. and Mezini, M., Aspect-oriented programming and modular reasoning. In: ICSE¿05,
[36]
Kienzle, J. and Guerraoui, R., AOP: Does it make sense? The case of concurrency and failures. In: ECOOP¿02,
[37]
S. Kuzins, Efficient implementation of around-advice for the AspectBench compiler, Master's Thesis, Oxford University, 2004
[38]
Laddad, R., AspectJ in action: Practical aspect-oriented programming. In: Manning, pp. 356-390.
[39]
Parnas, D.L., On the criteria to be used in decomposing systems into modules. Communications of the ACM. v15 i12. 1053-1058.
[40]
Prehofer, C., Feature-oriented programming: A fresh look at objects. In: ECOOP¿97,
[41]
Rajan, H. and Sullivan, K., Classpects: Unifying aspect- and object-oriented language design. In: ICSE¿05,
[42]
C. SantAnna, A. Garcia, C. Chavez, C. Lucena, A. von Staa, On the reuse and maintenance of Aspect-oriented software: An assessment framework, in: 17th Brazilian Symposium on Software Engineering, 2003
[43]
Smaragdakis, Y. and Batory, D., Mixin layers: An object-oriented implementation technique for refinements and collaboration-based designs. ACM Transactions on Software Engineering and Methodology. v11 i2. 215-255.
[44]
M. Stochmialek, Aopmetrics. http://aopmetrics.tigris.org/
[45]
Stoerzer, M. and Graf, J., Using pointcut delta analysis to support evolution of aspect-oriented software. In: ICSM¿05,
[46]
Sullivan, K., Griswold, W.G., Song, Y., Cai, Y., Shonle, M., Tewari, N. and Rajan, H., Information hiding interfaces for aspect-oriented design. In: FSE¿05,
[47]
Tarr, P.L. and Sutton Jr., S.M, Programming heterogeneous transactions for software development environments. In: ICSE¿93,
[48]
Tonella, P. and Ceccato, M., Refactoring the aspectizable interfaces: An empirical assessment. IEEE Transactions on Software Engineering. v31 i10. 819-832.
[49]
Zhang, C. and Jacobsen, H.-A., Quantifying aspects in middleware platforms. In: AOSD¿03,
[50]
Zhao, J., Measuring coupling in Aspect-oriented systems. In: METRICS¿04,

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

Publisher

Elsevier North-Holland, Inc.

United States

Publication History

Published: 01 March 2009

Author Tags

  1. Aspect-oriented programming
  2. Extensibility
  3. Join point
  4. Modularity

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 16 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2018)An empirical study on the impact of AspectJ on software evolvabilityEmpirical Software Engineering10.1007/s10664-017-9580-723:4(2018-2050)Online publication date: 1-Aug-2018
  • (2017)RAMBUTANSInternational Journal on Software Tools for Technology Transfer (STTT)10.1007/s10009-016-0432-319:6(743-761)Online publication date: 1-Nov-2017
  • (2014)Event-based modularizationProceedings of the 13th workshop on Foundations of aspect-oriented languages10.1145/2588548.2588549(7-12)Online publication date: 22-Apr-2014
  • (2013)Trading obliviousness for modularity with cooperative aspect-oriented programmingACM Transactions on Software Engineering and Methodology (TOSEM)10.1145/2491509.249151622:3(1-46)Online publication date: 30-Jul-2013
  • (2010)PicOS tuplesProceedings of the 7th International Workshop on Model-Based Methodologies for Pervasive and Embedded Software10.1145/1865875.1865883(53-60)Online publication date: 20-Sep-2010

View Options

View options

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media