AOP-Driven Variability in Software Product Lines Vander Alves, Ayla Dantas, and Paulo Borba Informatics Center – UFPE – Brazil
Motivation Demand for pervasive computing applications Different devices and features Comply with ever- increasing quality and productivity requirements
Key idea Product line approach using AOP to implement feature variability
Management Core Asset Development Product Development Product Line Development
Product line Source: SEI
Product line Source: SEI
Product line variability
Aspect-oriented programming (AOP) Distribution, persistence, synchronization, logging, protocols. Crosscuting concerns Spread and tangled code Hard to maintain and reuse OO techniques cannot completely address
AOP AOP modularizes crosscutting concerns Join point model Aspect = {pointcut, advice, introduction} Localized implementation Composability Examples: AspectJ, HyperJ
Our approach Designproductlinearchitecture FeatureModeling Designvariationsusingaspects Compose aspects of a product and business classes using AOP Weavers Generate version of a product Feature= Aspect+ auxiliary classes
Our approach
Case study: J2ME dictionary Define product line features Identify common features for all products Identify variable features 1. Feature View
Case study: J2ME dictionary Design flexible architecture Focus on mandatory features Use architectural/design patterns 2. Architecture View
Case study: J2ME dictionary 3. Variation View Identify application points to be crossed Design aspects correspondent to variable features (feature -> aspect) Design auxiliary classes Use design patterns
Case study: J2ME dictionary 4. Composition View Weaver Collect the aspects relative to the desired features Select auxiliary classes Use an AOP Weaver Generate weaved code
Case study: J2ME dictionary 5. Product Generation View Process code Package the application Install and test
References Sérgio Soares, Eduardo Laureano, Paulo Borba. Implementing distribution and persistence aspects with AspectJ. In 17th Annual ACM Conference on Object- Oriented Programming, Systems, Languages and Applications, OOPSLA'2002, pages , Seattle, USA, 4th-8th November Implementing distribution and persistence aspects with AspectJ Krzystof Czarnecki and Ulrich Eisenecker. Generative Programming: Methods, Tools, and Applications. Addison- Wesley
Questions?