163

So, you start with a PHP website.

Nah, no hating on PHP here, this is not about language design or performance or strict type systems...

This is about architecture.

No backend web framework, just "plain PHP".

Well, I can deal with that. As long as there is some consistency, I wouldn't even mind maintaining a PHP4 site with Y2K-era HTML4 and zero Javascript.

That sounds like fucking paradise to me right now. ๐Ÿ˜

But no, of course it was updated to PHP7, using Laravel, and a main.js file was created. GREAT.... right? Yes. Sure. Totally cool. Gotta stay with the times. But there's still remnants of that ancient framework-less website underneath. So we enter an era of Laravel + Blade templates, with a little sprinkle of raw imported PHP files here and there.

Fine. Ancient PHP + Laravel + Blade + main.js + bootstrap.css. Whatever. I can still handle this. ๐Ÿคจ

But then the Frontend hipsters swoosh back their shawls, sip from their caramel lattes, and start whining: "We want React! We want SPA! No more BootstrapCSS, we're going to launch our own suite of SASS styles! IT'S BETTER".

OK, so we create REST endpoints, and the little monkeys who spend their time animating spinners to cover up all the XHR fuckups are satisfied. But they only care about the top most visited pages, so we ALSO need to keep our Blade templated HTML. We now have about 200 SPA/REST routes, and about 350 classic PHP/Blade pages.

So we enter the Era of Ancient PHP + Laravel + Blade + main.js + bootstrap.css + hipster.sass + REST + React + SPA ๐Ÿ˜‘

Now the Backend grizzlies wake from their hibernation, growling: We have nearly 25 million lines of PHP! Monoliths are evil! Did you know Netflix uses microservices? If we break everything into tiny chunks of code, all our problems will be solved! Let's use DDD! Let's use messaging pipelines! Let's use caching! Let's use big data! Let's use search indexes!... Good right? Sure. Whatever.

OK, so we enter the Era of Ancient PHP + Laravel + Blade + main.js + bootstrap.css + hipster.sass + REST + React + SPA + Redis + RabbitMQ + Cassandra + Elastic ๐Ÿ˜ซ

Our monolith starts pooping out little microservices. Some polished pieces turn into pretty little gems... but the obese monolith keeps swelling as well, while simultaneously pooping out more and more little ugly turds at an ever faster rate.

Management rushes in: "Forget about frontend and microservices! We need a desktop app! We need mobile apps! I read in a magazine that the era of the web is over!"

OK, so we enter the Era of Ancient PHP + Laravel + Blade + main.js + bootstrap.css + hipster.sass + REST + GraphQL + React + SPA + Redis + RabbitMQ + Google pub/sub + Neo4J + Cassandra + Elastic + UWP + Android + iOS ๐Ÿ˜ 

"Do you have a monolith or microservices" -- "Yes"

"Which database do you use" -- "Yes"

"Which API standard do you follow" -- "Yes"

"Do you use a CI/building service?" -- "Yes, 3"

"Which Laravel version do you use?" -- "Nine" -- "What, Laravel 9, that isn't even out yet?" -- "No, nine different versions, depends on the services"

"Besides PHP, do you use any Python, Ruby, NodeJS, C#, Golang, or Java?" -- "Not OR, AND. So that's a yes. And bash. Oh and Perl. Oh... and a bit of LUA I think?"

2% of pages are still served by raw, framework-less PHP.

