I am learning OOP and MVC framework.
The tutorial I use has a ton of Abstract Classes and Static Methods.
does not feel very OOP to me. hehe
The latest and very soon to be released PHP Framework is CodeIgniter4
I just checked and it has 16 from a total of 316 PHP class files that use abstract - just over 5%
I agree that the use of static methods is not a very good idea apart from some quite exceptional situations. When used correctly (!) though, I don’t see a problem with abstract classes, if they come with the framework and implement (part of) an interface that also comes with the framework, implemented in a way that makes sense for the most common use cases.
That would give you the 90% use case out of the box, while still allowing to completely roll your own by implementing the interface yourself.
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.