Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
really? never cared to look internally at most major composer projects? Laravel? Symphony? no?
-
myss44504yhttps://github.com/symfony/demo
I see you're best practice enthusiast, you can't get better example of best practice in PHP then Symfony. -
devJs13264y@HiFiWiFiSciFi extending extended class that was extended by another extended class. well I guess we do have different opinions on software architecture in general.
The favorite one I stumbled upon is making php API endpoint return HTML file with embedded HTML table instead of plain JSON which enforces me to write Satan summoning ritual in JS on the client-side to get the values out!
This is some custom php backend I am talking about, there's no Zend, Symfony or Laravel included in the project.
JS is nor my first nor last language, but I completely understand your resentment. -
devJs13264y@myss exactly, thanks for the suggestion.
the thing is that I always worked with folks who did some custom php development and there always was that elephant-in-the-room-feature (no pun intended) nobody wanted to touch because of code smells, hacks and spaghetti code. -
Ask @linuxxx he is PHP pro, no spaghet I presume.
In all honesty, because PHP allows spaghetti, most write spaghetti.
But as soon as you use Composer and some tood old namespacing and braincells, you can write beautiful code. -
@devJs ah, I see. You might like what you see inside of those frameworks :D lots of good OOP techniques, docs and practices man :D
-
hjk10156964y@devJs the composer project is nicely written aswell.
Double inheritance is not a bad thing and used in almost all OO Frameworks.
As long as it realy makes sense in doing so. This means that composition is generally preferred as are traits and interfaces. Sometimes traits can become more spaghetti than inheritance though. -
hjk10156964y@PonySlaystation omg I finally know what Yii is now. Always misread it as the Yui JS framework 😱
-
irene33914y@HiFiWiFiSciFi I’m not sure if that is bashing the other languages or complimenting JavaScript.
Related Rants
Genuinely asking some rare pokemon php developers that are up to date with the tech (all php devs I know stopped learning when my grandpa was like 5 years old) to show me php code that is not spaghetti bolognese. I am asking this as I am yet to witness such code for the first time in my life (and I am coding since 94')!
rant
bolognese
php
just works tm