The Single Responsibility Principle.
单一职责原则。
Why is the Single Responsibility Principle important?
为什么单一责任原则重要?
An appropriate way to do this is to think of the Single Responsibility Principle.
单一职责原则是一个好方法。
I'd say that the very first step is to follow the Single Responsibility Principle.
我想说的第一步就是遵循单一责任原则。
The Single Responsibility Principle: a class should have only one reason to change.
一个类应该有且只有一个改变的理由。
The point of the Single Responsibility Principle isn't just to write smaller classes and methods.
单一责任原则的要点不仅仅是写一些更小的类和方法。
This goes against the Single Responsibility Principle [Martin2003], a means to the design goal of separation of concerns.
这违反了单职原则[Martin2003],这是分隔职能的一种设计方法。
In addition to separating component styles, it's good to separate global style using the single responsibility principle.
另外对于分离组件样式,将全局的样式按照单一责任原则抽离开是不错的。
The Single Responsibility Principle (SRP)2 states that a class or module should have one, and only one, reason to change.
单一权责原则认为,类或模块应有且只有一条加以修改的理由。
In a unit test, it's the same but smaller — because your unit obeys the single responsibility Principle, you're testing its single responsibility.
在单元测试中,它与实际用例相同或更小,因为单元服从于“单一职责原则”,您是测试它的单一职责。
Apply the Single Responsibility Principle to all components, services, and other symbols. This helps make the app cleaner, easier to read and maintain, and more testable.
所有组件、服务和其它符号都要遵循单一职责原则。这会使应用程序更干净,易于阅读和维护,提高可测试性。
Chapter 10 focuses heavily on The Single Responsibility Principle (SRP), a concept from Martin's previous work, Agile Software Development: Principles, Patterns, and Practices.
第十章主要讲述了单一职责原则(SRP),这个原则在Martin的另一本书《敏捷软件开发:原则,模式与实践》中也曾讨论过。
An easy way to follow the Single Responsibility Principle is to constantly ask yourself whether every method and operation of a class is directly related to the name of that class.
遵循单一责任原则的最简单办法就是不断地问自己是不是这个类的每一个方法和操作都与这个类的名称直接相关。
There are four things you can do to stay sane while using CSS at scale: use proper semantics, modularize, adopt a naming convention, and follow the single responsibility principle.
在大规模使用CSS的时候有保持理性,有一下四个方面的事情可以去做:适当的语义化,模块化,采用一种命名约定,并遵循单一责任原则。
You'll never reach true Open Closed nirvana, but you can inch much closer by rigorously following the related Single Responsibility Principle: a class should have one, and only one, reason to change
你永远也达不到真正的开闭天堂,但是通过严格地遵循与之相关的单一责任原则:一个类应该有并且只有一个更改的理由,你可以非常靠近地接近它。
You'll never reach true Open Closed nirvana, but you can inch much closer by rigorously following the related Single Responsibility Principle: a class should have one, and only one, reason to change
你永远也达不到真正的开闭天堂,但是通过严格地遵循与之相关的单一责任原则:一个类应该有并且只有一个更改的理由,你可以非常靠近地接近它。
应用推荐