Table of Contents

Common Concepts

Domain Model and Its Role

The foundation of the RecroGrid Framework is the domain model, which describes the business objects (entities) of the application, their properties, and relationships. This model defines the data structure and provides the common foundation for business logic, data access, server-side services, and the user interface. Based on these definitions, the framework assembles integrated application functionality at runtime while developers can focus on the domain and application-specific business requirements.

The central role of the domain model allows business logic and data structures to operate as a unified whole. A single, well-defined model is used across multiple levels of the application:

  • Database Layer: The classes of the domain model can be directly mapped to the database structure through Entity Framework, providing a consistent relation between application objects and the relational database. Model changes flow through the Entity Framework data layer and can be reflected in the database schema through standard Entity Framework schema management.
  • Business Logic: The entity classes represent real-world business concepts and provide the foundation for business rules and validations. For example, marking a field as required in the model class allows the framework to apply the rule consistently across data handling and the user interface.
  • User Interface: The framework creates display components based on the entities defined in the domain model. For each entity, professional data management interfaces can be assembled at runtime, including forms for data entry and grid views for browsing, filtering, sorting, and working with business data.
  • Client-Server Integration: The same domain definitions and framework metadata drive the RecroGrid Framework client runtime, server runtime, API services, validation, and data operations. This shared foundation keeps the client and server closely aligned as one integrated application platform.

A domain entity is defined once and the same definition can be used throughout the solution. Shared domain types and framework contracts allow client-side and server-side code to work with consistent structures and metadata, strengthening type safety and reducing duplication across application layers.

The domain model initiates the runtime automation of the RecroGrid Framework. As soon as the business entities are defined, the framework recognizes and uses these definitions to assemble the required application capabilities. With a well-structured domain model, the RecroGrid Framework provides default forms, list views, data handling functions, validation, and communication services for each entity. The data layer, business logic, server runtime, API services, client runtime, and user interface are therefore based on the same definitions and operate in a coordinated way.

This shared model allows developers to concentrate on application-specific business logic and professional user requirements while the RecroGrid Framework provides a consistent integrated foundation across the solution.

Runtime Automation in Action

One of the most innovative capabilities of the RecroGrid Framework is its dynamic runtime automation. The framework provides a high-level abstraction layer that turns domain definitions and configuration into a functional application environment with minimal developer input. At runtime, it assembles the visual, data-handling, communication, and framework-level services that belong to the application model.

Based on the entities described in the domain model and the related configuration, the RecroGrid Framework provides the following integrated building blocks:

  • Forms and Data Grid Views: Interactive forms for entering and editing data, and tabular list views for working with records. Fields, controls, search, filtering, sorting, and related behavior are aligned with the entity definitions and framework configuration.
  • Data Handling Logic and Sources: Integrated data services and Entity Framework-based operations handle querying, persistence, validation, transactions, and business data processing according to the domain model and application rules.
  • API Services and Endpoints: Domain-aligned API services required by the RecroGrid Framework client-server communication are published automatically. They provide querying, validation, data operations, business actions, authorization-aware processing, and related framework services to the client runtime.
  • Client-Server Communication: Serialization, request handling, authorization integration, framework responses, and error processing are coordinated by the RecroGrid Framework communication layer, providing a consistent and strongly typed contract between client and server components.

These capabilities form a common runtime rather than isolated generated elements. Grid views, forms, validation, authorization, API services, client communication, business logic, and data access operate as integrated parts of the RecroGrid Framework.

The default runtime functionality is immediately usable from the early stages of development. Once the domain model and application configuration are available, the RecroGrid Framework provides a professional working foundation that includes the standard data-management, communication, and user-interface capabilities of the application. Developers can then concentrate their implementation effort on application-specific business requirements and specialized behavior.

Runtime automation is complemented by runtime configuration and deep code-level extensibility. The same framework-provided foundation can be adapted through metadata and operational settings, while C# extension points provide detailed control over business logic, services, data handling, and user interface behavior.

Integrated Client-Server Architecture

The RecroGrid Framework integrates client-side and server-side application behavior through a unified .NET architecture. The same language, domain definitions, framework contracts, and development environment support the complete solution, while the framework coordinates the responsibilities of the browser-facing application and the backend runtime.

The main technologies of this integrated environment are:

  • ASP.NET Core and C#: The foundation of the browser-facing host, backend services, API endpoints, authentication integration, and server-side business operations.
  • Blazor and C#: The interactive user interface technology used by the RecroGrid Framework client runtime. Blazor enables client-side application behavior to remain within the .NET and C# development environment.
  • Entity Framework: The object-relational mapping and data-access foundation aligned with the domain model. Entity Framework integrates the application entities with database querying, persistence, transactions, and schema management.
  • Bootstrap: The default presentation foundation for the RecroGrid Framework user interface, combined with the framework's visual abstraction and support for additional component libraries.
  • Visual Studio: The primary integrated development environment for building, debugging, extending, and maintaining the complete .NET solution.

