Tutorial building UI5 applications with TypeScript.

Overview

ui5-typescript-tutorial - Learn App Development in UI5 and TypeScript

REUSE status

Overview

This brief (~1-2-hours) tutorial introduces developers to UI5 application development in TypeScript. It includes creating a basic application from the TypeScript template using the "easy-UI5" generator, TypeScript coding in regular UI controllers, as well as advanced topics like custom control development and using third-party libraries.

Requirements

The technical requirements to follow the tutorial are:

Required knowledge:

  • You should have basic Javascript knowledge to avoid blind copy&paste without knowing what's going on
  • Basic UI5 knowledge is beneficial, as this tutorial focuses on the TypeScript side of things.
  • TypeScript knowledge is not required. If interested, having a quick look e.g. at this brief TypeScript intro for JavaScript developers might let you know what to expect.

Exercises

The tutorial consists of the following exercises. To start, just open the first link - you will be guided from there.

From the list, you can not only access each exercise directly, but also also browse the resulting sources and run the resulting app:

If you want to download the code for all the exercises, you can either download the entire repository as zip file and find the content in there below "ui5-typescript-tutorial-main/exercises/ex1/com.myorg.myapp" etc., or you can clone the repository using git.

The resulting app after each exercise can also be run from this page. It includes additional links to unoptimized versions of the app, which can be used to debug the original TypeScript sources.

High-Level Application Idea

As the Covid topic has been in global focus of attention for a long time now, the purpose of the application developed in this tutorial is to display Covid infection incidence data.

Main Detail

It uses an open-source API for the German Covid data to display the incidence for all states of Germany on the overview page and a line chart with the incidence history of the selected state on a detail page.

In Germany (and thus in the app), the commonly used term "incidence" is defined as: "number of detected infections per 100.000 persons within 7 days".

A fallback copy of the data ensures that the tutorial can still be used when the API no longer works.

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.

License

Copyright (c) 2022 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.

The files inside the backup_data directory are created by the API copyright by Marlon Lückert and licensed under the CC-BY-4.0 license.

