What is a domain class? Why "domain"? Are there methods that it should not have (which is not of its function to have certain type of method)? Does it support what types of methods?
What is a domain class? Why "domain"? Are there methods that it should not have (which is not of its function to have certain type of method)? Does it support what types of methods?
There are controversies.
It is generally accepted that it is a class that represents business entities. It is common for classes to serve as aggregates of other classes that are also domains or mechanisms (for example, what makes data persistence).
Some say that it must be an anemic class, that is, it has no methods, or it only has them linked to the fields. Others admit that they can have other types of methods linked to the domain, that is, to the business rule. There are no methods associated with the software itself.
Some say it's any class. Even the mechanisms have their own domain.
There are those who say that the term is neither correct and there is only the domain model and not the class, because the domain is composed of several classes.
Anyway, it's something conceptual in the negative sense. It is a term that does not live up to what people actually use, it is confusing, it does not help to give better understanding and I prefer to ignore it in the way it is presented. If you create better things defined for the same idea it might become interesting.
Of course, anyone who learns in a way and likes will say that it is right and that it is great. Good for this person. See if it's good for you. For me it is not.
Domain classes are used to create the various elements in the domain, and domain relationships are the links between the elements. They are the design-time representation, the elements and links that will be instantiated by the users of the specific design language when creating their templates.
Its properties are:
Access modifier: The access level of the domain class (public or internal).
Custom Attributes: Used to add attributes to the source code class that is generated from this domain class.
Generates two derivatives If True, a base class and a partial class (to support customization through overrides) will be generated. For more information, see Replacing and Extending Classes Generated by. Has a custom builder: If True, a custom builder will be provided in the source code. For more information, see Replacing and Extending Classes Generated by.
Inheritance modifier: Describes the inheritance type of the source code class that is generated from the domain class (none, abstract, or sealed). none Base class If this domain class is derived, the name of the base class. Name: The name of this domain class. Home namespace: The namespace of this domain class. Current namespace Notes Informal notes associated with this domain class. < > > Description The description is used to document the user interface of the generated designer.
Display Name: The name that will be displayed in the generated designer for this domain class.
Help keyword: The optional keyword that is used to index F1 Help for this domain class.