I realized I have a difficulty creating OOP designs. I spent many time deciding if this property is correctly set it to X class.For example, this is a post which has a few days: https://codereview.stackexchange.com/questions/8041/how-to-improve-my-factory-designI'm not convinced of my code. So I want to improve my designs, take less time creating it.How did you learn creating good designs? Some books that you can recommend me?
How did you get good practices for your OOP designs?
design;object oriented
Designing systems is one of the things that you can only get better at by doing. Of course, it does help a little to read about good design - the recommend general object-oriented design book is the Gang of Four's Design Patterns: Elements of Reusable Object-Oriented Software. There are also other books on design patterns and principles for different types of systems and within different domains.It's also best to get other people involved. After you create a design, present the problem(s) you are solving and the design to other people for a critical review. Listen to their feedback and have a dialog with them, focusing on why you made the decisions you did. As you are implementing the solution, you'll realize other problems with your design. Make note of these and learn from them. It might also be a good idea to work with other people to review the implementation against the design and requirements as well, and have a critical discussion of the reasons why you have done the things you did.Although I typically find it best to sit down with other people face-to-face, specific design questions can be asked about here on Programmers. There are also Stack Exchange sites for code reviews and implementation questions.