Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. COThere is a problem with creating additional classes. In some environments extra classes mean more tables which means more queries which can result in slower performance. In web MVC environments this is the most evident. Furthermore, if no other classes use these "satellite" classes it implies that the satellite classes actually are part of that singular responsibility that the original class should be handling. More code does not mean less cohesion. You should also consider that it should be easy for another developer to create a single object and call a function without worrying about phases.
      singulars
    2. CO@Parris, database access performance is another topic which doesn't seem to apply in the specific case of the OP. About the scope of the singular responsibility, consider the *reductio ad absurdum* explanation in the answer by @David Thornley. And about developer convenience, it depends entirely on the public interfaces provided by the service -- you can have both high cohesion and ease of instantiation.
      singulars
    3. COI understand the reductio ad absurdum principal and yes division of code is absolutely necessary. In this case however I don't think it makes any sense. First of all, speaking from an OOP perspective, a class should mimic some sort of real world object. What is a ParseXML, MergeXML or a XMLService class. Parse and merge sound like function names not like classes. I suppose Parse and Merge can follow the adapter pattern in some sense. The structure described does not seem elegant :/. That being said, perhaps its the best solution in an OOP only paradigm.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload