does aspect oriented programming increase the development
play

Does Aspect-Oriented Programming Increase the Development Speed for - PDF document

Does Aspect-Oriented Programming Increase the Development Speed for Crosscutting Code? An Empirical Study Stefan Hanenberg, Sebastian Kleinschmager, Manuel Josupeit-Walter University of Duisburg-Essen 45117 Essen, Germany


  1. Does Aspect-Oriented Programming Increase the Development Speed for Crosscutting Code? An Empirical Study Stefan Hanenberg, Sebastian Kleinschmager, Manuel Josupeit-Walter University of Duisburg-Essen 45117 Essen, Germany stefan.hanenberg@icb.uni-due.de sebastian.kleinschmager@stud.uni-due.de manuel.josupeit-walter@stud.uni-duisburg-essen.de aspect-oriented techniques increases the development Abstract time or whether developers already benefit from aspect-orientation by a reduced development time. Aspect-oriented software development is an However, knowledge about benefits and possible approach which addresses the construction of software risks of aspect-orientation with respect to development artifacts that traditional software engineering time is necessary not only for the academic world but constructs fail to modularize: the so-called also for the software industry. From a software crosscutting concerns. However, although aspect- manager’s point of view knowledge about opportunities orientation claims to permit a better modularization of and risks is necessary in order to decide whether crosscutting concerns, it is still not clear whether the aspect-orientation should be applied either in general development time for such crosscutting concerns is or to solve a given crosscutting problem. increased or decreased by the application of aspect- A first step into that direction is to concentrate only oriented techniques. This paper addresses this issue by on those pure programming tasks aspect-orientation an experiment which compares the development times was built up for: the specification of code fragments of crosscutting concerns using traditional composition that would crosscut other modules if specified using techniques and aspect-oriented composition techniques traditional composition techniques. In case aspect- using the object-oriented programming language Java orientation turns out to reduce the pure coding time it and the aspect-oriented programming language strengthens the argument to use aspect-orientation (if it AspectJ. In that way, the experiment reveals is assumed that the maintainability costs are also opportunities and risks caused by aspect-oriented reduced). In case it turns out to increase the coding programming techniques in comparison to object- time, it needs to be considered whether the (expected) oriented ones. benefit in the maintainability phase is larger than the costs caused by additional coding time. However, it is 1. Introduction unclear how the application of aspect-oriented constructs influences the development time on the A typical argument for aspect-oriented software programming level. development (AOSD, [4]) is that aspects permit a This paper introduces an experiment conducted on better modularization of code that crosscuts other 20 subjects that studies the influence of aspect-oriented modules (see [10]): code which is caused by so-called programming language constructs on the development crosscutting concerns. Such arguments focus on the time of crosscutting concerns which was originally the readability and maintainability of software constructed main focus of aspect-oriented programming (see [10]). from the aspect-oriented approach (see further [22]). Section 2 motivates such a study by discussing While there are studies available that seem to possible pros and cons of aspect-oriented programming support that aspect-orientation possibly improves constructs. Section 3 introduces the experiment by maintainability (see for example [5]), it is still not clear describing the experimental design and its execution. what costs are caused by aspect-oriented programming Section 4 analyses the experiment by providing techniques: it is not clear whether the application of

  2. descriptive data and then performing significance tests. crosscutting code. Further issues such as readability or After discussing related work in section 5, section 6 maintainability of the code are not considered. discusses and concludes the paper. 3. Experiment Design 2. Motivation 3.1. Research Question One example for aspect-oriented techniques that is quite often cited in literature is logging (c.f. [4] among Our intention is to identify whether (and when) the many others): invocations to the logger need to appear application of aspect-oriented programming turns out in a large number of modules. Furthermore, the pieces to have a positive impact on the development time. We of code to be specified need to be adapted within each assume that the application of aspect-oriented module in order to pass for example the method name techniques turns out to be time saving for a large or the actual parameters. Without using techniques that number of code clones caused by a crosscutting permit to program the logging behavior, hand coding concern. For a rather small number of code clones we such a feature possibly requires a large amount of expect that the development speed decreases. Hence, development time and causes in that way additional we assume that developers using aspect-oriented development costs. From that point of view it seems techniques require more time for solving a clear that aspect-oriented programming techniques programming tasks if the aspect is applied to rather few significantly decrease the development time. places in the code. From a different perspective, one can argue that The intention of the experiment is to approximate aspect-oriented programming brings additional the number of code places at which the application of abstractions and therefore additional complexity into aspect-oriented constructs turns out to be useful. the development of software (cf. e.g. [20]). Such Therefore we defined an experiment where subjects additional complexity reduces the development speed performed the same programming tasks using an in such a way that the possible advantage of the object-oriented and an aspect-oriented programming technology turns out to be rather a burden for the language. We used Java as a representative of an developer and rather increases the development time. object-oriented (OO) language and AspectJ (see [12]) Although both arguments seem to be reasonable as a representative of an aspect-oriented (AO) they contradict each other. From the scientific point of language. view this situation is not satisfactory, because both arguments rely on speculations. According to the 3.2. Programming Tasks appeal formulated in [21] empirical methods (cf. [8, 19, 24]) are an approach to address this problem. This Within the experiment subjects were asked to write would permit to strengthen (or weaken) arguments crosscutting code into a target application. As a target based on observed data. This is the chosen approach of application, we used a small game consisting of 9 this paper. classes within 3 packages with 110 methods, 8 The here described experiment relies on constructors, and 37 instance variables written in pure crosscutting code which does not require any dynamic Java (version 1.6). Each class was specified in its own condition fulfilled at runtime in order to determine file. The game consists of a small graphical user whether it should be executed. Spoken in aspect- interface with an underlying model-view-controller oriented terms, we study only aspects with underlying architecture. static join points (cf. e.g. [7]). Although the main focus Using this application, nine tasks needed to be done, of research in the area of aspect-oriented programming each one in pure Java (version 1.6) as well as AspectJ language constructs is in the area of dynamic constructs (version 1.6.1) whereby the order of the programming (cf. e.g. [6, 15]) we reduce our view on aspect- language was randomly chosen. We have chosen orientation to static elements because static join points programming tasks according to the following criteria: can be unambiguously determined, i.e. it can be clearly stated where and how they appear in the code. � The programming tasks should be in the domain Furthermore, by reducing the question to static join that AspectJ is designed for. Hence, the points we reduce the number of different solutions programming tasks should not represent provided by the subjects in the experiment. crosscutting whose modularization cannot be The experiment’s intention is to study the impact of achieved by AspectJ. aspect-oriented techniques on the development time for

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend