S.O.L.I.D — Design Principles

Image for post
Image for post

Software Design Principles

Where do SOLID principles come from?

Single Responsibility Principle

Image for post
Image for post
Image for post
Image for post
Implementation of OrderHistoryDAO and OrderDataFormatter
Image for post
Image for post
Re-factored OrderHistoryManager Class

Open/Closed Principle

Image for post
Image for post
Implementation of PaymentProcessor and PaymentHandler
Image for post
Image for post
Implementation of PaymentHandler and CreditCardPaymentHandler
Image for post
Image for post
PaymentHandlerFactory Implementation and Re-factor of PaymentProcessor

Liskov Substitution Principle

Image for post
Image for post
MessageService Implementations
Image for post
Image for post
NotificationService Implementation

Interface Segregation Principle

Image for post
Image for post
Implementation of InkjetPrinters
Image for post
Image for post
Re-factored Implementation for InkjetPrinters

Dependency Inversion Principle

Image for post
Image for post
CartService Implementation
Image for post
Image for post
Implementation of PostgresDataStore and MySQLDataStore
Image for post
Image for post
Re-factored CartService Implementation

Conclusion

Building People, Process and Products

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store