Hacker News new | ask | show | jobs
by husainfazel 1354 days ago
The code is horrible:

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.j...

3 comments

Looks 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.

Looks 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.
I 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.
And 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.

People like you are why I abandoned PHP