opus group les | di |puc-rio - brazil alessandro cavalcante gurgel composing design patterns in...

62
OPUS Group LES | DI |PUC-Rio - Brazil http://www.les.inf.puc-rio.br/opus Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory Study

Upload: lindsey-murphy

Post on 16-Jan-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

OPUS Group

LES | DI |PUC-Rio - Brazil

http://www.les.inf.puc-rio.br/opus

Alessandro Cavalcante Gurgel

Composing Design Patterns in CaesarJ: An Exploratory Study

Page 2: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Agenda

Introduction Previous Studies

Background CaesarJ AspectJ

Case study Design of compositions Related Works Conclusions Future Works

Apr 21, 2023 Francisco Dantas et. al @ OPUS Group 2

Page 3: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Introduction

GoF Design Patterns are scattered and tangled in the base code.

Design Patterns Compositions. Sharing: methods, attributes and classes.

Modularity Problems Special scenario for analysing both strengths

and limitations of the languages .

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 3

Page 4: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Introduction – Previous Studies

Aspectising Design Patterns Hannemann,J., Kiczales,G. “Design Pattern Implementation in Java and

AspectJ”. Proc. OOPSLA’02, Nov 2002. Garcia, Sant’Anna, Figueiredo, Kulesza, Lucena. “Modularizing Design

Patterns with Aspects: A Quantitative Study.” 4th Intl. Conf. on Aspect-Oriented Software Development (AOSD'05). 2005

Cacho, Sant’Anna, Figueiredo, Garcia, Batista, Lucena “Composing Design Patterns: A Scalability Study of Aspect-Oriented Programming.” 5th Intl. Conf. on Aspect-Oriented Software Development (AOSD'06). 2006

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 4

Page 5: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Introduction – Previous Studies

Aspectising Design Patterns Hannemann,J., Kiczales,G. Design Pattern Implementation in Java and

AspectJ. Proc. OOPSLA’02, Nov 2002. Garcia, Sant’Anna, Figueiredo, Kulesza, Lucena. “Modularizing Design

Patterns with Aspects: A Quantitative Study.” 4th Intl. Conf. on Aspect-Oriented Software Development (AOSD'05). 2005

Cacho, Sant’Anna, Figueiredo, Garcia, Batista, Lucena “Composing Design Patterns: A Scalability Study of Aspect-Oriented Programming.” 5th Intl. Conf. on Aspect-Oriented Software Development (AOSD'06). 2006

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 5

The use of AspectJ in some compositions were problematic.

Page 6: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

General Goals

Propose CaesarJ solutions that resolve or minimize emerging problems from compositions of Design Patterns.

Compare qualitatively AO, OO and CaesarJ solutions

Strengths and limitations of the languages

18 June Alessandro Gurgel et. al @ OPUS Group 6

Page 7: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

What kind of problems ? Coupling, application restrictions, type-safe operations Quality solution improvements

Preserving the original solution of each design pattern.

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 7

Page 8: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Why CaesarJ ?

Support to AOP and FOP (collaborations and refinements)

Stable compiler Applications of different domains Extension of Java Tutorials, examples and support of developers

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 8

Page 9: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Background - CaesarJ

Collaboration Interfaces Abstractions beetween components

Virtual Classes Inner classes, Overriden and late bound (virtual methods)

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 9

Page 10: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Running Example - Observer

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 10

Page 11: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Running Example - Observer

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 11

abstract public cclass Subject

Implicit Scoping!

Family

Page 12: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Aspects and Wrappers - CaesarJ Aspects

Classes that have pointcuts and advices References to aspects can be polymorphic Static , dynamic and instance level deployment

Wrappers Bindings map between types from two domains by means of

wrapper classes. Wrapper-wrappee relationship. Created on demand Reused for the same object Garbage collector

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 12

Page 13: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Running Example - Observer

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 13

Page 14: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Running Example - Observer

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 14

Page 15: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Mixin Composition

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 15

public cclass CO extends ObserverProtocolImpl & ColorObserver { }

Page 16: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Background - AspectJ Per-object aspects

aspect Id perthis(Pointcut) { ... } aspect Id pertarget(Pointcut) { ... } one object of type A is created for every this/tatget object at

any of the join points picked out by Pointcut The advice defined in A will run only at a join point where

the this/target object has been associated with an instance of A

A.aspectOf(Object) aspect Id pertypewithin(org.xyz..*) percflow and percflowbelow

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 16

Page 17: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Case Study - OpenOrb

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 17

Reflective middleware GoF patterns are used and combined to satisfy

the middleware modularity-related requirements

OO and AO solutions are available.

Page 18: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Open-Orb

Apr 21, 2023 Francisco Dantas et. al @ OPUS Group 18

Page 19: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Chosen Compositions – Representative Compositions

Strategy and Proxy Memento and Observer Decorator and State Decorator and Template Method. Mediator and Proxy Composite and Visitor Prototype and State.

18 de Maio Alessandro Gurgel et. al @ OPUS Group 19

Page 20: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Chosen Compositions – Problematic AspectJ solutions

Strategy and Proxy Memento and Observer Decorator and State Decorator and Template Method. Mediator and Proxy Composite and Visitor Prototype and State.

18 de Maio Alessandro Gurgel et. al @ OPUS Group 20

Page 21: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Design of the compositions

Composite and Visitor

18 de Maio Alessandro Gurgel et. al @ OPUS Group 21

Page 22: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Intent of each design pattern

Visitor Represents an operation to be performed on the

elements of an object structure. Visitor lets you define a new operation without changing the classes of the elements on which it operates

Composite Compose objects into tree structures to represent

part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly.

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 22

Page 23: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

OO: Composite and Visitor

Apr 21, 2023 Alessandro Gurgel. al @ OPUS Group 23

Composite

Visitor

Page 24: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

AO Solution CompositeProtocol

Componente, Leaf and Composite Interface for visiting operations

VisitorProtocol Leaf and Node

Problems Attribute Overlapping (aspectOf) Composite code in visit operations Non type safe visit methods

Intertype declaration Type-cast

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 24

HK

Page 25: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

CaesarJ Solution I

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 25

Dynamic WrapperSelection

Page 26: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Discussions about the solution I

Visitor relates with the Composite pattern by the use of wrapper relations instead of AspectOf().

The visit methods do not need to typecast its argument. It uses the respective wrapper class as argument.

Dynamic Wrapper Selection - different cclasses that have the same name but wraps different classes from a common hierarchy to provide polymorphic behaviour according the wrappee object.

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 26

This mechanism is not implemented yet.

Page 27: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Discussions about the solution I

Despite of being in the same family, the composite objects can be instatianted independently from the visitor structure.

Another option is to create a Family containing only the composite structure and then create a visitor family that extends the composite family

Apr 21, 2023 Alessandro Gurgel t. al @ OPUS Group 27

Page 28: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

CaesarJ Solution II

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 28

•Extensibility with new operations •Extensibility with new data types.

The use of virtual classes promotes:

Page 29: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Creating new data types and operations

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 29

Page 30: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Discussions

Both solutions are in the same level of extensibility in terms of data type and operations since wrappers are also virtual classes.

In second solution, there is explicit code of composite in visit methods. In the third one, it is made by wrappee object.

Glue code – inheritance x binding

Apr 21, 2023 Alessandoro Gurgel et. al @ OPUS Group 30

Page 31: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Prototype and State

18 June Alessandro Gurgel et. al @ OPUS Group 31

Page 32: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Intent of each design pattern

Prototype Specifies the kinds of objects to create using a

prototypical instance, and creates new objects by copying this prototype.

State Allows an object to alter its behavior when its

internal state changes. The object will appear to change its class.

The pattern is also responsible for the state transitions (Context).

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 32

Page 33: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

OO: Prototype and State

18 June Alessandro Gurgel et. al @ OPUS Group 33

Prototype

State

Page 34: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

AO Solution

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 34

Page 35: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Problems of AO Solution PrototypeAspect.aspectOf().createCloneFor() Inter-aspect coupling. The natural dependencies between the business classes Declare-precedence related to other aspect that is not involved

in this composition (DecoratorAspect and StateAspect)

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 35

Page 36: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

CaesarJ solution

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 36

Page 37: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Discussions

Concrete prototypes and concrete states are defined in a modular way.

The class ConcreteBind acts like the context role in state design pattern and the client in prototype.

Instead of having coupling between aspects, the ConcreteBind has variables that are states and also prototypes. The transition of bdState uses these variables in makeRequest method.

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 37

Page 38: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Decorator and State

18 June Alessandro Gurgel et. al @ OPUS Group 38

Page 39: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Intent of each design pattern State

Allows an object to alter its behavior when its internal state changes. The object will appear to change its class.

The pattern is also responsible for the state transitions (Context).

Decorator Attach additional responsibilities to an object dynamically.

Decorators provide a flexible alternative to subclassing for extending functionality.

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 39

Page 40: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

OO: Decorator and State

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 40

State

Decorator

Page 41: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

AO Solution

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 41

Page 42: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Problens of AO Solution

Since BindStateAspect and DecoratorAspect intercept the same joint point, an order of execution is established using declare precedence.

Using the DecoratorAspect there is no bound about which ConcreteBind objects will be decorated. One possible solution is to create a decorator class extending the ConcreteBind and only intercept the objects from that classes using target in the joint point designator.

perthis, pertarget do not address the problem since is not related to instances of aspects

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 42

Page 43: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

CaesarJ Solution

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 43

The state design pattern remains the same

Deploy on object instance

Page 44: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Discussion

Using CaesarJ we can obtain the same benefits of AO solution and we also can limit the objects that are decorated by the entity DecoratorCJ using the deploy on object mechanism .

Another scenarios Mixin Composition Wrappers

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 44

Page 45: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Mediator and Proxy

18 June Alessandro Gurgel et. al @ OPUS Group 45

Page 46: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Intent of each design pattern

Mediator Defines an object that encapsulates how a set of

objects interact. Proxy

Provides a surrogate or placeholder for another object to control access to it.

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 46

Page 47: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

OO Mediator e Proxy

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 47

Mediator

Proxy

Each method invoke makeRequest from ConcreteBind

Page 48: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Problems and Solutions

Described by Cacho (2006): Central element in OpenOrb. Unique instance of Mediator Aspect Bottleneck in the invocation of the middleware

platform – Performance Extension of AspectJ - pertarget, perthis CaesarJ dynamic aspect deployment Multiple instances of ConcreteBind

attached to different proxy instancesApr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 48

Page 49: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Memento and Observer

18 June Alessandro Gurgel et. al @ OPUS Group 49

Page 50: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Intent of each design pattern

Memento Without violating encapsulation, capture and

externalize an object's internal state so that the object can be restored to this state later.

Observer Define a one-to-many dependency between objects

so that when one object changes state, all its dependents are notified and updated automatically.

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 50

Page 51: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

OO: Memento and Observer

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 51

Memento

Observer

Page 52: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

AO Solution ObserverProtocol – abstract pointcut and infrastructure for

registration and notification of observers. ObserverAspect – defines the abstract pointcut that intercepts

changes in the subject. MementoProtocol – defines interface for originator and its

abstract methods. MementoAspect – uses ID to assignment application classes to

the originator role and implements its methods. Problems

The implementation of the originator methods in the MementoAspect is not type safe.

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 52

Page 53: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

CaesarJ Solution

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 53

Memento

Observer

Page 54: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Discussion

The use of CaesarJ bindings wrappers instead of intertype declaration we ensure secure type in originator methods.

Alternative Solution: Define Memento in each originator family Dependent typing can ensure that the object is

restored to its own memento objects only

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 54

Page 55: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Decorator and Template Method

18 June Alessandro Gurgel et. al @ OPUS Group 55

Page 56: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Intent of each design pattern

Decorator Attach additional responsibilities to an object

dynamically. Decorators provide a flexible alternative to subclassing for extending functionality.

Template Method Define the skeleton of an algorithm in an operation,

deferring some steps to subclasses. Template Method lets subclasses redefine certain steps of an algorithm without changing the algorithm's structure.

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 56

Page 57: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

OO Solution

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 57

Template MethodDecorator

Decorator

Template Method

Page 58: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Discussion

Both classes DecoratorBind and MetaBind are part of Template Method and Decorator.

The implementation of Template Method is entirely contained by the Decorator.

In this composition, we preserved the solution of Decorator that was described in its composition with State.

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 58

Page 59: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Related Works Edgar Sousa , Miguel P. Monteiro, Implementing design

patterns in CaesarJ: an exploratory study, Proceedings of the 2008 AOSD workshop.

Martin Kuhlemann , Marko Rosenmüller , Sven Apel , Thomas Leich, On the duality of aspect-oriented and feature-oriented design patterns, Proceedings of the 6th workshop on Aspects, components, and patterns for infrastructure software, 2007, Vancouver, Canada

Marot, A. and Wuyts, R. 2010. Composing aspects with aspects. In Proceedings of the 9th international Conference on Aspect-Oriented Software Development (Rennes and Saint-Malo, France, March 15 - 19, 2010). AOSD '10. ACM, New York, NY, 157-168.

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 59

Page 60: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Conclusions

Inter-type Declarations x CaesarJ Bindings Reuse and Polymorphism x Glue Code Type-safe -> Dynamic Wrapper

Refactoring Process – Glue Code This paper presented strenghts and limitations

on both AspectJ and CaesarJ. CaesarJ – equals or better solutions.

Joint point model Dynamic, instance level deployment

Apr 21, 2023 Alessandro Gurrgel et. al @ OPUS Group 60

Page 61: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Future Works

Replicate the study in other systens from different domains.

Trying reuse the same solutions Comparing with new AOP languages like

Compose* Quantitative study

Metrics

Apr 21, 2023 Alessandro Gurrgel et. al @ OPUS Group 61

Page 62: OPUS Group LES | DI |PUC-Rio - Brazil  Alessandro Cavalcante Gurgel Composing Design Patterns in CaesarJ: An Exploratory

Questions?Alessandro Gurgel

[email protected]

Apr 21, 2023 Alessandro Gurgel et. al @ OPUS Group 62