Comments
  • 58
    Moral of the story:

    If you migrate to a new framework, only do it if you can set some clear milestones and FINISH THE FUCKING MIGRATION COMPLETELY.

    If you want to move to microservices, make a clear plan about strangling the monolith to death within a reasonable time frame.

    Switch from JQuery to Angular? Good for you, kid. Now go clean up that fucking legacy until ZERO percent of it remains.

    The way most companies develop projects is like eating half a meal every day for a year, just piling new plates on heaps of moldy vegetables and rotting slabs of meat.

    "LOOK WE SERVE THIS AMAZING FREERANGE EGGS BENEDICT WITH FRESHLY SQUEEZED JUS D'ORANGE TO OUR CUSTOMERS".... "eh yeah but why is there a slimey piece of decomposed eggplant sticking to the bottom of my fucking plate?"
  • 55
    Also, whenever some new junior tells me in their interview:

    "I'm a fullstack developer"

    I start laughing out loud. Then I start crying.

    Then I start yelling: "RUN WHILE YOU STILL CAN! THE STACK HAS NOT SMELLED YOUR INNOCENT SOUL YET"
  • 11
    I cry ๐Ÿ˜ข but only in joy I'm not alone
  • 13
    wait, no ancient soap-api?
  • 16
    @SuspiciousBug Shhh I pretend XML does not exist. Oh and Imagemagick, that certainly doesn't exist. CSV export buttons, and worse, XLS export buttons... THEY DO NOT EXIST.
  • 15
    Take your upvote. That was beautiful.

    Err... sorry, typo... I meant that was HORRIBLE, AWFUL, DISGUSTING... and representative of WAY too many places these days.
  • 12
    I like to call this “Tuesday”.
  • 9
    Or "Why I Gave Up Trying to Update My Coding Skills"
  • 4
    Things quickly get outta hand eh.

    API first and small SPAs plus mobile apps seems like a good path to me

    However do most businesses *really* need more than a monolithic web app with a sprinkle of PWA?
  • 6
    Crazy shit. If it's page oriented it's not suited for SPA. The A stands for application. Of you actually build an application. Something that needs to be interactive than you go SPA ideally on a subdomain so you can split your marketing/documentation site from the application (URL namespacing also works but less clear).
    Moving to a framework like Laravel has to be because of a reason. It's doable to embrace the constructs and reuse the business logic you had. Using it side by side has to be justified.

    Never seen this much technical dept build up in the stack. This sounds like an insecure mess. Do you guys manage to do security updates at all?

    Hope you get a CTO that dares tackle the tech dept.
  • 6
    Seems to me that someone did not say NO few thousand times... If it aint broke don’t touch it
  • 10
    @PurgeXenos It's fine to migrate to more modern paradigms. But I think a company should focus on one upgrade at a time, and completely finish it before moving on to some other operation.
  • 3
    You just write out my current situation
  • 3
    @bittersweet yeah thank god I was saved by my senior dev.. She said stop being full stack and I guess she is pretty much right ..heheh I don't tell anyone now
  • 7
    @yowhatthefuck Perfect code never exists, but you need to at least reach some equilibrium where "new ways of working" aren't iterated upon faster than legacy is cleaned up.

    It's fine to develop a standardized API v2 and still support a messy API v1 as well for a while, but if you want to move to a v3 using GraphQL, first clean up v1 — and while you're working on an API migration, maybe also wait a bit with refactoring the whole database.

    And consider that every "improvement" also comes with a cost.

    If you have a thousand API endpoints which follow an odd but consistent format, that might be better than moving everything to compliant REST and getting stuck half way discovering it's too much work.
  • 3
    I hope all of those components run on separate clouds so it’s cross cloud solution.
  • 3
    @vane As with everything at this company... About half-half.
  • 4
    Best rant I've seen in recent history
  • 6
    @SuspiciousBug Btw it's actually worse than just Soap... We have a microservice which transforms requests between Soap XML, REST and GraphQL, and it has its own postgres database to store which internal & external services use which format and how to apply transformations.
  • 3
    @bittersweet ah, so you can integrate any 3rd party API out there? Very good for potential new clients! Good for business. Very flexible! This must be this "agile" thing I keep hearing about!
  • 4
    You know what, I really need a whiskey. Fuck, you made me rethink shit.
  • 2
    Sounds like my old job ๐Ÿ˜„
  • 2
    This is a real gem of a rant!
  • 4
    There needs to be one arsehole.

    Who says No. And if No is ignored, says: Fine, under the condition of budget plan and project cost under your jurisdiction.

    You want it - then take responsibility for it.

    When everyone starts doing whatever the hell they want, you end up with a fuckton of shit.

    It might not be hip to not use the newest shit available - but it's sane.

    Define a fixed set of requirements* that every project must have. Nuke everything that doesn't fit into this tightly defined environment… and live a happy live.

    *Max. set of requirements: which requirements are either most common and / or have the longest possible life.

    eg. use postgres, but define a target version. 13 is still very hot, 12 is more conservative.

    Migrate everything to PostGres 12 and everything new must be PostGres 12.
  • 0
    Not in a Dev world, but exactly the same thing is what I see over there. A mixture of everything someone said it was good. Nothing properly implemented once there is no time/that would ruin something someone wanted to do other way.
  • 4
    @IntrusionCM That asshole you speak of, that bitch, she’s usually me. Management always always hates me for it, but fucking hell it’s always such a giant mess if they always get what they think they want.

    Fuck sales running the company.
    Fuck middle managers dictating development.

    Fuck interns and cowboys running blindly ahead and selling the non-devs VIPs on the merits of their keyboard diarrhea which then everyone needs to support for life.

    Fuck your requests and spur of the moment demands. You can’t plan out a huge sprawling puzzle box with thousands of moving parts by doing whatever sounds good at the time. Leave that to someone who might actually have a clue. And if she says your idea is stupid or will make things harder/slower/expensive/messy, she probably has a damn good reason for it that you probably can’t understand if you tried.

    Don’t demand the architect designs a building differently unless you actually understand the plans and know better.
  • 1
    @Root Yep. I know the pain.

    But as u already know, oh goddess of the wise bitches, alcohol helps to endure the pain. ;)

    Laphroaig comes at 4th.

    *me dances the happy bitchy arsehole dance*
  • 4
    @Root

    My boss always says to me: "You have an uncanny ability to be right about things 6 months before others realize you're right, but can't you be a bit more diplomatic, a bit more professional when you speak your mind?"

    The sad truth is that effectively presenting evidence that things are rotten through diplomacy requires people to listen to diplomacy in the first place.

    If I wasn't a vulgar asshole once in a while, those 6 months of catching up to tech debt would be 6 years.

    *Speaks in chaotic evil voice* "You created me, you forged me in to the monster I am today"
  • 2
    @bittersweet If I’m a sweet little dev, nobody ever pays attention to me. They hardly even remember I’m there, let alone what I say.

    If I’m a bitch, it forces people to listen, if only to tell me to stop being such a bitch.

    There’s really no in between.
  • 0
    @Root @bittersweet I have found compassion and positive encouragement works.

    I usually go around to respective team members and share my mind like "look pal, this is gonna be bad. Here's why.
    It's gonna be much easier later on when X,Y,Z enters the scope."

    If positive encouragement doesn't work, then I just flip it to a negative context.

    Then at meets, I present it and try to involve them.
    Of course I'm careful, observing whether they would be comfy with it.

    Last resort is to yap up and bitch about it.
    As that usually flames my ass.
  • 1
    Bittersweet just do grunt work if your just a high paid slave. As long as it passes and satisfy the bosses. All employees are replaceable. Don't put your blood and sweat to it unless it is your own company. Work smart.
Add Comment