首页> 外文期刊>International journal of software engineering and knowledge engineering >An Extensible Compiler for Implementing Software Design Patterns as Concise Language Constructs
【24h】

An Extensible Compiler for Implementing Software Design Patterns as Concise Language Constructs

机译:一个可扩展的编译器,用于实现软件设计模式作为简明语言构造

获取原文
获取原文并翻译 | 示例
       

摘要

Design patterns are generic solutions to common programming problems. Design patterns represent a typical example of design reuse. However, implementing design patterns can lead to several problems, such as programming overhead and traceability. Existing research introduced several approaches to alleviate the implementation issues of design patterns. Nevertheless, existing approaches pose different implementation restrictions and require programmers to be aware of how design patterns should be implemented. Such approaches make the source code more prone to faults and defects. In addition, existing design pattern implementation approaches limit programmers to apply specific scenarios of design patterns (e.g. class-level), while other approaches require scattering implementation code snippets throughout the program. Such restrictions negatively impact understanding, tracing, or reusing design patterns. In this paper, we propose a novel approach to support the implementation of software design patterns as an extensible Java compiler. Our approach allows developers to use concise, easy-to-use language constructs to apply design patterns in their code. In addition, our approach allows the application of design patterns in different scenarios. We illustrate our approach using three commonly used design patterns, namely Singleton, Observer and Decorator. We show, through illustrative examples, how our design pattern constructs can significantly simplify implementing design patterns in a flexible, reusable and traceable manner. Moreover, our design pattern constructs allow class-level and instance-level implementations of design patterns.
机译:设计模式是通用常见编程问题的通用解决方案。设计模式表示设计重用的典型示例。然而,实现设计模式可以导致几个问题,例如编程开销和可追溯性。现有研究介绍了几种方法,以减轻设计模式的实施问题。然而,现有方法构成了不同的实施限制,并要求程序员意识到应该如何实现设计模式。此类方法使源代码更容易出现故障和缺陷。此外,现有的设计模式实现方法接近限制程序员,以应用设计模式的特定方案(例如类级别),而其他方法需要在整个程序中散射实现代码片段。这种限制对理解,追踪或重用设计模式产生负面影响。在本文中,我们提出了一种新颖的方法来支持软件设计模式作为可扩展Java编译器的实现。我们的方法允许开发人员使用简洁,易于使用的语言构造,以在其代码中应用设计模式。此外,我们的方法允许在不同场景中应用设计模式。我们使用三种常用的设计模式,即单身人士,观察者和装饰师来说明我们的方法。我们通过说明性示例来展示我们的设计模式构造的设计方式以灵活,可重复使用和可追踪的方式显着简化实现设计模式。此外,我们的设计模式构造允许设计模式的类级和实例级实现。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号