Re:Why is OOP still so widely spread?
by esperent on Thursday September 03, 2020 @05:21AM
(#24362239)
1. None of the programming languages I use regularly have the concept of a main() function (not dismissing the point, just saying it's language specific).
2. Yeah, heard this one many times. It seems very hand wavy to me.
3. That's more a cost/benefit analysis than an explanation of the difference.
> Lot of frameworks actually are a combination of two things:
> 1. the actual "way of building apps" > 2. useful library of functions
This describes React pretty much spot on. And yet, React people are very determined to point out that it's React is a library, not a framework.
The hollywood principle is actually to me the definitive criteria. You plug your code into React and React ends up orchestrating and coordinating between your code, thus it is in charge of calling it and in what order etc.
That's normally what I would call a framework.
Now I don't know, maybe there's ways to use React only as a library, not sure if it would provide any benefit in that way.
2. Hollywood principle. Library: you call us. Framework: we call you.
3. Frameworks are good for novices in certain paradigm because they guide along a standardised way to build apps. If you however find the framework's way not precise enough or its abstraction leaky then you will have a hard time escaping from the straightjacket.
Lot of frameworks actually are a combination of two things:
1. the actual "way of building apps"
2. useful library of functions
Lot of people would like to start with 1 and use 2 to guide them in the beginning, but drop 1 later on. Unfortunately frameworks couple 1 and 2 together very tightly making many people not even consider such frameworks.