单例&工厂模式
Class 类中五大基本原则
单一职责原则SRP(Single Responsibility Principle)
开放封闭原则OCP(Open-Close Principle)
里氏替换原则LSP(the Liskov Substitution Principle)
依赖倒置原则DIP(the Dependency Invereion Principle)
接口分离原则ISP(the Interface Segregation Principle)
Class 类的规范 高内聚、低耦合
单例模式:
单一的连接数据库的实例【资源】==单例解决的问题:提高我们网站的运行速度三私一共

工厂模式:


浙公网安备 33010602011771号