Skip to content

About

Domain Services is a self-service platform of reusable components for developing service-oriented applications in .NET. It is based on domain-driven design and clean architecture.

Technically, Domain Services is a collection of software components (libraries) deployed as individual NuGet packages. At the lowest level Domain Services is a framework for developing service-oriented components. At a higher level it provides a number of data-agnostic stateless services within various domains such as time series data and -analysis, geospatial data and -analysis, job execution etc. All of the domain services expose a .NET API as well as a Web API (REST/HTTP).

Furthermore, Domain Services is the center of a larger ecosystem of functionality that also comprises a sophisticated workflow engine and a collection of React components.

Why use Domain Services?

There are many good reasons for using Domain Services - for example openness, composability and extensibility.

Openness

Domain Services is governed using an internal open-source process – a process that is similar to that of open-source software – only practiced within the boundaries of DHI. This means that every software developer within DHI can easily consume as well as contribute to the Domain Services components. The Domain Services components are easily accessible (as NuGet or NPM packages) for any software developer within DHI.

Composability

Domain Services is a collection of decoupled software components ("LEGO bricks") that can be used to compose project-specific customized applications. The Domain Services ecosystem is a flexible "self-service" open platform from which you can pick-and-choose whatever you need.

Extensibility

Due to its architecture, Domain Services is highly extensible. It exposes a number of extensibility points to plug in to, so that everybody interested can easily contribute with new extensions.

How do I get it?

The backend (.NET) components of Domain Services are deployed as NuGet packages on nuget.org.

There are several types of components, all following the below NuGet package naming convention:

Category Package Names Example
Core DHI.Services
Services DHI.Services.{domain} DHI.Services.Jobs
Web APIs DHI.Services.{domain}.WebApi DHI.Services.Jobs.WebApi
Providers DHI.Services.{technology} DHI.Services.MIKECloud

The Domain Services components are built using .NET Standard 2.0, which makes them cross-platform components.

The NuGet packages are deployed using semantic versioning.

How do I get started?

For example, to calculate the moving average of some time series values in a dfs0-file, create a new console application, install the DHI.Services.MIKECore NuGet package and copy the dfs0-file to the bin folder of your application. Then the following C# code will do the job:

var timeSeriesRepository = new Dfs0TimeSeriesRepository("TaarbaekRev_Spectral.dfs0");
var timeSeriesService = new TimeSeriesService(timeSeriesRepository);
var movingAverage = timeSeriesService.GetValues("Hm0").MovingAverage(10);

For additional information on how to use the .NET-services, see the Cheat Sheet.

For a broader overview of the different ways to utilize Domain Services, see How to Leverage Domain Services.

Who uses Domain Services?

Domain Services is used in numerous projects ranging from smaller research projects to fully fledged operational systems such as NCOS Online.

Additional resources