• expr@programming.dev
    link
    fedilink
    arrow-up
    11
    ·
    2 years ago

    Modern PHP isn’t half bad, and it has at least two major benefit over some of its competitors: Each request is a totally independent request that rebuilds the world. There’s no shared state (unless you want there to be).

    …isn’t that how every web framework works?

      • expr@programming.dev
        link
        fedilink
        arrow-up
        3
        ·
        2 years 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
          link
          fedilink
          arrow-up
          2
          ·
          2 years 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
            link
            fedilink
            arrow-up
            1
            ·
            2 years ago

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