Skip to main content
A newer version of this page is available. .

Server-Side API Overview

  • 2 minutes to read

The Web Dashboard comprises client and server parts:

  • The client part supplies end-users with a user interface for designing a dashboard and interacting with it.
  • The server part handles client data requests and provides various backend capabilities such as accessing data, storing dashboards, etc.

The Web Dashboard requires configuring various server-side options before first use. These include preparing a dashboard storage, registering predefined data sources, etc. Each platform (Web Forms, MVC, .NET Core) has a different approach to utilizing a server-side API.

The ASP.NET Core Dashboard uses an API exposed by the DashboardConfigurator class. The DashboardController handles interactions between client and server sides. The DashboardConfigurator‘s instance is passed to the DashboardController using the dependency injection.

Use the MvcBuilderExtension.AddDefaultDashboardController method to add the dashboard controller and register a default DashboardConfigurator instance as a singleton lifetime service in the dependency injection engine. This method also provides access to the DashboardConfigurator that is registered in the dependency injection as a default dashboard configurator:

using DevExpress.DashboardAspNetCore;
using Microsoft.Extensions.DependencyInjection;

// ...

public void ConfigureServices(IServiceCollection services) {
    services
        .AddMvc()
        .AddDefaultDashboardController((configurator)  => {
            // Configure dashboard server-side settings like a dashboard storage, predefined data sources, etc.
        });
}

If necessary, you can create and initialize separate DashboardConfigurator instances within an application to provide different server-side settings.