Comments
  • ERROR:

    ERROR: "watch:ts" exited with 1.

    Hi @akudev . Thanks for the tutorial but when I try to run generated project I am getting an error:

    Syntax error in file name, folder or ... ERROR: "watch:ts" exited with 1. Screenshot attached. Снимок

    Maybe problem in updated packages version ? "devDependencies": { "@babel/cli": "^7.16.0", "@babel/core": "^7.16.0", "@babel/preset-env": "^7.16.4", "@babel/preset-typescript": "^7.16.0", "@openui5/ts-types-esm": "1.103.0", "@types/jquery": "3.5.1", "@typescript-eslint/eslint-plugin": "^5.6.0", "@typescript-eslint/parser": "^5.6.0", "@ui5/cli": "^2.14.1", "babel-preset-transform-ui5": "^7.0.5", "eslint": "^8.4.1", "npm-run-all": "^4.1.5", "typescript": "^4.5.3", "ui5-middleware-livereload": "^0.5.8" },

    opened by karpovas1505 5
  • [rl-reuse_tool-4] Violation against OSS Rules of Play

    [rl-reuse_tool-4] Violation against OSS Rules of Play

    A violation against the OSS Rules of Play has been detected.

    Rule ID: rl-reuse_tool-4 Explanation: Is it compliant with REUSE rules? No

    Find more information at: https://sap.github.io/fosstars-rating-core/oss_rules_of_play_rating.html

    opened by sap-ospo-bot 5
  • ex8: Chart is not a constructor

    ex8: Chart is not a constructor

    Hi,

    I cannot run exercise 8 on a fresh install due to the error

    Uncaught (in promise) TypeError: Chart is not a constructor at _constructor._onAfterRendering [as onAfterRendering] (LineChart.ts:65:18) at Element._handleEvent (Element.js?eval:342:22) at finalizeRendering (RenderManager.js?eval:1275:16) at flushInternal (RenderManager.js?eval:1360:4) at RenderManager.render (RenderManager.js?eval:1510:4) at NavContainer.to (NavContainer.js:828:9) at TargetHandler._applyNavigationResult (TargetHandler.js:324:20) at TargetHandler.navigate (TargetHandler.js:100:32) at constructor.<anonymous> (Targets.js:36:26)

    Steps to reproduce:

    • Clone repo
    • Run npm i inside ex8
    • Run npm start

    When changing the default import to a named import import { Chart } from "chart.js/auto"; a new error is thrown:

    Uncaught (in promise) Error: "line" is not a registered controller. at Registry._get (auto.js:6643:17) at Registry.getController (auto.js:6589:21) at Chart.buildOrUpdateControllers (auto.js:8294:46) at Chart.update (auto.js:8328:37) at Chart.<anonymous> (auto.js:8099:48) at Chart._doResize (auto.js:481:14) at Chart._resize (auto.js:8177:20) at Chart.resize (auto.js:8156:16) at attached (auto.js:8692:16) at Chart.bindResponsiveEvents (auto.js:8704:11)

    bug 
    opened by moepmoep12 3
  • Exercise 8: Chart is not displayed

    Exercise 8: Chart is not displayed

    Hi Andreas, thank you very much for this excellent tutorial. I've learned a lot in it and code completion for UI5 in Visual Studio Code is a great help. In particular I appreciate the precise explanations and the background given. However I do not believe that anyone can do the tutorial in 1-2- hours, besides perhaps an android.

    I found one thing ... After I completed exercise 8, the chart was not displayed for me. The reason was that the line import { chart } from "chart.js"; in the file src/control/LineChart.ts needs to be changed, e.g. into import chart from 'chart.js/auto'; according to https://www.chartjs.org/docs/latest/getting-started/integration.html#bundlers-webpack-rollup-etc .

    Better is

    // See https://www.chartjs.org/docs/latest/getting-started/integration.html#bundlers-webpack-rollup-etc
    // import Chart from 'chart.js/auto';
    import { Chart, registerables } from 'chart.js';
    Chart.register(...registerables);
    

    The problem occurs for "ui5-tooling-modules": "^0.3.0", but not for "ui5-tooling-modules": "^0.1.3"

    Kind regards, Martin : )

    opened by MartinWegmann 3
  • [rl-vulnerability_alerts-1] Violation against OSS Rules of Play

    [rl-vulnerability_alerts-1] Violation against OSS Rules of Play

    The OSPO bot created this issue by mistake - It did not have enough priviledge to check the vulnerability alerts, So I am closing this issue now. Sorry for any inconvenience.

    opened by sap-ospo-bot 0
Owner
SAP Samples
Samples illustrate software features and capabilities and provide other helpful resources to show how an SAP solution may be extended to meet customer needs.
SAP Samples
Node-cli-starter - Basic starter kit for building Node CLI applications with TypeScript.

node-cli-starter Minimal starter kit for building Node CLI applications with TypeScript. Getting Started To get started clone repo locally and run npm

Cory Rylan 7 May 17, 2022
Toolkit for building scalable web applications with TypeScript, React, Redux and Apollo-Client

TsToolbox Toolkit for building scalable web applications with TypeScript, React, Redux and Apollo-Client (inspired by ReKit) ⚠ ⚠ ⚠ Work in Progress ⚠

Daniel Nikravesh 7 Apr 14, 2022
A fast, feature rich and simple framework for building dynamic browser applications.

hyperdom A simple, fast, feature rich framework for building dynamic browser applications. Hyperdom supports a simple event-update-render cycle, promi

Featurist 163 Nov 11, 2022
A easy-to-use framework for building immersive decentralized applications

A easy-to-use framework for building immersive decentralized applications

Sonr 624 Dec 27, 2022
T3 is a client-side JavaScript framework for building large-scale web applications

Box has migrated using react, webpack, and the latest version of ECMAScript for our frontend projects as of 2018. We no longer support chan

