Code smells for Model-View-Controller architectures

Maurício Aniche, Gabriele Bavota, Christoph Treude, Marco Aurélio Gerosa, Arie van Deursen

Research output: Contribution to journalArticlepeer-review

52 Scopus citations


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.

Original languageEnglish (US)
Pages (from-to)2121-2157
Number of pages37
JournalEmpirical Software Engineering
Issue number4
StatePublished - Aug 1 2018


  • Code anomalies
  • Code anti-patterns
  • Code quality
  • Code smells
  • Software maintenance

ASJC Scopus subject areas

  • Software


Dive into the research topics of 'Code smells for Model-View-Controller architectures'. Together they form a unique fingerprint.

Cite this