SampleSampletypeA worked example you read or clone. Evidence: it demonstrates, it never provides.See every one →What this type is →by SAPby SAPoriginPublished by SAP itself. A visible facet, never an input to a reading — a dormant official plugin reads exactly like a dormant independent one.See every one →Starting point

ui5-mdc-json-tutorial

A unit-by-unit UI5 tutorial that builds a JSON-model app through the sap.ui.mdc metadata-driven controls: Table, FilterBar, value help, custom types and VariantManagement, plus Geomap and Chart.

Five exercises in the first unit build a JSON-model UI5 app through sap.ui.mdc's metadata-driven controls in turn: the Table, the FilterBar, an advanced value help, a custom TypeMap entry, and VariantManagement, which the tutorial describes as the feature that lets users save their personalisation settings and load them later. A second unit adds a Geomap, provided under the SAP Developer License Agreement, and a third an MDC Chart built with Chart.js under MIT. The metadata those controls run on comes from PropertyInfo and from control delegates written in code, with the implementation based on a JSON model and on SAP's own sap.ui.mdc demokit sample. This version of the tutorial uses TypeScript; the JavaScript version is still in a branch of the same repository and receives no more updates or additions.

Facts

Last pushLicenceApache-2.0

Where it sits

Lives in
Demonstrates
Key-user adaptationUI5Key-user adaptationcapabilityChanging a delivered app without modifying it — moving, hiding and adding elements as a layered set of changes that survive an upgrade.

Who is behind it

SAP SamplesSAP SamplesOrganisationMaintains this
In the atlas: maintains 222
@SAP-samples
maintainerAjinkya PatilPersonContributes to this
In the atlas: contributes to 112
@ajinkyapatil8190
Benedikt SchölchPersonContributes to this
In the atlas: contributes to 2
@bendkt
Luca MüllerPersonContributes to this
In the atlas: contributes to 1
@cuvar
Joshua SlaarPersonContributes to this
In the atlas: contributes to 2
@Jozys
KaloyanTsv1PersonContributes to this
In the atlas: contributes to 2
@KaloyanTsv1
Janik KöppelPersonContributes to this
In the atlas: contributes to 3
@koeppel
LucaPersonContributes to this
In the atlas: contributes to 3
@lucamueller01
martinhaeuserPersonContributes to this
In the atlas: contributes to 2
@martinhaeuser
Biser MiloshevPersonContributes to this
In the atlas: contributes to 3
@miloshevb
Evdokia YordanovaPersonContributes to this
In the atlas: contributes to 4
@Okiana
10 contributors

What it declares

Every artifact

Type
Sample
Origin
By SAP

As a sample

Form
A tutorial's companion code

Connections1

ui5-mdc-json-tutorial connectionsui5-mdc-json-tutorialPROVIDES→ demonstrates1demonstrates authoredKey-user adaptation

README

quoted from SAP-samples/ui5-mdc-json-tutorial under Apache-2.0, read
SAP-samples/ui5-mdc-json-tutorial/README.mdOn GitHub

UI5 MDC Tutorial

REUSE status

Description

In this tutorial, we will cover some key concepts involving metadata-driven controls (MDCs). This includes understanding control delegates, PropertyInfo, table, Geomap, FilterBar, value help, TypeMap, Chart and VariantManagement. The implementation will be based on a JSON model and is based on our official Demokit Sample. After completion, we should be able to leverage the full potential of the MDC concepts in our own projects.

ℹ️ This version of the tutorial uses TypeScript. You can still find the JavaScript version here, but that one will not receive any more updates or additions. We recommend using sap.ui.mdc with TypeScript.

Metadata-Driven Controls

Metadata-Driven Controls or MDCs are a powerful tool that allows us to create user interfaces dynamically at runtime. The controls are driven by metadata, which gives a description of the data and its characteristics. This way, we don't have to explicitly define every control in our UI, but we can configure and modify them based on the provided metadata. Find more details in the UI5 Documentation and API Reference.

Delegates

Control Delegates are used to implement service or application-specific behavior for our MDCs. They allow developers to customize the default behavior of controls depending on the specific needs of their service or application. This can include things like custom control creation, metadata provision, or data binding.

PropertyInfo

PropertyInfo is used to define the necessary metadata that should be provided to the controls. This can include information like the control visibility, the data type, or other control-specific settings. PropertyInfo is essential in letting our MDCs know how they should behave.

Used Controls

These are some specific types of MDCs that we can use in our applications:

  • Table: This control lets us display data in a tabular format. We can define columns and rows based on the provided metadata.
  • FilterBar: This control provides a user interface for creating complex filter conditions. It can be used in conjunction with a Table control to filter the displayed data.
  • Value Help: This control is used to assist the user in inputting data. It can provide suggestions or a list of possible values to choose from based on the provided metadata.
Custom Types

The TypeMap is used for defining custom types in our MDCs. If the standard types provided are not sufficient for our needs, we can add our own using the TypeMap. This gives us even more flexibility in customizing our controls.

VariantManagement and Personalization

VariantManagement is a feature that allows users to save their personalization settings. This can include things like the layout of a table, filter conditions in a FilterBar, or others. These settings can then be loaded later, allowing users to customize their experience and increase their productivity.

Exercises

Unit 1:
  1. Setup the Project on Your Machine (browse sources - run app)
  2. How to Use the MDC Table (browse sources - run app)
  3. How to Use the MDC FilterBar (browse sources - run app)
  4. How to Build Advanced Value Helps (browse sources - run app)
  5. How to Add Custom Types (browse sources - run app)
  6. How to Enable VariantManagement (browse sources - run app)
Unit 2:
  1. How to Use the MDC Geomap (browse sources)

Caution

How to Use the MDC Geomap - This package is provided under the terms of the SAP Developer License Agreement.

Unit 3:
  1. How to Use the MDC Chart with ChartJs (browse sources)

Caution

How to Use the MDC Chart with ChartJs - This package uses ChartJs, hammerjs, chartjs-zoom-plugin under the terms of the MIT.

Requirements

Technical Requirements
  • A current version of Node.js (preferably 18+)
  • A code editor supporting TypeScript development
Required Knowledge
  • TypeScript knowledge to avoid blind copy and paste without knowing what's going on.
  • UI5 knowledge, as this tutorial focuses on the MDC concepts.

Known Issues

No known issues.

How to obtain support

This repository is provided as-is, without any support guarantees. However, you are welcome to report issues via the Issues tab and we'll see what we can do to fix them.

Contributing

If you wish to contribute code, offer fixes or improvements, please send a pull request. Due to legal reasons, contributors will be asked to accept a DCO when they create the first pull request to this project. This happens in an automated fashion during the submission process. SAP uses the standard DCO text of the Linux Foundation.

License

Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the LICENSE file.

Apache-2.0, read

Details

Sources3
Added by handdiscovered herechecked
github.com/SAP-samples/ui5-mdc-json-tutorialtree, pushes, contributors, CIchecked
README.mdquoted, and what the entry declareschecked

Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.

Compatibility and provenance
discovered viaAdded by hand
first seen in the atlas
ecosystem and domainui5, ui-and-frontend-bridge
Contributors10
History in the atlas1
  1. First seen.
For your agent
Ref
artifact:sap-samples-ui5-mdc-json-tutorial
JSON
/artifacts/sap-samples-ui5-mdc-json-tutorial.json
MCP
Connecting an agent