Mining design patterns from C++ source code

Author(s):  
Z. Balanyi ◽  
R. Ferenc
Author(s):  
JING DONG ◽  
YAJING ZHAO ◽  
TU PENG

The quality of a software system highly depends on its architectural design. High quality software systems typically apply expert design experience which has been captured as design patterns. As demonstrated solutions to recurring problems, design patterns help to reuse expert experience in software system design. They have been extensively applied in the industry. Mining the instances of design patterns from the source code of software systems can assist in the understanding of the systems and the process of re-engineering them. More importantly, it also helps to trace back to the original design decisions, which are typically missing in legacy systems. This paper presents a review on current techniques and tools for mining design patterns from source code or design of software systems. We classify different approaches and analyze their results in a comparative study. We also examine the disparity of the discovery results of different approaches and analyze possible reasons with some insight.


Author(s):  
Tran Thanh Luong ◽  
Le My Canh

JavaScript has become more and more popular in recent years because its wealthy features as being dynamic, interpreted and object-oriented with first-class functions. Furthermore, JavaScript is designed with event-driven and I/O non-blocking model that boosts the performance of overall application especially in the case of Node.js. To take advantage of these characteristics, many design patterns that implement asynchronous programming for JavaScript were proposed. However, choosing a right pattern and implementing a good asynchronous source code is a challenge and thus easily lead into less robust application and low quality source code. Extended from our previous works on exception handling code smells in JavaScript and exception handling code smells in JavaScript asynchronous programming with promise, this research aims at studying the impact of three JavaScript asynchronous programming patterns on quality of source code and application.


e-xacta ◽  
2016 ◽  
Vol 9 (1) ◽  
pp. 37
Author(s):  
Cristiano Martins Monteiro ◽  
Flavianne Braga Campos de Lima ◽  
Carlos Renato Storck

<p>A geração automática de código-fonte é uma prática adotada no desenvolvimento de softwares para agilizar, facilitar e padronizar a implementação dos projetos. Embora seja uma prática comum nas fábricas de software, não se conhece uma ferramenta que permita escolher o padrão de projeto a ser usado. O objetivo principal deste trabalho é apresentar um gerador de códigos para o desenvolvimento de sistemas Web a partir de uma modelagem entidade-relacionamento, uma linguagem de programação e um padrão de projeto determinados pelo usuário. Os objetivos específicos são propor uma arquitetura do sistema capaz de adequar e reaproveitar diferentes padrões de projeto, linguagens de programação e projetos cadastrados; permitir que o usuário cadastre, altere, exclua, importe e exporte um projeto; e gerar automaticamente o seu código-fonte e scripts de banco de dados. Este trabalho se justifica pela importância de reduzir erros de codificação; e evitar perca tempo ao realizar atividades rotineiras de implementação de padrões de projeto. Possibilitando assim, maior dedicação no planejamento das regras de negócios e redução de custos. A ferramenta proposta (GCER) foi desenvolvida em linguagem Java com o uso banco de dados Oracle 11g, e seguindo os padrões DAO e MVC. Os resultados foram avaliados através da geração e compilação de códigos de um projeto para cadastro de veículos. A geração com êxito evidencia a viabilidade da ferramenta proposta para a geração automática de códigos no processo de desenvolvimento de software.</p><p>Abstract</p><p>The automatic generation of source code is a practice adopted in the development of software to streamline, facilitate and standardize the implementation of projects. Although it be a common practice in software factories, it is not known a tool able to choose the design pattern to be used. The main objective of this paper is to present a code generator for the development of Web systems from an entity-relationship modeling, a programming language and a design pattern determined by the user. The specific objectives are to propose a system architecture able to suit and reuse different design patterns, programming languages and saved projects; allow the user to insert, update, delete, import and export a project; and automatically generate the source code and database scripts. This work is justified by the importance to reduce errors of coding; and to avoid waste of time in the development of Web systems performing routine tasks. Allowing, then, a greater dedication in the planning of business rules and the reduction of costs. The tool proposed (GCER) was developed in Java with the database using Oracle 11g, and following the DAO and MVC patterns. The results were evaluated by generating and compiling codes of a project for vehicle registration. The successful code generation demonstrate the feasibility of the proposed tool for the automatic generation of code in the software development process.</p>


2014 ◽  
Vol 07 (12) ◽  
pp. 983-998 ◽  
Author(s):  
Satoru Uchiyama ◽  
Atsuto Kubo ◽  
Hironori Washizaki ◽  
Yoshiaki Fukazawa

Author(s):  
Arti Chaturvedi ◽  
Manjari Gupta ◽  
Sanjay Kumar Gupta

Design Pattern Detection is a part of re-engineering process and thus gives significant information to the designer. Detection of design patterns is helpful for improving the software characteristics. Therefore, a reliable design pattern discovery is required. The problem of finding an isomorphic sub-graph is used to solve design pattern detection in past. It is noticed that ordering of vertices of the design pattern saves the time of process. In this paper we are doing ordering of vertices for few design patterns proposed by Gamma, Helm, Johnson, and Vlissides (1995) using an algorithm Greatest Constraint First proposed by Bonnici, Giugno, Pulvirenti, Shasha, and Ferro (2013). After getting this ordering, we use a matching algorithm that uses subgraph isomorphism conditions to check whether a particular design pattern exists in the system design or not (Bonnici et al., 2013). We redefine sub-graph isomorphism conditions in the context of the problem of mining design patterns from the system design.


2014 ◽  
pp. 1264-1288
Author(s):  
Patrick H. S. Brito ◽  
Ig Ibert Bittencourt ◽  
Aydano Pamponet Machado ◽  
Evandro Costa ◽  
Olavo Holanda ◽  
...  

The construction of Educational Recommender System (ERS) demands the incorporation of quality attributes at the software design, such as availability for preventing the service to be unavailable for a long time, and scalability for preventing the system from going offline due to a large number of simultaneous requests. The incorporation of such characteristics makes ERS more complex and expensive, but existing strategies for designing ERS do not consider quality attributes in an explicit way. This chapter presents an architecture-centered solution, which is partially supported by tools and considers quality attributes as early as possible in the software development process in a systematic way, from requirements to the source code. The feasibility of the proposed process is showed in terms of a case study executed in a “step-by-step” fashion, presenting how the software architecture can be designed and gradually refined until it achieves the level of object-oriented classes generated based on design patterns.


Author(s):  
Taher Ahmed Ghaleb ◽  
Khalid Aljasser ◽  
Musab A. Alturki

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.


Sign in / Sign up

Export Citation Format

Share Document