An Empirical Study of CSS Code Smells in Web Frameworks
Cascading Style Sheets (CSS) has become essential to front-end web development for the specification of style. But despite its simple syntax and the theoretical advantages attained through the separation of style from content and behavior, CSS authoring today is regarded as a complex task. As a resu...
Main Author: | |
---|---|
Format: | Others |
Published: |
DigitalCommons@CalPoly
2018
|
Subjects: | |
Online Access: | https://digitalcommons.calpoly.edu/theses/1842 https://digitalcommons.calpoly.edu/cgi/viewcontent.cgi?article=3271&context=theses |
id |
ndltd-CALPOLY-oai-digitalcommons.calpoly.edu-theses-3271 |
---|---|
record_format |
oai_dc |
spelling |
ndltd-CALPOLY-oai-digitalcommons.calpoly.edu-theses-32712021-08-20T05:02:41Z An Empirical Study of CSS Code Smells in Web Frameworks Bleisch, Tobias Paul Cascading Style Sheets (CSS) has become essential to front-end web development for the specification of style. But despite its simple syntax and the theoretical advantages attained through the separation of style from content and behavior, CSS authoring today is regarded as a complex task. As a result, developers are increasingly turning to CSS preprocessor languages and web frameworks to aid in development. However, previous studies show that even highly popular websites which are known to be developed with web frameworks contain CSS code smells such as duplicated rules and hard-coded values. Such code smells have the potential to cause adverse effects on websites and complicate maintenance. It is therefore important to investigate whether web frameworks may be encouraging the introduction of CSS code smells into websites. In this thesis, we investigate the prevalence of CSS code smells in websites built with different web frameworks and attempt to recognize a pattern of CSS behavior in these frameworks. We collect a dataset of several hundred websites produced by each of 19 different frameworks, collect code smells and other metrics present in the CSS code of each website, train a classifier to predict which framework the website was built with, and perform various clustering tasks to gain insight into the correlations between code smells. Our results show that CSS code smells are highly prevalent in websites built with web frameworks, we achieve an accuracy of 39% in correctly classifying the frameworks based on CSS code smells and metrics, and we find interesting correlations between code smells. 2018-03-01T08:00:00Z text application/pdf https://digitalcommons.calpoly.edu/theses/1842 https://digitalcommons.calpoly.edu/cgi/viewcontent.cgi?article=3271&context=theses Master's Theses DigitalCommons@CalPoly separation of concerns empirical software engineering wappalyzer Software Engineering |
collection |
NDLTD |
format |
Others
|
sources |
NDLTD |
topic |
separation of concerns empirical software engineering wappalyzer Software Engineering |
spellingShingle |
separation of concerns empirical software engineering wappalyzer Software Engineering Bleisch, Tobias Paul An Empirical Study of CSS Code Smells in Web Frameworks |
description |
Cascading Style Sheets (CSS) has become essential to front-end web development for the specification of style. But despite its simple syntax and the theoretical advantages attained through the separation of style from content and behavior, CSS authoring today is regarded as a complex task. As a result, developers are increasingly turning to CSS preprocessor languages and web frameworks to aid in development. However, previous studies show that even highly popular websites which are known to be developed with web frameworks contain CSS code smells such as duplicated rules and hard-coded values. Such code smells have the potential to cause adverse effects on websites and complicate maintenance. It is therefore important to investigate whether web frameworks may be encouraging the introduction of CSS code smells into websites.
In this thesis, we investigate the prevalence of CSS code smells in websites built with different web frameworks and attempt to recognize a pattern of CSS behavior in these frameworks. We collect a dataset of several hundred websites produced by each of 19 different frameworks, collect code smells and other metrics present in the CSS code of each website, train a classifier to predict which framework the website was built with, and perform various clustering tasks to gain insight into the correlations between code smells. Our results show that CSS code smells are highly prevalent in websites built with web frameworks, we achieve an accuracy of 39% in correctly classifying the frameworks based on CSS code smells and metrics, and we find interesting correlations between code smells. |
author |
Bleisch, Tobias Paul |
author_facet |
Bleisch, Tobias Paul |
author_sort |
Bleisch, Tobias Paul |
title |
An Empirical Study of CSS Code Smells in Web Frameworks |
title_short |
An Empirical Study of CSS Code Smells in Web Frameworks |
title_full |
An Empirical Study of CSS Code Smells in Web Frameworks |
title_fullStr |
An Empirical Study of CSS Code Smells in Web Frameworks |
title_full_unstemmed |
An Empirical Study of CSS Code Smells in Web Frameworks |
title_sort |
empirical study of css code smells in web frameworks |
publisher |
DigitalCommons@CalPoly |
publishDate |
2018 |
url |
https://digitalcommons.calpoly.edu/theses/1842 https://digitalcommons.calpoly.edu/cgi/viewcontent.cgi?article=3271&context=theses |
work_keys_str_mv |
AT bleischtobiaspaul anempiricalstudyofcsscodesmellsinwebframeworks AT bleischtobiaspaul empiricalstudyofcsscodesmellsinwebframeworks |
_version_ |
1719460490168500224 |