Using mixins to build flexible widgets

When it comes to software that runs on devices as varied as cell phones, PDAs and desktops, one size does not fit all. This paper describes how mixin layers, a kind of nested generic type, can be used to implement a graphical user interface library that can be configured to run on platforms with widely dissimilar capabilities. We describe the language support needed to incrementally build software in layers, and we describe how crosscutting concerns can be encapsulated within a layer. We then show how layers can be reconfigured to meet changing requirements. We also show how a new design pattern, the Sibling pattern, can be used with mixin layers to coordinate changes to multiple classes in the same inheritance hierarchy. When used appropriately, the Sibling pattern increases our ability to separate design concerns and to reuse code.

[1]  Calvin Lin,et al.  Comparing frameworks and layered refinement , 2001, Proceedings of the 23rd International Conference on Software Engineering. ICSE 2001.

[2]  Martin Odersky,et al.  A Statically Safe Alternative to Virtual Types , 1998, ECOOP.

[3]  Don Batory,et al.  Implementing large-scale object-oriented components , 1999 .

[4]  Gregor Kiczales,et al.  Aspect-oriented programming , 1996, CSUR.

[5]  TipFrank,et al.  Practical experience with an application extractor for Java , 1999 .

[6]  Krzysztof Czarnecki,et al.  A Solution to the Constructor-Problem of Mixin-Based Programming in C++ , 2000 .

[7]  Lodewijk Bergmans,et al.  The Composition-Filters Object Model* , 1998 .

[8]  Krzysztof Czarnecki,et al.  Generative Programming , 2001, ECOOP Workshops.

[9]  WadlerPhilip,et al.  Making the future safe for the past , 1998 .

[10]  Gary T. Leavens,et al.  MultiJava: modular open classes and symmetric multiple dispatch for Java , 2000, OOPSLA '00.

[11]  Ken Arnold,et al.  The Java Programming Language , 1996 .

[12]  Cristina V. Lopes,et al.  Aspect-oriented programming , 1999, ECOOP Workshops.

[13]  Don S. Batory,et al.  Scalable software libraries , 1993, SIGSOFT '93.

[14]  Stanley M. Sutton,et al.  N degrees of separation: multi-dimensional separation of concerns , 1999, Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No.99CB37002).

[15]  Don S. Batory,et al.  The design and implementation of hierarchical software systems with reusable components , 1992, TSEM.

[16]  Yannis Smaragdakis,et al.  Object-oriented frameworks and product lines , 2000, SPLC.

[17]  Martin Odersky,et al.  Making the future safe for the past: adding genericity to the Java programming language , 1998, OOPSLA '98.

[18]  Luca Cardelli,et al.  On understanding types, data abstraction, and polymorphism , 1985, CSUR.

[19]  William G. Griswold,et al.  An Overview of AspectJ , 2001, ECOOP.

[20]  Kresten Krab Thorup Genericity in Java with Virtual Types , 1997, ECOOP.

[21]  Frank Tip,et al.  Practical experience with an application extractor for Java , 1999, OOPSLA '99.

[22]  Harold Ossher,et al.  Subject-oriented programming: a critique of pure objects , 1993, OOPSLA '93.

[23]  Don Batory,et al.  Java Layers: Extending Java to Support Component-Based Programming , 2000 .

[24]  Calvin Lin,et al.  Static Virtual Types in Java Layers , 2000 .

[25]  Yannis Smaragdakis,et al.  Implementing Layered Designs with Mixin Layers , 1998, ECOOP.

[26]  Stephen N. Freund,et al.  Adding type parameterization to the Java language , 1997, OOPSLA '97.

[27]  Yannis Smaragdakis,et al.  JTS: tools for implementing domain-specific languages , 1998, Proceedings. Fifth International Conference on Software Reuse (Cat. No.98TB100203).

[28]  Matthew Flatt,et al.  Jiazzi: new-age components for old-fasioned Java , 2001, OOPSLA '01.

[29]  James White,et al.  Java 2 Micro Edition , 2002 .

[30]  Bjarne Stroustrup,et al.  The C++ programming language (3. ed.) , 1997 .

[31]  Antero Taivalsaari,et al.  On the notion of inheritance , 1996, CSUR.

[32]  William R. Cook,et al.  Mixin-based inheritance , 1990, OOPSLA/ECOOP '90.

[33]  Ken Arnold,et al.  The Java programming language (2nd ed.) , 1998 .