Brandon Savage has posted a set of five tips on how you can make your object-oriented code work better and be easier to maintain in the long run.
Last week, I did a talk at the Frederick Web meetup about tips and tricks for improving your object-oriented code. A lot of these tips were adapted from a fabulous presentation by Stefan Priebsch but the ideas are by no means original to him, and theyâ€™re exceptionally good ideas when youâ€™re talking about object-oriented code. Slides are at the end of this blog post, and I'm happy to do this talk over again for local groups.
His list of five is:
- Use Objects. Lots of Objects
- Use Interfaces To Make APIs Predictable
- Use Dependency Injection
- Composition Over Inheritance
- Create Loosely Coupled Classes