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.
一个类应该有且只有一个改变的理由。
These components usually coalesce around a single responsibility or set of responsibilities.
这些组件通常结合实现单个责任或一组责任。
The point of the Single Responsibility Principle isn't just to write smaller classes and methods.
单一责任原则的要点不仅仅是写一些更小的类和方法。
In addition to separating component styles, it's good to separate global style using the single responsibility principle.
另外对于分离组件样式,将全局的样式按照单一责任原则抽离开是不错的。
This goes against the Single Responsibility Principle [Martin2003], a means to the design goal of separation of concerns.
这违反了单职原则[Martin2003],这是分隔职能的一种设计方法。
The Single Responsibility Principle (SRP)2 states that a class or module should have one, and only one, reason to change.
单一权责原则认为,类或模块应有且只有一条加以修改的理由。
Single Responsibility Principle was introduced Tom DeMarco in his book Structured Analysis and Systems Specification, 1979.
单一责任原则被Tom DeMarco引入,在他的著作“结构化分析和系统规约”中,在1979年。
In a unit test, it's the same but smaller — because your unit obeys the single responsibility Principle, you're testing its single responsibility.
在单元测试中,它与实际用例相同或更小,因为单元服从于“单一职责原则”,您是测试它的单一职责。
Every object in your system should have a single responsibility , and all the objects services should be focused on carrying out that 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
你永远也达不到真正的开闭天堂,但是通过严格地遵循与之相关的单一责任原则:一个类应该有并且只有一个更改的理由,你可以非常靠近地接近它。
Where is industry's and our recognition that protecting mankind's great treasure is the single most important responsibility?
企业和我们个人什么时候才能意识到保护人类的资源宝藏是最最重要的责任呢?
We felt that the safest approach was to assign responsibility for a given class's implementation to a single team member.
我们觉得最安全的方法是将每个类实现的责任交给单独的团队成员。
Since the same handler might be passed through while processing various URIs, any common responsibility is easy to code in a single handler.
因为在处理不同的URI时可能使用同一个处理器,所以很容易在一个处理器中编写通用的处理逻辑。
But every single day, I am thankful for the extraordinary responsibility that the American people have placed in me.
但在每一天,我感谢美国人民赋与我这个非凡的责任。
The person who facilitates a single study circle. This should be a facilitator's sole responsibility (don't make the mistake of asking facilitators to organize their own study circles).
主持单一研究小组的人。这应该是一个主持人的唯一责任(不应错误地要求主持人去组织各自的研究会)。
Single Source Responsibility: Obtain each type of carpet from one source and by a single manufacturer.
单一来源责任:必须保证每款地毯均为单一来源并来自同一厂家。
But they do not see the defence of the single currency as a British responsibility.
但是做为英国的责任,他们没有看到他对单一货币的防卫设备。
The single service chiefs would also get greater responsibility (and accountability) for managing their own organisations, a prospect they welcomed.
各个服务站的领将也将承受经营各自组织的更大的责任(义务),同时等待他们的是一个美好的前景。
Steering Pakistan's future is a pretty big responsibility and it should not be granted to those who are not ready to show single-minded allegiance to the cause.
引领巴基斯坦的未来是相当大的一份责任,它不应该交在那些尚未做好准备单一效忠之徒手中。
Where is industry's and our recognition that protecting mankind's great treasure is the single most important responsibility?
文国网企业和我们个人什么时候才能意识到保护人类的资源宝藏是最最重要的责任呢? ?
Justice will be done, and not a single soul escapes responsibility for what it has done.
对他们的审判会完成,任何人都不可能逃脱责任。
Every single person that reads this petition has now the chance to show responsibility and as well the opportunity to create a positive change for the whole world.
每一个读到这封请愿书的人当下就有机会展示责任力和机会去为了全世界创造一个积极的改变。
应用推荐