Architecture Homicide: Meet the Characters

Architecture Homicide: Meet the Characters

Ahmed Ramy
·Feb 23, 2022·

4 min read

Subscribe to my newsletter and never miss my upcoming articles

Play this article

Table of contents

I’d spend a couple of hours studying, planning, and understanding a problem, just to solve it in minutes.

Let’s start with the Why? You will often see, especially in your younger days as a developer, the so-called famous Tournament of who holds the championship of the “Greatest Architecture of all”

But is there such thing? And even tho, why is it so great? A couple of people would say for Binding, some would say separation of concern, some would say…

image.png

Why you should ignore “Silver Bullet” and learn your arsenal instead?

While all opinions are to be respected and understood but deeming something as the greatest or the perfect in a non-perfect world coming from the fingertips of a non-perfect being is a not-so-perfect claim…

But, some approaches (yep, I am avoiding the word architecture) outshine others given a couple of different variables to take into account for…

The ability constraints

For example, asking a team who are not that great with OOP to implement a Microservices Backend Architecture using Scala (which is purely Functional) just because it’s GREAT, will give you the greatest firing in your whole career when the backend falls apart (am just exaggerating here, but seriously, never guide nor lead people on trends without understanding, you are betraying their trust and the responsibility you earn a living for)

The same goes in iOS, don’t ask people to use RxSwift with MVVM when all you have is just plain old MVC where the ViewController is massive and the architecture is “full of strange things that they call protocols and layers”

The consistency rabbit-hole

The same goes for strictly applying VIPER to a Terms & Conditions Screen where you just throw a bunch of text with some System font just for the sake of consistency and not getting confused (…in a terms & conditions page? I hardly believe that)

The Mr. Wrong-Tool-in-the-Wrong-Context

The same goes for strictly applying MVP with no KVO, Observables, Publishers or any dynamic way of flowing data in a social app or “Real-Time app”, just because MVP doesn’t work that way and we have to follow the LAW!

The “That doesn’t feel right” sensation and I’ll throw in your face any unreasonable excuse

The same goes for shying out of ReSwift, Redux, and Composable Architecture in an app that has tons of state changes and manipulation just because the idea of having a global function in the app doesn’t suit you or worse… “It bloats the Autocompletion”

The results

Guess what… all of these decisions are based on emotions, and emotions don’t go hand-in-hand with scalability because they are volatile, irrational, and sometimes has no explanation in a rejected code review or annual reviews for a promotion or appraisals when you miss the deadline just because you are going against Mother Nature in a Software Design perspective.

The hope?

Instead of using something for the sake of using it (Yep, that’s very very very famous in us humans until we learn better)

Teach yourself why was MVC made that way, and why Apple recommended the communication this way, and is MVC (the Massive one) the problem of the design, or the implementor?

Learning to put what in where

CleanShot 2021-11-05 at 02.36.04@2x.png

And when you get better in this area, you will see yourself going from that big of a ViewController ☝️

To that small 👇

CleanShot 2021-11-05 at 02.37.03@2x.png

And the above story would be something cool like… Coming to the office late and leaving early after I’ve learned that the whole design was changed and every team except mine is now forced to work hard but I only have to adapt the UI layer and its UIModel without any changes to the whole app, and after seeing a 350+ green checkmark on Fastlane’s terminal, I know it was time to enjoy my

New TestFlight Build released to Internal and Beta testers 🚀”
 🔔 Notification
And the release notes and changelogs getting updated Automatically

While I take myself to the front door of the office to enjoy an extra 30 mins of my hard-earned time through automated tests, CI pipelines, and automated deployment

That’s not a fantasy, nor are we talking bedtime stories of a Utopian career, that’s what you do with deep knowledge of architecture

But the question here is, Are we able to do all of that absolutely, that depends on one thing, is your code testable?

What’s the point of good Software Design?

See, one of the main goals of good Architecture is solving big problems by breaking them down into sub-systems, then a designer (presumably a senior or a lead), would take those problems, break them down even further, and hence, a structure is born, but seriously, why do we do all of this?

To test 👀

We combine a couple of letters, usually beginning with an MV- and slap a couple of different letters after the V, just to indicate a fancy new technology or a trend in the community that we want to sell to people that it’s the savior!

Only to find that it was just hype, and you hit the limitations in most probably a very simple use case

So always ask yourself, the Why? Is it important, does it add value? Or just another YAGNI thought?

 
Share this