11

I had the oppertunity to join a non profit organization to help them automate stuff instead of serving the army. One of their core applications got rewritten like a year ago from a terrible and very old Symfony stack to Laravel / React.

The guys who were in charge for the rewrite didn't really adapt the mindset of either MVC for Laravel nor the component idea behind React. There are a few controllers in the backend, but they sometimes have functions defined which would clearly belong in a model or service class. They rarely defined relationships on models, instead they're joining the tables together for the same effect. The frontend rendering mostly happens in for loops over the returned array from the API instead of breaking things down into little components. This ends in components which have sometimes over 1000 lines with super-nested logic in it.

But I did find my favorite piece of code today in of the controllers. Some many questions ...

Comments
  • 1
    Js...?

    Edit:
    Though the tag says php..
  • 1
    @just8littleBit and welcome to devRant if this is your first account.
  • 2
    It's PHP :)
    Well, first account, but I've been hovering around this site for a while but I didn't have anything to post prior to this.
  • 2
    @coffeejumper so php is just as fucked up as JS? :/
  • 2
    @just8littleBit The PHP ecosystem is much slower than JavaScript, which is kinda nice to keep up with the changes. I don't like the language itself too much, it is pretty inconsistent. Some methods actually modify your variable and return nothing, other return a bool, others copy your variable and change that one. I mean, PHP started as a template engine basically for HTML and got "abused" to be in the spot like it is today. Kind of the same story that happend to JavaScript.
  • 0
    @coffeejumper yeah, it was actually never even meant to be a programming language.. at least that’s what the founder said AFAIK..
Add Comment