[aosd-discuss] AOP, Design Patterns and Metadata - master thesis
Miguel Pessoa Monteiro
mmonteiro at di.fct.unl.pt
Thu Nov 8 07:58:35 EST 2007
Looks like you're translating existing AspectJ implementations of the GoF patterns
to the annotation-based idiom. In some cases, that may be the way to go. Just
approach existing implementations with a critical eye. For instance, see my
DSOA'2004 position paper.
I would say that the logic for adding Observers to Subjects should lie outside of
the participants in the pattern, perhaps in some controller object that uses logic
provided by the aspect.
Your work could open the way to a study of the composition of multiple patterns and
multiple instances of the same pattern, based on annotations. In my opinion, that is
a more interesting topic than the implementations of individual patterns, taken in
isolation.
Regarding use of annotation-based aspects, you may be interested in taking a look to
the following.
C. Cunha, J. Sobral. An Annotation-Based Framework for Parallel Computing, 15th
Euromicro Conference on Parallel, Distributed and Network-based Processing (PDP
2007), Naples, February 2007, © IEEE Computer Society, 2007.
http://www.di.uminho.pt/~jls/64_Cunha_C.pdf
C. Cunha, J. Sobral, M. Monteiro, Reusable Aspect-Oriented Implementation of
Concurrency Patterns and Mechanisms, Fifth ACM International Conference on Aspect
Oriented Software Development (AOSD'06), Bonn, Germany, March 2006.
http://www.di.uminho.pt/~jls/AOSD06Author.pdf
There are other interesting cases of using annotation-based aspects. For instance,
Contract4J also uses a protocol based on annotations for supporting design by
contract.
Hope this helps,
--
Miguel P. Monteiro | cell phone +351 96 700 35 45
Departamento de Informatica | Phone +351 21 294 8536 ext. 10708
Faculdade Ciencias e Tecnol.| Fax: +351 21 294 8541
Universidade Nova de Lisboa | URL: http://ctp.di.fct.unl.pt/~mpm
2829-516 Caparica, PORTUGAL | e-mail: mmonteiro [at] di fct unl pt
Em Qui, Novembro 8, 2007 11:57 am, andrei oprisan escreveu:
> Hello Miguel,
>
> First of all I would like to thank you for the information you have
> provided me. I hadn't got a chance to read the articles carefully but I am going
to do it as soon as possible. Indeed I am using Java 5 annotations and AspectJ 5,
I apologize for not mentioning it clearly in the first place. As about my work.,
I had already implemented two patterns, Singleton and Observer. I have uploaded
them here, if anyone wants to have a look :
http://cs.joensuu.fi/~aoprisan/aop/observer.pdf<http://cs.joensuu.fi/%7Eaoprisan/aop/observer.pdf>
http://cs.joensuu.fi/~aoprisan/aop/singleton.pdf<http://cs.joensuu.fi/%7Eaoprisan/aop/singleton.pdf>.
Those are still drafts for the time being. The problems that I am facing is
deciding how many responsibilities should I delegate to the classes , aspects and
annotations involved in a pattern. For example, in the Observer pattern, where
should the logic for adding Observers to Subjects be encapsulated : in the
classes, aspects or annotations ? I have presented a way in the draft for the
Observer, but I am not quite satisfied with it. I think that finding out more
opinions about this matter will really help me.
>
> Kind Regards,
> Andrei
>
>
>
> On Nov 7, 2007 8:24 PM, Miguel Pessoa Monteiro <mmonteiro at di.fct.unl.pt> wrote:
>
>> Hi Andrei,
>> Perhaps you could be more specific about your problem. You said that you're using
>> AOP and Metadata, but did not mention an actual tool/language. Do you mean AspectJ 5
>> and Java 5 annotations, or is it something else?
>> Exactly what is not clear about where you should go? Perhaps it is just a matter of
>> starting with one pattern, implement it, and gradually do the same with the whole
>> collection. Try selecting one of the most promising patterns, in terms of possible
>> conclusions/insights, or as a showcase for the technique that you are using.
>> Regarding related work, you may be interested on the following papers: M.P.
Monteiro, J.M. Fernandes, Pitfalls of AspectJ Implementations of Some of the
>> Gang-of-Four Design Patterns. Proceedings of the Desarrollo de Software Orientado a
>> Aspectos (DSOA'2004) workshop, at the VIII Jornadas de Ingeniería de Software y
>> Bases de Datos (JISBD'2004), Málaga, Spain, November 2004.
>> http://ctp.di.fct.unl.pt/~mpm/Monteiro04-AspectJGoFPitfalls.pdf<http://ctp.di.fct.unl.pt/%7Empm/Monteiro04-AspectJGoFPitfalls.pdf>
@inproceedings{rajan-patterns-07,
>> author = {Hridesh Rajan},
>> title = {Design Patterns in Eos},
>> booktitle = {PLoP '07, Conference on Pattern Languages of Programs}, location =
{Monticello, IL},
>> pages = {to appear},
>> month = {September},
>> year = {2007}
>> }
>> http://www.hillside.net/plop/2007/papers/PLoP2007_Rajan.pdf
>> Hope this helps,
>> --
>> Miguel P. Monteiro | cell phone +351 96 700 35 45
>> Departamento de Informatica | Phone +351 21 294 8536 ext. 10708 Faculdade
Ciencias e Tecnol.| Fax: +351 21 294 8541
>> Universidade Nova de Lisboa | URL: http://ctp.di.fct.unl.pt/~mpm 2829-516
<http://ctp.di.fct.unl.pt/%7Empm2829-516> Caparica, PORTUGAL | e-mail: mmonteiro
[at] di fct unl pt
>> Em Qua, Novembro 7, 2007 5:00 pm, discuss-request at aosd.net escreveu:
>> > Date: Tue, 6 Nov 2007 20:39:16 +0200
>> > From: "andrei oprisan" < aoprisan at gmail.com>
>> > Subject: [aosd-discuss] AOP, Design Patterns and Metadata - master
>> > thesis
>> > To: "AOP discussion list" <discuss at aosd.net >
>> > Message-ID:
>> > <8f1316b80711061039t4bc6ebbod33a0880fdfeda9e at mail.gmail.com>
>> > Content-Type: text/plain; charset="iso-8859-1"
>> >
>> > Hello all,
>> > My name is Andrei Oprisan and I am a student at the Department of
>> > Computer Science, University of Joensuu, Finland. I am currently writing
>> my
>> > master thesis. The thesis is centered around using AOP and Metadata to
implement the GOF's Design Patterns. I am using AspectJ and annotations
>> for
>> > that, but I am kind of stuck now because things are not so clear for me where
should I go. I am aware of the previous implementation of Design Patterns using
AspectJ done by Jan Hannemann. I would like to kindly ask
>> you
>> > for opinions or advices on the the subject of the my thesis. If
>> required, I
>> > can provide more information on the work that I had already done. Thank you
very much for your time.
>> >
>> > Kind Regards,
>> > Andrei.
>> > -------------- next part --------------
>> > An HTML attachment was scrubbed...
>> > URL:
>> > http://aosd.net/pipermail/discuss_aosd.net/attachments/20071106/33b6f956/attachment-0001.html
>> _______________________________________________
>> discuss mailing list - discuss at aosd.net
>> To unsubscribe and change options, go to:
>> http://aosd.net/mailman/listinfo/discuss_aosd.net
>> Check out the AOSD.net Wiki: http://aosd.net/wiki
More information about the discuss
mailing list