Clean Code Review: Removing All the Extra Types
<p>I recently came across an <a href="https://www.reddit.com/r/swift/comments/150i6ut/swiftymarvel_swiftui_app_demonstrates_how_to/" rel="noopener ugc nofollow" target="_blank">interesting post on the r/swift subreddit</a> that featured an example of a “Clean Code” project, which doesn’t happen all too often. I was intrigued and decided to check it out on GitHub, then proceeded to download it, set it up, and try it myself. At first glance, the code was cumbersome to read, and I was somewhat confused, but after downloading it and spending some time in it, all the pieces fell together, and the project seems to accomplish what it was trying to accomplish.</p>
<p>The part of the app that intrigued me most was how complex the application's networking portion was! How can two simple network fetches span so many files and be so hard to understand?</p>
<p>I decided I wanted to clean up the Network layer, modularize it, and make a few other small improvements to composition and UI. I created a separate sample app to showcase these changes. Links to my sample project (which includes all the code I will mention below) and the original project are at the bottom of this article.</p>
<p><a href="https://betterprogramming.pub/clean-code-review-removing-all-the-extra-types-162b539b58f4"><strong>Visit Now</strong></a></p>