DEV Community

Discussion on: Why OOP HTTP frameworks?

Collapse
tofraley profile image
Taylor Fraley

If you're saying that handling HTTP requests fits an FP approach really well, I agree with you there. I wouldn't go so far as to say that OOP doesn't make any sense there, though. There are tons of OOP web frameworks, so it seems like they make sense to a lot of people.
I know we like to talk about using the right approach for the job, but that's not usually so obvious. OOP folks are quick to say that UIs are inherently OOP and FP makes no sense for a UI. But, in my opinion they often have a limited understanding of FP. They've never used Elm or something Elm-like, for example. They often confuse classes and types, and assume FP languages can't accurately model data.
I'm not saying there is no right answer. I'm saying it's easy to tell ourselves that the right answer is obvious.