The complexity that lives in the GUI
I&#x27;ve written front end for nearly all of my 13 years in this field. I&#x27;ve written some absolute dumpster fires in my time and have also written some very large and complex UI&#x27;s successfully. I would like to think I have some insight to add here. I agree with a lot of the points brought up in this article. I&#x27;d like to add a few more points about why I think FE can be such a pain to get right:<p>1. Mixed concerns and a lack of application layering. In React code bases and others like them, its not uncommon for me to find business logic embedded directly inside the components themselves. This makes the component inherently coupled to the specific implementation its being used and can only be re-usable in other contexts by passing in modifier flags to the props etc. In my opinion, components should be mostly of the stateless flavor and delegate anything not directly related to their immediate UI concerns elsewhere. This increases the likelihood of re-usability of your components and makes testing business and component logic much much more straight forward.<p>2. This might just be my personal experience, but I&#x27;ve noticed a bit of a dismissive attitude around design patterns and traditional computer science principles among my front end brethren. YAGNI and all that. While I think its fair that the UI != to the back end, I think frequently the baby gets thrown out with the bath water. For instance, I frequently leverage dependency injection in my front end work as a way to make my code more flexible and testable. It&#x27;s hard to sell the benefits of something like DI until your application grows in complexity to the point that you are dealing with things like nested mocks in your tests and&#x2F;or need to make a non trivial change to some piece of functionality. I&#x27;ve been seeing the winds start to shift a bit on this which is encouraging.<p>3. Most of the time there is little to no overall _conceptual integrity_ to a given front end code base. Its uncommon for me to come into an existing code base and have anyone be able to tell me what the architecture is comprised of. Things like what logic lives where and why. I&#x27;m not saying people _don&#x27;t_ do this, but in the more gnarly code bases I&#x27;ve encountered, this &quot;accidental architecture&quot; is more common.<p>4. Front end is still see as &quot;easy&quot; and the place you stick the less experienced engineers first. I sincerely hope this doesn&#x27;t come off like I am gatekeeping or anything. I work with some absolutely brilliant people who are only a year or two into their career and much smarter than me. IMO its less about skill and more about having been burned enough times to know where unexpected complexity lie.<p>I love front end. Its challenging and interesting and maddening. My hope is that it will continue to mature and grow to the point that it gets the same respect as other disciplines within this field. These days I work full stack so its not all I do, but it will always be my favorite. :)