Q:

Do Rich Domain Models mean large domain classes are acceptable?

I have been reading a lot about SOLID and Domain Driven Design, then the debate on Anemic Domain Models and Rich Domain Models.   I personally prefer the approach where an object will encapsulate its own domain knowledge, however as there is seemingly some difference of opinion I have some questions:

Depending on the type of system, the main domain classes could get quite big, even if the logic of the methods are in separate classes.   Is it generally acceptable that Single Responsibility Principal is ignored here, or is there a way of encapsulating say an Order with 50 fields and 50 methods, into a nice structure that does not leave you with a 1mb class, or is this acceptable given the encapsulation approach?     
Is there any guideline or rule of thumb on what should still go into a Domain Service or even Domain Factory, while trying to maintain an Rich Domain Model and encapsulation?

A:

SRP always applies. I would ask myself if that entity makes sense as a whole, or it would be easier to understand it and work with it if you are able find some internal substructure and split it that way.
If you have a 50-fields order, it might actually be a classical case where bounded contexts apply, that is where an order can be viewed differently by different subsystems, and only parts of the order are needed by each subsystems.
For "Domain Factory" the rule of thumb is that it contains anything related to the object creation.
For "Domain Service" it seems to be a stateless pile of logic that doesn't fit logically in entities. see this.
P.S. I don't think that a 1 MB class (10K lines of code or more) is ever acceptable by any software design methodology (unless it is generated code, and thus is not intended for humans). Unfortunately sometimes the code reaches that state accidentally, due to lack of design planning, fear of refactoring, or deliberate omission (a decision to postpone the tech debt). That depends on the app and programming languages, but my personal rule of thumb is to start worrying and improve the design if the class reaches 1K lines, or even a bit before that.

