News for hackers. Stuff that matters.
Re:Case against OOP is understated, not overstated (2020) by ajuc on Friday February 11, 2022 @01:56AM (#30297950)
This is true, and another thing about state is also true - relational databases are much better suited to handle state cleanly and to minimize the amount of it than programming languages (except maybe prolog). Especially OOP languages are bad at state minimalization. For example there's no commonly used equivalent to normal forms in oo. There are no indexes and no materialized views.

The funny effect is - if you want to minimize state and you're serious about it - keep everything you can in database and make a 2-layered (relatively thin) client <-> relational db architecture. With stored procedures. We were there in 90s and we moved away because web and OOP became fashionable.

So we took our clean, normalized, minimal state from db and made it messy and complicated with ORMs to satisfy OOP gurus :)

Re:Case against OOP is understated, not overstated (2020) by kaba0 on Friday February 11, 2022 @02:42AM (#30298278)
I don’t think ORMs are fair choice as prototypical examples of (good) OOP. But I agree that having data (record) primitives is very important in some given domains (and that relational databases are really powerful). There are other cases as well which are not as data-oriented though.
Re:Case against OOP is understated, not overstated (2020) by ajuc on Friday February 11, 2022 @07:20AM (#30300543)
ORMs were the OOP way in 00s and 10s.
Re:Case against OOP is understated, not overstated (2020) by hardolaf on Friday February 11, 2022 @09:24AM (#30301809)
People also moved away from that paradigm because databases are slow. I work in the world of optimizing TLP level communications over PCI-e buses. To me, a database access is already in the world of "why bother?".
Re:Case against OOP is understated, not overstated (2020) by ajuc on Friday February 11, 2022 @11:19AM (#30303193)
We moved from

    DB <-> Front end
to

    DB <-(ORM)-> APP SERVER <-> FRONT END
I don't think it's any faster :)
Re:Case against OOP is understated, not overstated (2020) by t00 on Thursday February 17, 2022 @03:22AM (#30370722)
Simple reason - add local or distributed cache to the app server, scale it along front end horizontally and you can handle several orders of magnitude more traffic.