3 ms·
The code is horrible: https://github.com/ad-aures/castopod/blob/develop/app/Views/Components/DropdownMenu.php https://github.com/ad-aures/castopod/blob/develop
by husainfazel 4y ago
The code is horrible:
https://github.com/ad-aures/castopod/blob/develop/app/Views/Components/DropdownMenu.php https://github.com/ad-aures/castopod/blob/develop/app/Views/...
Tight coupling of the HTML/PHP and JS.
If they were going to use PHP, at least they could have used Laravel or Symfony and had standardized libraries for authentication, views etc.
I just checked their Composer.json, looks like it uses CodeIgniter ... so maybe there is a framework in there but still the code quality is atrocious:
https://github.com/ad-aures/castopod/blob/develop/composer.json https://github.com/ad-aures/castopod/blob/develop/composer.j...
- jraph 4y agoLooks fine to me. Returning HTML code in a render function is even pretty standard, I've seen this in Python / Flask too. Judging code quality is hard, it seems to me the best clue is how it is easy to add new features / do refactors without breaking things, not how you feel about PHP and HTML being mixed.
- tinus_hn 4y agoLooks like a mess with code cutting and pasting HTML together, escaping things without a clear plan. That’s a sign of a million security problems waiting to happen.
- sschueller 4y agoI am not a fan of tight coupling PHP with HTML but here they are using a components style of code which is very similar to the way it's done in VueJs.
- hk1337 4y agoAnd when did public properties become acceptable for classes? I’m skeptical about setting the property values directly like that, I’ve seen weird issues show up from doing that.
- lakomen 4y agoPeople like you are why I abandoned PHP