The foundation is the top priority ~ the meaning of interface-oriented programming

Uncle believes that interface-oriented has the following functions

1 Implement polymorphism

2 In the development of the team, define the interface first, and other developers follow the interface to cooperate with DI to realize their own business, without waiting for you to implement all the specific business. Uncle thinks this is the most important, sometimes we see the business layer What is the use of defining the interface, the business is rarely polymorphic, it is not like the data layer, you can have a very suitable way of persistence, in fact, the role of the business layer interface is for other people to use, for the "pseudo" interface"

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325250357&siteId=291194637