The RecroGrid Framework client runtime, API communication layer, server runtime, business logic, and Entity Framework integration are designed to operate together. Shared domain classes and framework contracts keep data structures and behavior aligned across the application and provide strongly typed communication between the client and server layers. An entity definition can therefore participate consistently in server-side processing and in the client-side code that presents and works with the same business data.

Business rules, validations, and authorization decisions are applied by the server runtime during client operations, and their results are returned through the integrated communication layer so the user interface can respond immediately and consistently. Where application design benefits from it, selected logic such as validation rules or calculations can also be shared across client-side and server-side .NET code.

flowchart TD
    ui[Blazor UI]
    client[RecroGrid Framework client runtime]
    communication[Integrated API communication]
    server[RecroGrid Framework server runtime]
    business[Business logic and Entity Framework]
    database[(Database)]

    ui --> client
    client --> communication
    communication --> server
    server --> business
    business --> database

The browser-facing boundary can be implemented through different application models while the RecroGrid Framework client-server integration remains based on the same framework concepts.

For new applications, the recommended model uses a browser-facing Blazor host application together with a separate backend API application. The Blazor application contains a host/server part and an interactive client part that are developed as one browser-facing application and deployed together.

flowchart TD
    browser[Browser]
    host[Blazor host application]
    api[Backend API application]
    database[(Database)]

    browser --> host
    host --> api
    api --> database

The host/server part owns the application origin, OpenID Connect sign-in, the authenticated session, SessionAuth endpoints, and the API proxy. The interactive Blazor client provides the UI, route structure, and RecroGrid Framework client integration. SessionAuth keeps the interactive client aligned with the host-managed authenticated session, while client API requests return to the host origin and are forwarded through the API proxy.

The separate backend API application hosts the RecroGrid Framework server runtime, business logic, entity operations, Entity Framework integration, and database access. This architecture provides an integrated browser-facing application with centralized authentication and API access while preserving a clear backend application boundary.

Standalone Blazor WebAssembly Application

The RecroGrid Framework also supports a standalone Blazor WebAssembly application model. In this model, the browser-hosted Blazor WebAssembly client contains the UI, OIDC client behavior, bearer-token handling, and direct API client integration, while the RecroGrid Framework server runtime remains in a separate backend API application.

flowchart TD
    browser[Browser / Blazor WebAssembly application]
    api[Backend API application]
    database[(Database)]

    browser --> api
    api --> database

This model provides a direct browser-to-API application structure and remains suitable for standalone and existing Blazor WebAssembly solutions.

For the detailed deployment view, development view, request flow, and configuration guidance for each model, see Application Models.

Runtime Configuration and Code-Level Customization

The RecroGrid Framework combines runtime automation with metadata-driven configuration and deep C# customization. These capabilities form a continuous development model in which a functional application foundation is available immediately, operational settings can refine behavior at runtime, and application-specific requirements can be implemented through standard .NET code.

Runtime Configuration

Many aspects of application behavior and presentation are represented as configuration data interpreted by the RecroGrid Framework at runtime. Authorized users can adapt application behavior through integrated framework tools, including:

  • Form layouts, field grouping, visibility, and default values.
  • Grid columns, sorting, filtering, and saved views.
  • Authorization and permission-related settings.
  • Entity and presentation metadata.
  • Application behavior exposed through RecroGrid Framework runtime configuration.

Runtime configuration allows business applications to respond quickly to operational requirements. Settings stored in the framework configuration and metadata are applied directly by the running application, allowing configuration changes to take effect immediately in the production environment.

Code-Level Customization

The complete runtime foundation remains deeply extensible at code level. Developers can use standard C#, .NET, ASP.NET Core, Blazor, and Entity Framework techniques to implement application-specific behavior with detailed control over the solution.

Code-level customization can include:

  • Business rules and application services.
  • Event handlers and extensibility points.
  • Custom data handling and Entity Framework behavior.
  • Custom API and server-side operations.
  • Client-side logic and Blazor components.
  • Presentation behavior and integration with supported UI component libraries.
  • Application-specific services that participate in the RecroGrid Framework runtime.

The relationship between these capabilities can be viewed as a progression:

flowchart LR
    automation[Runtime automation]
    configuration[Runtime configuration]
    customization[Code-level customization]

    automation --> configuration
    configuration --> customization

Runtime automation provides the professional working foundation, runtime configuration adapts that foundation to operational requirements, and code-level customization provides full control for specialized business needs. These levels work together within the same integrated architecture.

Application-specific business logic and C# code are built with standard .NET concepts and remain cleanly separated from the internal implementation details of the RecroGrid Framework. This supports maintainable application architecture and allows domain logic, services, calculations, and other reusable .NET code to participate naturally in other .NET projects where appropriate.

The RecroGrid Framework uses widely supported .NET technologies with minimal external dependencies. This contributes to straightforward integration, long-term maintainability, predictable upgrades, and stable development projects. Solutions can evolve over time while preserving both the benefits of the RecroGrid Framework runtime and the freedom of standard .NET development.

Next step

See Also