TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Testing in Node.js by example using the SOLID principles

10 点作者 christian_fei将近 5 年前

1 comment

compressedgas将近 5 年前
No. That&#x27;s not what the SRP means at all. The SRP is specifically about interfaces and how each interface should be responsible to a single client. An object that serves more than one client should implement each of the interfaces required. The original article is quite clear on what the SRP is.<p>Please don&#x27;t confuse SOLID and Clean Code.<p>I don&#x27;t mind if you want to follow the Clean Code statement of: Each function should do only one thing. But that isn&#x27;t the SRP.
评论 #23471721 未加载