0 points

It’s hard to justify using anything other than JS or if you wanna be fancy, Web Assbly, for the FE.

Any other front end language involves generating Javascript from your language, which inevitably ends up with you making a weird Frankenstein project that mixes the two.

I’d rather just use stuff like Webpack or Vite to compile my JS front-end out of JS (or TS) from the start. It always ends up being a cleaner result.

My backend though can be whatever the fuck I want it to be.

But if you ever think dynamically compiling/transpiling a JS front end on the fly on demand is a good idea, instead of simply just delivering static pre-compiled/transpiled pages, you’re part of the problem for why the web is so slow and bloated.

It’s wild how crazy of projects people will build that take 3 entire seconds to just deliver a 500kb static form that doesn’t even need angular to do anything. They turn a couple hundred kb into several mb for no useful reason, it’s wild.

permalink
report
reply
0 points

To my understanding, you can’t really use WebAssembly for the frontend - it doesn’t support manipulating the DOM, so you still need to offload a lot of the work to JS. It’s an uncontested language when it comes to web frontend.

permalink
report
parent
reply
0 points

It does support it, it’s just slower than JS. WA is faster in other aspects though, so frameworks that compile to WA (like the Rust framework Leptos) still end up being faster than a lot of JS ones.

permalink
report
parent
reply
0 points

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.

permalink
report
reply
0 points

Django is pretty nice, yeah. We also have good compiled webapps, with go and rust. Gitea for example uses go.

permalink
report
parent
reply
1 point

Isn’t Wordpress powering like 40% of the internet? PHP isn’t going anywhere anytime soon.

For me the weirder part of that meme is Python in 2022?

permalink
report
reply
0 points

PHP is amazing

If you’re thinking of PHP version less than 8 you need to have another look

Totally stateless. Uncached server side rendered response times in double digit milliseconds.

Types

Extremely battle, highly tested frameworks.

Excellent tooling for tdd, bdd, static analysis, automated browser testing, coding standards and auto fixing. Even fully automated refactoring for things like package upgrades (Rector)

Regular, solid, releases bringing updates and fixes

Arguably one of the best package management systems, Composer. And only one, none of this constantly changing tooling that some other ecosystems seem to do

Properly open source platforms to power all kinds of web projects from e-commerce, CRM, social, scraping, analytics, monitoring, API, CMS, blogging

Basically if your target is server side web stuff then it’s really good

Or, you can continue to demonstrate how out of touch you are by continuing with the old “PHP bad” jokes if you want!

permalink
report
reply
0 points

What’s wrong with version 8?

permalink
report
parent
reply
0 points

Dude was saying that 8 is good, but people still think of version 5 when talking about PHP. Not recommended to still use in 2023.

permalink
report
parent
reply
0 points

Uncached server side rendered response times in double digit milliseconds.

Thirst thought, that sounds slow. But for the use case of delivering html over the Internet it is fast enough.

permalink
report
parent
reply
0 points

Double digit milliseconds sounds slow to you?

permalink
report
parent
reply
0 points

For a bit of templating? Yes! What drives response times up is typically the database or some RPC, both of which are out of control of PHP, so I assume these were not factored in (because PHP can’t win anything there in a comparison).

permalink
report
parent
reply

Programmer Humor

!programmerhumor@lemmy.ml

Create post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.

Community stats

  • 5.2K

    Monthly active users

  • 878

    Posts

  • 8.8K

    Comments

Community moderators