In today's lesson, we're gonna discuss the SOLID principles in detail, where each letter refers to one good practice in software development. Our explanations will contain brilliant illustrations from Deric Bailey (CC-SA 3.0 license) and, of course, practical examples. This article is more advanced and assumes the knowledge of at least Basic Good Practices for Software Design. In addition to SOLID, there's also a series of bad practices that we should avoid, STUPID. You can find the link to it at the end of the article.
SOLID, an acronym, sums up the most important best practices. If you follow them, your applications will have a potential of the quality software. Derick Bailey created a perfect series of illustrations for the SOLID practices to help you remember them. We'll explain the principles in detail, let's say what the acronym means first:
- Single Responsibility Principle
- Open/closed Principle
- Liskov Substitution Principle
- Interface Segregation Principle
- Dependency Inversion Principle
Image: Mark Nijhof, Twitter
"Software development is not a Jenga game." If you don't know Jenga, it's a game about building a tower of blocks as high as possible until it falls down. Software development mustn't be only about functionality, but also about maintaining the architecture, the support system, preventing the application from falling apart.
SOLID - Single responsibility principle
Image: Derick Bailey, CC-SA 3.0
...End of the preview...
ict.social is a large database made up of manuals and tutorials, whose main goal is to provide high-quality IT education to everyone. We started out in the Czech republic, where we display roughly a million articles per month and receive plenty of gratitude from our users. Thanks to our successful establishment, we are now bringing these articles to the rest of the world.
Although we are trying to keep our content free of charge, maintaining the site is a huge effort for everyone involved. Therefore, some content (exercises and more advanced material) costs network points. Don't worry, they're really cheap :)
Requested article covers this content:
Practical examples on the SOLID best practices, the SRP, Open/closed, Liskov substitution, Interface segregation and Dependency Inversion principles.
Buying this article gives you unlimited access to it forever. You will learn some more and help us keep giving our site maintenance which helps you and others get better futures. It's a win-win.
You gain points by supporting our network. This is done by sending a helpful amount of money to support the site, or by creating content for the network.
You can get points immediately using:
|Credit card||SMS||Wire transfer|