Skip to main content

Unit 1: Foundation of Domain Modeling and Implementation

Use Case for the Training Coursesโ€‹

In the following training courses, you will learn how to model and implement the "Orders" service โ€” a microservice that belongs to our demo application, RoboFlow. RoboFlow is a fictional e-commerce business we created to showcase how you can use the IBM DevOps Solution Workbench to develop your own microservices and complete applications. In this scenario, RoboFlow is building an online shop where customers can choose parts for robotics, add them to their shopping cart, and place orders. The Orders service is responsible for handling the creation and management of these orders, along with all related processes. To learn about inheritence we are going to distinguish between Customer and Internal Orders.

Use Case

By working through these courses, you'll gain practical experience in designing, building, and deploying microservices with the IBM DevOps Solution Workbench. For that purpose, we have prepared different versions of the "Orders" service as assets, that can be used as templates when doing the training. This shall ensure a fluent learning experience. In each course it is described which asset to work with.

Building your services using Domain-Driven Designโ€‹

Domain-Driven Design (DDD) is an approach for modeling complex systems that helps teams break down business domains into manageable, meaningful parts. By focusing on the real-world context of your application, DDD makes it easier to design software that accurately reflects the domain, reduces misunderstandings, and keeps everyone aligned throughout both the design and implementation phases.

The services you create with the IBM DevOps Solution Workbench are built around DDD principles. This means your application is structured around the core business domain and its business requirements, ensuring that technical design stays closely tied to business needs.

With DDD, you work with concepts like

  • Entities, which represent key objects in your domain that have a distinct identity and lifecycle. These entities capture the core data and behaviors relevant to your business.
  • Commands, which are explicit requests to perform actions that change an entities state.
  • Events are used to capture and communicate important changes in your system.

All this (and more) are part of the domain model, which reflects the real-world domain. This approach leads to clearer, more maintainable service designs.

By adopting DDD in your services, everyone involved - from developers to domain experts - naturally works with a ubiquitous language: a shared vocabulary based on the domain itself. Because the IBM DevOps Solution Workbench uses DDD at its core, this shared language becomes part of your daily work, reducing ambiguity and making collaboration smoother and more effective.

From Idea to Implementationโ€‹

๐ŸŽฏContext

Typically, when building software applications, you start by designing your system architecture. To learn how the IBM DevOps Solution Workbench helps with that, follow our architecture course. In this section, we will focus on the individual microservices of your applications.

When designing your service with the IBM DevOps Solution Workbench, you start by capturing your business requirements directly in the tool. You can document the service as a whole, add descriptions for each entity, command, event, and other building blocks - all within the same tool, our Solution Designer.

The Workbench supports both API-first and domain-first approaches, so you can start from your service's interface definitions or from its domain model, depending on your preferred workflow. In this scenario, we will take a domain-first approach, beginning with the Orders service's domain model and then refining the APIs from there.

Order Domain Namespace

All documentation, descriptions, and models are stored centrally and can be worked on collaboratively. This means everyone in your team can contribute, review, and refine the design together, making sure your service always stays aligned with your shared business goals.

So let's set you up and get started!

Preparation - Create Project and Use of Assetsโ€‹

To enable you to jump straight into any exercise you are interested in, we prepared assets for you, so you can get started with any topic without needing to complete all courses in the given order. Simply select the asset provided for the respective course to begin working right away. Each asset includes all the required models and implemented code from earlier courses. In our training, these assets belong to the "Orders" service, which is part of the RoboFlow application. This is the service we'll be building together throughout this training.

โ—๏ธGood to know

An asset is a complete, shared copy of a project created in the IBM DevOps Solution Workbench that can be reused. New projects can be started from an asset, giving users the full codebase to extend and customize as needed. You can read about assets in out product documentation here.

Exerciseโ€‹

Estimated time: 5 minutes
Supported languages: TypeScript and Java

In this exercise, you will learn how to create a new Domain Service project from an existing asset.

Import Asset and create Orders Projectโ€‹

โ„น๏ธnote

Please note that the links to the workbench tools in this tutorial only apply to the IBM Education Environment we provide. If you are using a different environment, e.g., your own installation, you will need to navigate directly to the required tools.

The first thing to do is to import the Orders service asset from the local marketplace in the Solution Designer with already prepared content into your workspace.

๐ŸŒŸCongratulations!

You have successfully created your project from an asset. You can now use this project as a base for the upcoming exercises in the Domain Service courses.

Here you can find the list of assets used in the respective units. In each unit, you will find information on which asset to import if you would like to get started there.

Assets Overview
UnitAsset JavaAsset TypeScript
Unit 1-5Order_Java_Design_0.1Order_TypeScript_Design_0.1
Unit 6-8Order_Java_Design_0.2Order_TypeScript_Design_0.2
Unit 9Order_Java_Design_0.3Order_TypeScript_Design_0.3
Unit 10-13Order_Java_Code_0.1Order_TypeScript_Code_0.1
Unit 14Order_Java_Code_0.2Order_TypeScript_Code_0.2
Unit 15Order_Java_Code_0.3Order_TypeScript_Code_0.3
Unit 16Order_Java_FinalOrder_TypeScript_Final

What's Next?โ€‹

In the next course, you will learn how you can model entities with the IBM DevOps Solution Workbench.