cohesion
Cohesion VS. Coupling
This question will treat software like a tree, where: Each node in the tree represents some code unit (eg class \\ method \\ line etc.)[详细]
2023-03-25 09:51 分类:问答Keeping Coupling Low While Adhering to DRY
The mantra \"Keep high cohesion and low coupling\" (or some variant) is frequently tossed around.However, I find that it frequently conflicts with \"Don\'t repeat yourself.\"[详细]
2023-03-17 05:10 分类:问答Does the DAO pattern spoils cohesion /SRP?
Let\'s use as example: class AccountDAO { create(){..} read(){..} 开发者_运维问答update(){..} delete() {..}[详细]
2023-03-15 23:00 分类:问答Improving Cohesion and Coupling of Classes
I am given this set of code and need to suggest ways to improve the code\'s cohesion and coupling of the classes. But I thought these classes are quite well de-coupled since it looks like they are mak[详细]
2023-03-13 23:05 分类:问答Method Cohesion
I have persistent objects that are saved to the DB (insert, update, delete).开发者_开发问答 Is it better to combine this logic in a single method - Save or have 3 separate methods for cohesion?You sho[详细]
2023-03-02 15:02 分类:问答Coupling of objects
Assuming I have methods of doA(), doB() and doC() of classes A,B and C respectively. Than unless I am wrong, doA() method should belong to class A. It must be executed from Class A. If a method doA([详细]
2023-02-27 03:31 分类:问答Communication cohesion
There are coupling and cohesion for modules. OK. There are functional and communication cohesion. Functional cohesion is grouping by functionality. OK. Communication cohesion is grouping by input/outp[详细]
2023-02-16 09:13 分类:问答Which is "better" practice? Passing object references or object method references in Python
I\'m writing a small piece of code in Python and am curious what other people think of this. I have a few classes, each with a few methods, and am trying to determine what is \"better\": to pass obje[详细]
2023-02-03 02:41 分类:问答SRP: Why use instance field values instead of parameters?
I\'ve just read SRP, as easy as 123…, and all of it resonates with me except one paragraph, in a section named \"Cohesion\" (I\'ve claimed before to \"get\" Cohesion, but this talk of parameters vs i[详细]
2023-01-31 06:07 分类:问答High Cohesion and Concurrency - Are they conflicting interests?
I was reading Robert Martin\'s Clean Code and in that he mentions about the code being highly cohesive:[详细]
2023-01-16 03:50 分类:问答