you are viewing a single comment's thread
view the rest of the comments
[–] 36 points 2 years ago (5 children)

I'm sure there are a lot of reasons why PHP is better than Python for the backend, but I created an app wirh Symfony 5 and then an app with Django 4.

Symfony is so weird compared to Django. With Django I can just sit down and get things done. Symfony always seems to have some quirks which are mostly due to PHP (and me not knowing how to program in PHP).

That said, PHP hosting is so much easier and cheaper, this probably is important for smaller projects.

  • source
  • hideshow 10 child comments
  • [–] 12 points 2 years ago (3 children)

    You don't need a framework for PHP. That's the beauty of it, you don't need anything. You cannot build a website with Python without a framework.

  • source
  • parent
  • hideshow 6 child comments
  • [–] 4 points 2 years ago (2 children)

    Isn’t all hosting containerized at this point? Is hosted, language specific servers still a thing?

    I’ve been out of the market for a while now and just run everything as containers on aws and gcp

  • source
  • parent
  • hideshow 4 child comments
  • [–] 1 point 2 years ago (1 child)

    Many older projects don't get migrated to containerized infrastructure and smaller businesses don't want the overhead it creates to run a single app/webpage. Plain LAMP with FTP access is still the most common way to host I think (and thus the cheapest if you consider the amount of work that would need to be invested to containerize).

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 2 years ago (1 child)

    Interesting. I never really realized how it was more my path changing than the entire industry.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 2 years ago

    The industry is surely changing, but "the industry" is mostly geared towards enterprise, because it's where the money is. But the large amount of webpages are not enterprise pages but personal blogs, small businesses etc.

  • source
  • parent
  • [–] -3 points 2 years ago (1 child)

    Lets just say that Python was a language that was never supposed to be used for anything production related. PHP's memory management and multi threading capabilities are WAY more solid and less prone to leaks than Python 's.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 3 points 2 years ago (1 child)

    As someone that used PHP professionally for literal decades, the PHP hate is so meme-y.

    Its biggest problem is that it allows you to do some truly cursed things. The same can be said about other languages, but PHP really doesn't do much to set you up for success, especially as a new-intermediate coder.

    With opcache, it became fast enough for basically most web backends, and as a language overall it does seem to be evolving and shedding off some of the crap that used to make it truly horrible in the hands of a new person. At least the type-juggling stupiderrors

    Now I mainly use go and python (only because I have to on this one), and I would put Python and PHP on a similar level of "fuck this language" moments

  • source
  • parent
  • hideshow 2 child comments
  • [+] -11 points 2 years ago (1 child)

    For the backend? Why? I could see PHP being better for the front end considering it's basically a templating language already, and setting up Python on a webserver is much more complex, last I tried.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 15 points 2 years ago (1 child)

    PHP is a server-side language, how do you plan to use it for the front-end? Good luck with that!

  • source
  • parent
  • hideshow 2 child comments
  • [–] -3 points 2 years ago* (last edited 2 years ago)

    Oh, I see what you mean. I thought you meant output HTML and templating vs server side logic, but yes, obviously I know the difference as the only front-end language is JavaScript and derivatives.

    I'm more used to the terms 'server-side' and 'client-side' btw. Obviously PHP is server-side. But not all server-side is backend in my view. I consider backend to be application logic and things like database access. Templating can be done on the server or the client, and that's front-end.

  • source
  • parent