Signum Documentation

The documentation comes from the Markdown files in the source code, so is always up-to-date but available only in English. Enjoy!

Paste your Framework commit SHA

EntityKindAttribute

EntityKindAttribute tries to classify entity types in two different aspects:

  • EntityKind: What's the role of the entity in the system.
  • EntityData: What's the live-cycle of its data.
  • IsLowPopulation: Whether the number of elements is usually small enough to use a EntityCombo instead of a EntityLine.

By classifying the entities we get two main benefits:

  • Better default behaviors at the user interface, cache, etc...
  • Once we are used to the terminology, the entity classes are also easier to understand.

EntityKind

Classifies the role of the entity in the system:

  • SystemString: Simple entity created by the system. Doesn't make sense to view since there's not to much to see. (ie: PermissionSymbol)

  • System: The entity is automatically generated by the system. (ie: ExceptionEntity)

  • Relational: An entity that connects two entities to implement a N-to-N relationship in a symmetric way (no MList<T>). (ie: DiscountProductEntity)

  • String: Doesn't make sense to view it from other entity, since there's not to much to see. (ie: CountryEntity).

  • Shared: Created and shared by other entities. (ie: a CustomerEntity that can be created while creating the order).

  • Main: Used and shared by other entities, but too big/important to be created or modified from other entity. (ie: OrderEntity).

  • Part: Entity that belongs to just one entity and should be saved together, but that can not be implemented as EmbeddedEntity (usually to enable polymorphism). (ie: ProductExtensionEntity).

  • SharedPart: Entity that can be created on the fly and saved with the parent entity, but could also be shared with other entities to save space. (ie: AddressEntity).

The decision you take will affect the default in the user interface and operations:

RequiresSaveOperation IsCreable IsViewable IsNavigable IsReadOnly
SystemString
System Always
Relational
String IsSearch IsSearch
Shared Always Always
Main IsSearch Always
Part IsLine
SharedPart IsLine Always
  • RequiresSaveOperation: Requires the entity to define a Save Operation. System entities are not save protected because are created by the system, and parts because can be saved as part of their parents.

  • IsCreable: Shows the create (+) button in the user interface. System entities can not be manually created, and String and Main only in SearchControl, while Part and SharedPart only make sense to create them on-the-fly on the parent entity.

  • IsViewable: Shows the view (->) button in the user interface for all entities but String and SystemString, that have nothing to show, and Relational that is used from the SearchControl.

  • IsNavigable: Shows the navigate ([]) button in the user interface for all entities but SystemString and Part and Relational.

  • IsReadOnly: Makes SystemString, System and Relational read-only.

This classification, while confusing at first, allows the framework to provide better default behaviors at the UI, and ensures that operations are registered accordingly.

EntityData

EntityData is simpler, it classifies entities in two groups:

  • Master: Entity created for business definition, by default ordered by id Ascending and cacheable (ie: ProductEntity, OperationEntity, PermissionEntity, CountryEntity...)
  • Transactional: Entity created while the business is running, by default is ordered by id Descending and not-cacheable (ie: OrderEntity, ExceptionEntity, OperationLogEntity...)

IsLowPopulation

The optional IsLowPopulation can be set to true to let the framework know that very few instances are expected for this type. The main usage is to have EntityCombo instead of EntityLine in SeachControl filters.