• DocumentCode
    3230779
  • Title

    The implementation of Observer pattern by aspect based on properties file

  • Author

    Jicheng, Liu ; Yuhua, Wang ; Yabo, Wang ; Su, Xu

  • Author_Institution
    Inst. of Inf. Sci & Eng, HAUT, Zhengzhou, China
  • fYear
    2009
  • fDate
    25-28 July 2009
  • Firstpage
    908
  • Lastpage
    912
  • Abstract
    In the implementation of Observer pattern by OOP, the subject objects and the observer objects must implement one interface or extend one abstract class to indicate their roles. When it is implemented by AOP, there is not such requirement. The participants and their relations are defined in an aspect, it isn´t necessary for these participants to implement one interface or extending one abstract class. But users need to know aspect language to use this method. This paper provides a novel method to implement this pattern, participant objects and their relations are defined in a properties file, which is often used in Java programming. On the basis of analyzing Observer pattern implemented by AOP, the paper discussed how to use some simple grammars to define participant classes and their relations, how to establish the association between the subject and the observer is discussed in details. After analyzing the properties file, the aspect is generated, compiling and weaving this aspect with the target classes is done. So users may use Aspect implementation by properties file.
  • Keywords
    Java; application program interfaces; object-oriented programming; Java programming; OOP; abstract class; aspect language; grammar; observer pattern analysis; participant class; property file analysis; Computer science; Computer science education; Java; Object oriented programming; Pattern analysis; Programming profession; Scattering; Weaving; Aspect; AspectJ; Observer Pattern; properties file;
  • fLanguage
    English
  • Publisher
    ieee
  • Conference_Titel
    Computer Science & Education, 2009. ICCSE '09. 4th International Conference on
  • Conference_Location
    Nanning
  • Print_ISBN
    978-1-4244-3520-3
  • Electronic_ISBN
    978-1-4244-3521-0
  • Type

    conf

  • DOI
    10.1109/ICCSE.2009.5228245
  • Filename
    5228245