113
you are viewing a single comment's thread
view the rest of the comments
[-] TCB13@lemmy.world 4 points 9 months ago

Anything JS / NodeJS doesn't work like that and that's precisely one of the issues with it. Node will also keep running a process in the background even if the website/app isn't ever accessed wherever PHP won't be running anything until a request comes.

[-] expr@programming.dev 3 points 9 months ago

Yikes, pretty bizarre considering stateless endpoints is the gold standard.

Re: persistent process, that doesn't seem like a big deal, to me. It's pretty normal since you often want to keep some common stuff going, like metrics. Unless you're doing something crazy it should really take next to no resources while idling.

[-] adrian783@lemmy.world 2 points 9 months ago

for content sites, stateless is fine. for web apps you need states of all different kinds. even the smallest detail is a state in an application.

endpoints themselves are stateless, but the web application is stateful. you only have to build the world once, and its much friendlier for end users.

[-] expr@programming.dev 1 points 9 months ago

I wasn't talking about frontend state, just the server. Frontend state is kind of irrelevant, tbh.

load more comments (1 replies)
load more comments (1 replies)
this post was submitted on 04 Jan 2024
113 points (95.9% liked)

Programming

17248 readers
319 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS