{'fraction_non_alphanumeric': 0.01788375558867362, 'fraction_numerical': 0.0, 'mean_word_length': 5.456730769230769, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Transforming Object-Oriented Design Pattern Structures into Layers

Design patterns improve desired properties of object-oriented software. The Jak language implements layered designs that follow similar goals as design patterns, like wrapping methods on demand. In prior research we compared design pattern implementations coded in different languages, like Jak. We did not evaluate the approaches of implementing a pattern but only used the implementations for comparing languages. Therefore the compared implementations were rather small and do not say whether the proposals scale. In this study we transform and reimplement instances of all Gang-of-Four design patterns in programs like JHotDraw or Berkeley DB into Jak counterpart designs proposed earlier. We show to what extend and under which conditions object-oriented design patterns and Jak mechanisms correspond, e.g., for adding methods to classes on-demand. Most of the problems we found while transforming pattern implementations were related to diverse implementation noances of the same pattern in different programs. Second, some of the Jak approaches caused code replication or additional effort for ensuring consistent Jak module composition. Finally, passing parameters to one method in different configurations of Jak layers was more problematic than we expected before.