shop icon indicating copy to clipboard operation
shop copied to clipboard

Violations of solid

Open carana08 opened this issue 1 year ago • 0 comments

In this repository several very interesting design patterns are presented, and for educational purposes I was able to identify the violation of several SOLID principles:

Single Responsability Principle This class could be in violation of the principle https://github.com/RojerAlone/shop/blob/1161b7b7ad35fbe9afa156ab34f87c0bce065722/src/main/java/cn/cie/services/impl/KindServiceImpl.java#L1-L94 Maybe it could be solved like this image image image image

Open/Closed Principle The principle is violated here: https://github.com/RojerAlone/shop/blob/1161b7b7ad35fbe9afa156ab34f87c0bce065722/src/main/java/cn/cie/services/impl/UserServiceImpl.java#L1-L106 Maybe it could be solved like this image image image image

Interface Segregation Principle The principle could be violated here: https://github.com/RojerAlone/shop/blob/1161b7b7ad35fbe9afa156ab34f87c0bce065722/src/main/java/cn/cie/services/OrderService.java#L1-L68 https://github.com/RojerAlone/shop/blob/1161b7b7ad35fbe9afa156ab34f87c0bce065722/src/main/java/cn/cie/services/impl/OrderServiceImpl.java#L1-L165 The solution: image image image image image image

Dependency Inversion Principle In this class, the principle is violated: https://github.com/RojerAlone/shop/blob/1161b7b7ad35fbe9afa156ab34f87c0bce065722/src/main/java/cn/cie/services/impl/OrderServiceImpl.java#L1-L79 The possible solution: image image image image image

carana08 avatar Jun 23 '23 01:06 carana08