Answer the question
In order to leave comments, you need to log in
Where can I find PHP books or courses that teach application design with OOP in mind?
I have been using PHP for a long time at work, but I have never written something really serious on my own. I know the basics of OOP, I know the concepts of MVC, I understand how popular frameworks like Yii and Laravel work, and I even often make some projects on them. But if I set the task of writing some kind of parser or data analysis system, I will write it, but it will be a bunch of shit code that works, but is absolutely not expandable in the future. Because I know how to read and use OOP code, but unfortunately I don't know how to design and write it. Often, if there is a task, I write a bunch of functions in a procedural style, where a lot of things are duplicated and ... it's good that it works at all.
Perhaps someone has come across some books or courses that show the difference in problem solving between procedural code and OOP? I would like to feel on specific examples why it will be easier and more optimal to build a certain interface and classes with methods than to code shit for the thousandth time? There is a lot of information on the web that chews up the very essence of OOP with its encapsulations and polymorphism, but here are specific examples of why writing as I am writing now is ineffective, and what needs to be changed in your head in order to stop starting to solve the problem by writing another function - I almost never met. You may have met...
Answer the question
In order to leave comments, you need to log in
I was once helped by the study of all design patterns from three sources: " Head First Design Patterns " + refactoring.guru + designpatternsphp.readthedocs.io . I analyzed each template and tried to understand why a pattern is needed here, and not procedural code wrapped in one class. The book on clean architecture also helped , but it came after the patterns. It's just important to fully understand why these approaches still exist and find two or three examples for yourself, because a single example to study can be one-sided and even wrong.
Also, these books and topics help to recover from the difficulties of solving problems on frameworks, because at last you begin to see the whole structure and interactions of modules and classes, and not just examples from the documentation you pull on business requirements)
Oh, my friend, so I understand you ......
But no matter how many books I read myself, I didn’t review the courses, it’s all about one thing, experience.
Which comes only through pain, sweat, torment, shame, suffering, several years of terrible code, and then a vision will come of how to do it cool and right, because while you experience all this for yourself, you will learn a lot.
So keep reading, writing, studying and everything will come by itself.
They don't need to be compared. These approaches complement each other. Inside the class methods, whatever one may say, you write procedural code.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question