I have looked at a couple of books and all I have looked at were just discussing the technicalities of OOP. By technicalities I mean, here's a concept, here's some code, now get working. I have yet to see a book that discusses the architectural process, what are the ways of doing this, why doing this is bad, how to actually incorporate design patterns in a real-world project, etc.
Can you recommend a good resource or book? I am mainly programming with PHP but a language-agnostic book/resource would do :)
I like Craig Larman's Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and Iterative Development (3rd Edition). Most PHP programmers would do well to learn habits like design patterns and GRASP.
You could also "keep it in the family" and read the free online book Building Skills in Object-Oriented Design by Stack Overflow top-ten scorer Steven Lott.
I've had The Object-Oriented Thought Process on my wishlist for a few months, but I haven't got my hands on it yet. The reviews and snippets I've seen are positive, though. You'd need to supplement it with language-specific details from the PHP reference on Classes and Objects, but I think most of the fundamentals should translate well enough, provided you can port the examples.
Edit: Oops. If you're looking for something more advanced, I've also got these two on my list:
- Design Patterns: Elements of Reusable Object-Oriented Software
- Patterns of Enterprise Application Architecture
If you are really interested into architecture, not just basic design of small pieces, look at the Patternoriented software architecture series. Domain driven design might be also a good books for you.
精彩评论