Box 1.6k Dec 8, 2022
Remix enables you to build fantastic user experiences for the web and feel happy with the code that got you there. In this workshop, we'll look at some more advanced use cases when building Remix applications.

?? Advanced Remix Workshop Remix enables you to build fantastic user experiences for the web and feel happy with the code that got you there. In this

Frontend Masters 167 Dec 9, 2022
A technology stack solution using the AWS Serverless architecture.Atlas stack for building applications focused on generating value.

Atlas A technology stack solution using the AWS Serverless architecture.Atlas stack for building applications focused on generating value. Description

Atlas 9 Dec 15, 2022
A collection of Aurelia 2 example applications showcasing how to build Aurelia 2 applications and other tasks.

Aurelia 2 Examples A monorepository of a treasure trove of Aurelia 2 example applications you can use as a guide to help you build your own applicatio

aurelia 12 Dec 29, 2022
An interactive git visualization and tutorial. Aspiring students of git can use this app to educate and challenge themselves towards mastery of git!

LearnGitBranching LearnGitBranching is a git repository visualizer, sandbox, and a series of educational tutorials and challenges. Its primary purpose

Peter Cottle 26.4k Jan 3, 2023
Modern JavaScript Tutorial

The Modern JavaScript Tutorial This repository hosts the English content of the Modern JavaScript Tutorial, published in https://javascript.info. Tran

The Modern JavaScript Tutorial 19.7k Jan 4, 2023
Github Repository for the resources shown in my 8 JavaScript Pro Tips Tutorial in Youtube

Part 1 - JavaScript Pro Tips - Learn with Sumit Table of Contents How to run Contact How to run Different lessons taught in the Youtube Tutorial are o

Learn with Sumit 28 Dec 28, 2022
The code base for the tutorial on how to use the TypingDNA Verify API

TypingDNA-Verify-API-Tutorial The code base for the tutorial on how to use the TypingDNA Verify API Resources TypingDNA Website TypingDNA Verify Docs

Tim Ruscica 21 Oct 6, 2022
This Repository consist of Daily learning JS, Assignments, coding challenge, projects, references, tutorial

?? A Tour of JavaScript This Repository consist of Daily learning, Assignments, coding challenge, projects, references, tutorial. ??‍?? ??‍?? alert(

null 23 Sep 7, 2022
Youtube Tutorial Project for creating a developer portfolio website.

This is a Next.js project bootstrapped with create-next-app. Getting Started First, run the development server: npm run dev

codingwithdidem 14 Nov 29, 2022
🛠️⚡ Step-by-step tutorial to build a modern JavaScript stack.

JavaScript Stack from Scratch Welcome to my modern JavaScript stack tutorial: JavaScript Stack from Scratch. ?? This is the V2 of the tutorial, major

Jonathan Verrecchia 19.5k Jan 4, 2023
GitHub Actions Tutorial

GitHub Actions Tutorial This is a brief intro of how to use GitHub Actions for a frontend (static S3) and a backend (lambda). If you want to learn mor

Rodrigo Medina 3 Mar 4, 2022
A solidity tutorial repo.

Advanced Sample Hardhat Project This project demonstrates an advanced Hardhat use case, integrating other tools commonly used alongside Hardhat in the

Yadav! ✔ 3 Apr 13, 2022
A prototype snap for injecting gas fee prices into a confirmation window that also serves as the basis for a 5-minute Snaps tutorial

@Montoya/gas-fee-snap A simple Snap example based on @MetaMask/template-snap. Read below for a tutorial! Prerequisites Before you begin, make sure you

Christian Montoya 18 Dec 8, 2022
Full source-code for the step-by-step tutorial on how to use Phaser + Colyseus together.

Phaser: Real-time Multiplayer with Colyseus Full source-code for the step-by-step tutorial on how to use Phaser + Colyseus together. Live Demo See ste

Colyseus 19 Dec 24, 2022