Code smells for Model-View-Controller architectures
Previous studies have shown the negative effects that low-quality code can have on maintainability proxies, such as code change- and defect-proneness. One of the symptoms of low-quality code are code smells, defined as sub-optimal implementation choices. While this definition is quite general and se...
Saved in:
Main Authors: | , , , , |
---|---|
Format: | text |
Language: | English |
Published: |
Institutional Knowledge at Singapore Management University
2018
|
Subjects: | |
Online Access: | https://ink.library.smu.edu.sg/sis_research/8764 https://ink.library.smu.edu.sg/context/sis_research/article/9767/viewcontent/mvc.pdf |
Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
Institution: | Singapore Management University |
Language: | English |
id |
sg-smu-ink.sis_research-9767 |
---|---|
record_format |
dspace |
spelling |
sg-smu-ink.sis_research-97672024-05-23T05:40:24Z Code smells for Model-View-Controller architectures ANICHE, Maurício BAVOTA, Gabriele TREUDE, Christoph GEROSA, Marco Aurélio VAN DEURSEN, Arie Previous studies have shown the negative effects that low-quality code can have on maintainability proxies, such as code change- and defect-proneness. One of the symptoms of low-quality code are code smells, defined as sub-optimal implementation choices. While this definition is quite general and seems to suggest a wide spectrum of smells that can affect software systems, the research literature mostly focuses on the set of smells defined in the catalog by Fowler and Beck, reporting design issues that can potentially affect any kind of system, regardless of their architecture (e.g., Complex Class). However, systems adopting a specific architecture (e.g., the Model-View-Controller pattern) can be affected by other types of poor practices that only manifest themselves in the chosen architecture. We present a catalog of six smells tailored to MVC applications and defined by surveying/interviewing 53 MVC developers. We validate our catalog from different perspectives. First, we assess the relationship between the defined smells and the code change- and defect-proneness. Second, we investigate when these smells are introduced and how long they survive. Third, we survey 21 developers to verify their perception of the defined smells. Fourth, since our catalog has been mainly defined together with developers adopting a specific Java framework in their MVC applications (e.g., Spring), we interview four expert developers working with different technologies for the implementation of their MVC applications to check the generalizability of our catalog. The achieved results show that the defined Web MVC smells (i) more often than not, have more chances of being subject to changes and defects, (ii) are mostly introduced when the affected file (i.e., the file containing the smell) is committed for the first time in the repository and survive for long time in the system, (iii) are perceived by developers as severe problems, and (iv) generalize to other languages/frameworks. 2018-08-01T07:00:00Z text application/pdf https://ink.library.smu.edu.sg/sis_research/8764 info:doi/10.1007/s10664-017-9540-2 https://ink.library.smu.edu.sg/context/sis_research/article/9767/viewcontent/mvc.pdf http://creativecommons.org/licenses/by-nc-nd/4.0/ Research Collection School Of Computing and Information Systems eng Institutional Knowledge at Singapore Management University Code smells Code anomalies Code anti-patterns Software maintenance Code quality Computer and Systems Architecture Software Engineering |
institution |
Singapore Management University |
building |
SMU Libraries |
continent |
Asia |
country |
Singapore Singapore |
content_provider |
SMU Libraries |
collection |
InK@SMU |
language |
English |
topic |
Code smells Code anomalies Code anti-patterns Software maintenance Code quality Computer and Systems Architecture Software Engineering |
spellingShingle |
Code smells Code anomalies Code anti-patterns Software maintenance Code quality Computer and Systems Architecture Software Engineering ANICHE, Maurício BAVOTA, Gabriele TREUDE, Christoph GEROSA, Marco Aurélio VAN DEURSEN, Arie Code smells for Model-View-Controller architectures |
description |
Previous studies have shown the negative effects that low-quality code can have on maintainability proxies, such as code change- and defect-proneness. One of the symptoms of low-quality code are code smells, defined as sub-optimal implementation choices. While this definition is quite general and seems to suggest a wide spectrum of smells that can affect software systems, the research literature mostly focuses on the set of smells defined in the catalog by Fowler and Beck, reporting design issues that can potentially affect any kind of system, regardless of their architecture (e.g., Complex Class). However, systems adopting a specific architecture (e.g., the Model-View-Controller pattern) can be affected by other types of poor practices that only manifest themselves in the chosen architecture. We present a catalog of six smells tailored to MVC applications and defined by surveying/interviewing 53 MVC developers. We validate our catalog from different perspectives. First, we assess the relationship between the defined smells and the code change- and defect-proneness. Second, we investigate when these smells are introduced and how long they survive. Third, we survey 21 developers to verify their perception of the defined smells. Fourth, since our catalog has been mainly defined together with developers adopting a specific Java framework in their MVC applications (e.g., Spring), we interview four expert developers working with different technologies for the implementation of their MVC applications to check the generalizability of our catalog. The achieved results show that the defined Web MVC smells (i) more often than not, have more chances of being subject to changes and defects, (ii) are mostly introduced when the affected file (i.e., the file containing the smell) is committed for the first time in the repository and survive for long time in the system, (iii) are perceived by developers as severe problems, and (iv) generalize to other languages/frameworks. |
format |
text |
author |
ANICHE, Maurício BAVOTA, Gabriele TREUDE, Christoph GEROSA, Marco Aurélio VAN DEURSEN, Arie |
author_facet |
ANICHE, Maurício BAVOTA, Gabriele TREUDE, Christoph GEROSA, Marco Aurélio VAN DEURSEN, Arie |
author_sort |
ANICHE, Maurício |
title |
Code smells for Model-View-Controller architectures |
title_short |
Code smells for Model-View-Controller architectures |
title_full |
Code smells for Model-View-Controller architectures |
title_fullStr |
Code smells for Model-View-Controller architectures |
title_full_unstemmed |
Code smells for Model-View-Controller architectures |
title_sort |
code smells for model-view-controller architectures |
publisher |
Institutional Knowledge at Singapore Management University |
publishDate |
2018 |
url |
https://ink.library.smu.edu.sg/sis_research/8764 https://ink.library.smu.edu.sg/context/sis_research/article/9767/viewcontent/mvc.pdf |
_version_ |
1814047522387132416 |