Choosing Content Types

Objectives
After completing this lesson, you will be able to:

After completing this lesson, you will be able to:

  • Choose suitable content types for application development

UI Development

UI5 is a UI development toolkit used to build cross-platform, responsive, enterprise-ready front-ends. It is based on HTML5 and JavaScript and runs in the web browser. UI5 is developed by SAP.

There are two versions of UI5:

  • OpenUI5 - Is the open source version, free to use, and released under the Apache 2.0 license. As well as specific SAP UI libraries, OpenUI5 uses many open source libraries. So SAP have chosen to make this version freely available for anyone to use. OpenUI5 can be freely downloaded from Github
  • SAPUI5 - Similar to OpenUI5 but includes many more libraries that render the UI for specific SAP features. SAPUI5 is already integrated with SAP HANA Cloud.

The CAP model provides out-of-the-box support for SAP Fiori Elements front ends so developers do not have to write the interface code from scratch.

Watch this video to learn about CDS and i18N Files for UI Development.

Note

Technically, you can switch between OpenUI5 and SAPUI5 as long as you check they both use the same core version.

Services

OData Services

Open Data Protocol (OData) is a widely accepted protocol that is used to perform database-style create, read, update, and delete operations on resources by using HTTP.

In an SAP BTP application development using the CAP model, Odata services are automatically generated from CDS files that describe the Odata data model. Special OData annotations are used to indicate the precise service parameters.

Each development language such as Javascript or Java provides pre-built libraries for making all types of OData requests and getting results so that developers do not have to write code from scratch.

Database Development

Core Data Services

Core Data Services (CDS) is the backbone of the SAP Cloud Application Programming Model (CAP). It is used in the definition of all three layers of the application stack which includes UI, services and database.

A new application development usually starts with the definition of the data model. This includes tables, views. With the CDS language you define these types of objects. CDS is written in a declarative way so that your CDS definitions do not refer to the underlying technology on which they deploy their objects. This means you could redeploy CDS based artifacts to changing technologies thereby protecting your development investment.

One of the key features of CDS is the ability to embed rich semantics in the CDS definition. This means when you define a table, as well as providing the basic SQL type information such as table type, column data types and lengths, but you are also able to include additional business information that describes the meaning and processing rules for each column. For example, if the column is a date you can describe how it should be displayed e.g. dd-mm-yyyy. If the column is a currency you could refer to another column that provides the currency code. You can also describe how measures should be aggregated (sum, average, count etc.).

This helps consumers know how to handle the column for processing or formatting. This additional information is called annotations. Annotations are easily spotted within CDS definitions as each annotation starts with the @ character. The use of annotations is one of the features that elevates CDS above the use of plain SQL for defining data in your application. By including processing rules and meaning right inside the data definition, the application code does not have read raw data but can pickup the rich semantics that give data meaning, right from the data definition.

SQLScript

SQLScript is an SAP HANA database development language developed by SAP that extends standard SQL with additional features to fully exploit the in-memory SAP HANA database.

You would use SQLScript in your application development to build modular, reusable SAP HANA Cloud database functions and procedures that can be consumed by any application.

The motivation behind SQLScript is to embed data-intensive application logic into the database. Traditionally, applications only offloaded very limited processing into the database and most of the data processing logic was executed on the application server. That meant that data to be processed would first need to be copied from the database onto the application server, processed on the application server, and then the results written back to the database. This round trip would have a negative impact on application performance. With SAP HANA CLoud database, we can avoid the round trip and process the data right in the in-memory database.

When executing data-intensive logic, this copying of large amounts of data can be very expensive in terms of processor and data transfer time. In addition to the data transfer, when using an imperative language like ABAP or JAVA, developers tend to write code which follow a one-tuple-at-a-time operation (for example, looping over all rows in a table). However, this approach is hard to optimize and parallelize compared to declarative set-oriented languages like SQL.

Note
Although SQLScript includes powerful features that extend standard SQL and optimize performance of the database, plain SQL syntax can also be used.

Calculation Views

For developing complex data models with the best performance you should create calculation views. Calculation views are created using a graphical editor in the SAP Business Application Studio.

Calculation views allow the developers to express their intent instead of defining with SQL code how the data should be processed. Using nodes, a data flow can be defined to pass the data through multiple processing steps. This makes reading the flow much easier that trying to understand complex SQL code.

When a calculation view is queried, the SQL optimizer ensures that the most optimal SQL code is automatically generated, and considers many performance aids such as the use of cache or pruning data sources and columns.

Calculation views are highly reusable. They adapt to different query selections. They can be consumed directly by analytical tools and by any type of application.

Save progress to your learning plan by logging in or creating an account

Login or Register