关闭。这个问题是opinion-based.它目前不接受答案。想要改进这个问题?更新问题,以便editingthispost可以用事实和引用来回答它.关闭8年前。Improvethisquestion例如,关于单一职责原则:让我们谈谈Radio类:有人可能会争辩说Radio类有两个职责,即音量和电台管理。这些操作将从使用它的客户端的完全不同的区域调用。因此我们有这个:一切顺利。但我总是看到这样的句子:Sonowwhenweneedachange,allthecodedependingonthebrokencomponentdon’tevenneedtoberecompiled.等一下!
关闭。这个问题需要更多focused.它目前不接受答案。想改进这个问题吗?更新问题,使其只关注一个问题editingthispost.关闭8年前。Improvethisquestion我在采访中被问及哪个系列违反了S.O.L.I.D原则??谁能解释它是哪一个以及如何解释?
我有以下示例,其中我倾向于使用几个类来创建一个简单的Web应用程序。文件层次结构是这样的。>cupid-libs-request-router-database-view-bootstrap.php-index.phpindex.php只是调用bootstrap.php而后者又包含如下内容://bootstrap.phpnamespacecupiduserequest,router,database,view;spl_autoload_register(function($class){/*autoload*/});$request=newview;$response=newrespo