Skip to main content

Best practices and recommendations

This section provides best practices and recommendations for creating construction kits.

General guidelines

Naming conventions

  • Use PascalCase: Use PascalCase for naming construction kits, entities, and properties. PascalCase is a naming convention in which the first letter of each word in a compound word is capitalized.
  • Use singular nouns: Use singular nouns for naming entities. For example, use Product instead of Products.
  • Use verbs for actions: Use verbs for naming actions. For example, use CreateProduct instead of ProductCreation.
  • Use prefixes for related types: Use prefixes for related entities. For example, use ProductCategory instead of Category.
  • Use prefixes for enums: Use prefixes for enums. For example, use ProductStatus instead of Status.

Construction kit structure

  • Separate concerns: Separate concerns by creating separate construction kit libraries for different functionalities. For example, create separate construction kits for product management, order management, and user management.
  • Use folders and files: Use folders to organize construction kit elements. Folders help in organizing construction kit elements and make it easier to navigate through the construction kit.
  • Use versioning and version control systems: Use versioning to manage changes in construction kits. Versioning helps in tracking changes and maintaining backward compatibility. Use version control systems like Git to manage construction kit libraries.
  • Use comments: Use comments to document construction kit elements. Comments help in understanding the purpose and usage of construction kit elements.
  • Use inheritance: Use inheritance to define common properties and behaviors. Inheritance helps in defining common properties and behaviors that can be reused across different construction kit elements.
  • Use enums: Use enums to define predefined values. Enums help in defining predefined values that can be used as options for properties.
  • Use customization extensions: Use customization extensions to extend predefined values for enums. Customization extensions help in extending predefined values without modifying the original definition.
  • Reuse libraries: Reuse libraries to avoid duplication. Reusing libraries helps in avoiding duplication and maintaining consistency across construction kits.

Design new Construction Kit Libraries

We usually start designing a new construction kit by help of Design Tools like Draw.io, Miro, Lucidchart, or Microsoft Visio. The design tools help in visualizing the construction kit structure, relationships, and elements.

Ty to follow the following steps:

  • Identify entities: Identify entities that represent real-world objects or concepts. Entities are the building blocks of construction kits and represent real-world objects or concepts.
  • Define properties: Define properties for entities. Properties represent attributes or characteristics of entities.
  • Define relationships: Define relationships between entities. Relationships represent associations or connections between entities.
  • Identify libraries: Identify existing construction kit libraries that can be reused. Reusing existing libraries helps in avoiding duplication and maintaining consistency across construction kits.

Create a visual representation of the new construction kit structure, relationships, and elements.

danger

At the end of the day we create digital twins. It is crucial to base the development on a specific use case to avoid the risk of over-engineering. A well-defined use case ensures that the digital twin is tailored to solve real-world problems and provides actionable insights, rather than being an overly complex or generic solution. By focusing on the practical application, resources are effectively allocated, and the digital twin deliver s maximum value by aligning with business objectives and operational needs. This approach prevents unnecessary complexity and keeps the digital twin both scalable and efficient.

The next sections describe typical use-cases OctoMesh provide construction kits or functionality for.

Localization and classification

In a Data Mesh architecture, one of the critical functionalities is the localization and classification of data based on various criteria such as geographic locations, functional areas, and product perspectives. This ensures that data can be easily discovered, accessed, and understood within the context of its origin and intended use. By organizing data across these dimensions, the system enables more efficient data governance, enhances cross-functional collaboration, and supports a decentralized approach to data management that aligns with the core principles of Data Mesh.

OctoMesh provides for that reason the Basic construction kit library, which contains the basic elements for localization and classification. The Basic construction kit library includes the following elements:

  • Tree: Represents a hierarchical structure that can be used to organize data based on geographic locations, functional areas, or product perspectives.
  • TreeNode: Represents a node in a tree structure that can be used to store data or metadata.
  • Asset: Represents a digital asset that can be stored and managed within the system. An Asset is derived from TreeNode and inherits its properties and behaviors.

Let's show the structure of the Basic construction kit library with the help of a diagram.

It is possible to define different Trees for the different localization and classification purposes. For example, a Tree can be used to organize data based on geographic locations, another Tree can be used to organize data based on functional areas, and another Tree can be used to organize data based on product perspectives.

An Asset is a digital asset that can be stored and managed within the system. An Asset is derived from TreeNode and inherits its properties and behaviors. An Asset is a child element of a specific TreeNode and can be associated with multiple TreeNodes for localization and classification purposes.

It is a good practice to specialize the Asset entity for specific use-cases. For example, you can create specialized entities like Machine, Injection Molding Machine, Extrusion Machine, CNC Machine, and Robotic Arm that inherit from Asset and add specific properties and behaviors.

Start creating libraries

We usually start with a new construction kit library by creating a new project. There are two ways to create a new construction kit library, using a .NET project template or using the compiler, see Start creating libraries.