The STUDIA UNIVERSITATIS BABEŞ-BOLYAI issue article summary

The summary of the selected article appears at the bottom of the page. In order to get back to the contents of the issue this article belongs to you have to access the link from the title. In order to see all the articles of the archive which have as author/co-author one of the authors mentioned below, you have to access the link from the author's name.

 
       
         
    STUDIA INFORMATICA - Issue no. 1 / 2016  
         
  Article:   C# EXTENSION METHODS VERSUS JAVA DEFAULT METHODS IN THE CONTEXT OF MIXDECORATOR PATTERN.

Authors:  VIRGINIA NICULESCU.
 
       
         
  Abstract:  VIEW PDF: C# EXTENSION METHODS VERSUS JAVA DEFAULT METHODS IN THE CONTEXT OF MIXDECORATOR PATTERN

Decorator design pattern is a very well-known pattern that allows additional functionality to be attached to an object dynamically. Decorators provide a flexible alternative to subclassing for extending functionality. MixDecorator is an enhanced variant of the Decorator, which does not just eliminate some constraints of the original one, but also allows it to be used as a base for a general extension mechanism. This pattern introduces significant flexibility by allowing direct access to all added responsibilities. MixDecorator implementation imposes some constraints and we analyze and compare the implementation solutions in two of the most important mainstream object-oriented languages: Java and C#. This also leads to a comparison analysis between C# extension methods and Java default methods, or virtual extension methods as they are also called, in a more general context of trait-based programming.

Keywords and phrases: patterns, decorator, responsibilities, languages, Java, C#.

2010 Mathematics Subject Classification. 68P05.
 
         
     
         
         
      Back to previous page