Skip to main content

CRUD and Data Operations

CRUD​

CRUD stands for Create, Read, Update and Delete. Every data elementData Element (DataElement). A fundamental data concept or entity within an application's domain, acting as an anthropomorphic translation of a real-life object or concept. gets CRUD functionality generated in every layerLayerLogical separation of functionality within a single system/application, focused on code organization. of the applicationApplicationThe overarching model container grouping all components, domain logic, and configurations for an enterprise solution.:

  • Data LayerLayerLogical separation of functionality within a single system/application, focused on code organization.:
    • Automatic generation of table definitions, primary keys, foreign key constraints, and indexes.
    • Annotations for a persistency framework (JPA)
  • Logic: Java classes featuring a CRUD interface for business logic implementation
  • Control: API REST endpoints for remote integration
  • View: User interface forms and tables for creating and updating instances

An NS applicationNS Application (NSApplication). A pre-built software stack that provides common enterprise application functionality such as CRUD, search, authentication, and business process modeling out of the box. can be utilized with just this default CRUD functionality. Most applicationsApplicationThe overarching model container grouping all components, domain logic, and configurations for an enterprise solution., however, also need domain-specific actions that implement certain business logic.

Building on CRUD​

Domain-specific behavior can added in two ways:

  • Data OperationsData Operation (DataOperation). A type-safe action (e.g., Create, Update, Custom) executed on DataElement instances to modify data or trigger business logic. for manual actions, triggered by a user or systemSystemA set of interconnected components that work together to achieve a specific purpose or function. explicitly
  • Workflows for automated processes

Both typically build on the provided CRUD interface, as many actions consist of a sequence of create, read, and update operations integrated with domain-specific logic.


Data Operations​

A Data OperationData Operation (DataOperation). A type-safe action (e.g., Create, Update, Custom) executed on DataElement instances to modify data or trigger business logic. is an action on one or more instances of a data elementData Element (DataElement). A fundamental data concept or entity within an application's domain, acting as an anthropomorphic translation of a real-life object or concept.. It is modeled on the data elementData Element (DataElement). A fundamental data concept or entity within an application's domain, acting as an anthropomorphic translation of a real-life object or concept. itself, and generated through all layersLayerLogical separation of functionality within a single system/application, focused on code organization., including a button and form in the user interface. The elaborate model allows us to design different actions instead of implementing them custom.

A data operationData Operation (DataOperation). A type-safe action (e.g., Create, Update, Custom) executed on DataElement instances to modify data or trigger business logic. is described by:

  • Type lists all possible data manipulations such as BatchDelete or Create.
  • Parameter is any input fieldFieldA property of a DataElement expanded to a database column and user interface input element. that is used by the operation. T
    • parameterType: This can be a new input value, an existing fieldFieldA property of a DataElement expanded to a database column and user interface input element. of the selected data elementData Element (DataElement). A fundamental data concept or entity within an application's domain, acting as an anthropomorphic translation of a real-life object or concept. or even references to other data elementsData Element (DataElement). A fundamental data concept or entity within an application's domain, acting as an anthropomorphic translation of a real-life object or concept..
A booking example

The operation addBooking on Booking is of type Create, and has two parameters:

  • startBooking: fieldParameter that refers to the fieldFieldA property of a DataElement expanded to a database column and user interface input element. startBooking on Booking
  • selectedCar: associationParameter that refers to the Car element

Data operationsData Operation (DataOperation). A type-safe action (e.g., Create, Update, Custom) executed on DataElement instances to modify data or trigger business logic. change data. They can return a basic result (defined by a returnType), but they are not a way to retrieve data: for that, use Search.

Data Operations and Data Commands​

Older applicationsApplicationThe overarching model container grouping all components, domain logic, and configurations for an enterprise solution. may use Data CommandsData Command (DataCommand). [Deprecated] A legacy mechanism used for data input and custom action execution on DataElements, replaced by DataOperations. to model actions on data elementsData Element (DataElement). A fundamental data concept or entity within an application's domain, acting as an anthropomorphic translation of a real-life object or concept.. Data OperationsData Operation (DataOperation). A type-safe action (e.g., Create, Update, Custom) executed on DataElement instances to modify data or trigger business logic. are the official replacement: both serve the same goal of modeling actions on data elementsData Element (DataElement). A fundamental data concept or entity within an application's domain, acting as an anthropomorphic translation of a real-life object or concept.. But operations offer a more elaborate model and an easier way to implement custom actions. New applicationsApplicationThe overarching model container grouping all components, domain logic, and configurations for an enterprise solution. should use Data OperationsData Operation (DataOperation). A type-safe action (e.g., Create, Update, Custom) executed on DataElement instances to modify data or trigger business logic..