Code Smells in Angular

<p>In one of my previous post I talked about &ldquo;<a href="https://blog.bitsrc.io/clean-frontend-architecture-2995c68702fb" rel="noopener ugc nofollow" target="_blank"><em>Clean Frontend Architecture</em></a><em>&rdquo;</em>&nbsp;and principles that should be followed in order to positively influence the maintainability and scalability of frontend applications.</p> <blockquote> <p>This time I would like to show the most common &ldquo;<em>Code Smells&rdquo;</em>&nbsp;that I have come across in Angular.</p> </blockquote> <h2>So, what are &ldquo;<em>Code Smells</em>&ldquo; and why are they so bad?</h2> <p>Well, I would say the best definition of&nbsp;<em>&ldquo;Code Smells&rdquo;</em>&nbsp;is:</p> <blockquote> <p>The total count of&nbsp;<em>WTFs</em>&nbsp;during a code review.</p> </blockquote> <p>One might also measure the Code Quality with this procedure. A reference for that would be the book &ldquo;<em>Clean Code&ldquo;</em>&nbsp;by Robert C. Martin, where the Code Quality is defined by the&nbsp;<em>WTFs</em>/Minute.</p> <p><img alt="" src="https://miro.medium.com/v2/resize:fit:700/1*LEyqjbNuLqpuRRDlqCY2Fw.png" style="height:551px; width:700px" /></p> <p>Code quality measurement</p> <p>But why are &ldquo;<em>Code Smells&ldquo;</em>&nbsp;bad? Because they negatively influence the maintainability and/or performance of any application.</p> <p>I have seen so many&nbsp;<em>&ldquo;Code Smells&rdquo;</em>&nbsp;and bad practices that I have to categorize them. But how can this be done? One approach would be to categorize them by their negative impact on the performance.&nbsp;</p> <p><a href="https://blog.bitsrc.io/code-smells-in-angular-ce73bf7db072">Website</a></p>
Tags: Angular Code