SlideShare a Scribd company logo
1 of 44
SAP Cloud Platform
Application Programming Model
Daniel Hutzel
CNA221
2PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Take the session survey.
We want to hear from you!
Be sure to complete the session evaluation
on the SAPTechEd mobile app.
Download the app from
iPhone App Store or Google Play.
CNA221
CNA221
✓
✓
Please complete your
feedback for session 
CNA221
Access replays at:
http://sapteched.com/online
Continue your discussions in:
sap.com/community
See all…
SAPTechEd blog posts
SAP TechEd
2018
6PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Introduction
SAP
Web IDE
CDS
Service
SDKs
REST
OData
FioriHANA
Java EE,
Spring
Node.js
express
Eclipse
VSCode
CLI
The “Application Programming Model for SAP Cloud Platform” is a
framework of tools, languages and libraries by SAP and OSS to
efficiently and rapidly build enterprise services and applications in a
full-stack development approach.
It guides developers along a golden path of best practices, allowing
them to focus on their domain while relieving them from tedious
technical tasks.
7PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Overview
We complement cloud-native technologies with…
 a CDS-based Services framework
with 1st-class support by and for…
 SAP Web IDE w/ tailored tools
 SAP Fiori
 SAP HANA
 S/4 Extension scenarios
Resulting in…
 A consistent end-to-end programming model for
enterprise services & applications
 Guidance and best practices leveraging proven
SAP technologies + Open Source software
WebIDE
Infrastructure
App UIs?
Domain Logic?
Domain Model?
localWebIDE+local
SAP Fiori + other
SAP HANA + other
Service SDKsCDS
CDS
planned:
CDS
PlatformServices
8PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Setup
Develop TestRun
CI/CD
Operate
Data
Services
Consumers
Context and our focus
Databases
SAP HANA
API Management
Monitoring
Scaling
Profiling
Connectivity
Big Data
Identities
Authentication
CI/CD
Destinations
Provisioning
Caching
Frontends / UIs
Your Services
and Apps
by S/4 HANA Cloud SDK, …
Getting Started…
10PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Fictional task given
Extension on
Cloud PlatformAdd Reviews
Manage
Orders
Maintain
Catalog
Admins
Browse Books
anybody
Order Books
registered
includes…
login…
includes…
T/5 backend system
In cloud first… T/5 later
Reuse
Service
11PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Capture Intent on Conceptual Level
Best Practices & Benefits…
using { Country, managed }
from '@sap/cds/common‘;
service ProductService {
entity Products : managed {
key ID : UUID;
title : localized String;
descr : localized String;
country : Country;
}
}
» What, not How. «
12PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Minimizing Boilerplate
service ProductService {
entity Products {
key ID : UUID;
title : localized String;
descr : localized String;
country : Country;
createdAt : DateTime @cds.on.insert: $now;
createdBy : User @cds.on.insert: $user;
modifiedBy : User @cds.on.update: $user;
modifiedAt : DateTime @cds.on.update: $now;
localized : Association to Products_texts
on localized.lang = $user.locale
and localized.ID = ID;
texts : Association to many Products_texts
on texts.ID=ID;
}
entity Products_texts {
key lang : Language;
key ID : UUID;
title : String;
descr : String;
}
type User : String(111);
type CountryCode : String(3);
type Locale : String(5);
//...
type Country : Association to Countries;
type Language : Association to Languages;
entity Countries : CodeList{
key code: CountryCode;
}
entity Languages : CodeList{
key code: Locale;
}
abstract entity CodeList {
name : localized String;
descr : localized String;
}
annotate Country with @(
title:'{i18n>Country}',
Common.ValueList.entity: 'Languages'
);
annotate Language with @(
title:'{i18n>Language}',
Common.ValueList.entity: 'Countries'
);
annotate CodeList with @(
UI.Identification: [{
$Type: 'UI.DataField', Value: name
}],
);
}
using { Country, managed }
from '@sap/cds/common‘;
service ProductService {
entity Products : managed {
key ID : UUID;
title : localized String;
descr : localized String;
country : Country;
}
}
» What, not How. «
13PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Capture Intent on Conceptual Level
Best Practices & Benefits…
» What, not How. «
It’s not just about less to type…
It’s much more about:
 Conciseness and comprehensiveness
 Detecting flaws early
 Single points to fix
 Single points to optimize
 Refocusing on your domain
i.e. about improving overall quality,
robustness and adaptability.
14PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Capture Intent on Conceptual Level
Best Practices & Benefits…
Accelerate your Projects
» Run early «
» Grow as you go «
Getting Started
—————————————
o Setup your env (once)
o Start a Project
o Define Services  Run
Add UIs / Frontends
——————————————
o Switch to Web IDE, and…
o Add a Fiori app  Run
o Add Fiori markup  Run
Provide Services
——————————————
o Derive Data Models  Run
o Deploy to DBs  Run
o Add Initial Data  Run
o … 2b continued…
Close Feedback Loop
• Start with services top-down
• Spin-off parallel workstreams (→ frontend / backend)
• Using the Service Definitions as their contracts
15PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Capture Intent on Conceptual Level
Best Practices & Benefits…
Accelerate your Projects
Leverage proven Methods
» We eat your dog food «
… originate close
to use cases
… are pushed down
to data sources
for execution
Database
CDS-based
Runtimes
Data
Models
Service
Defs.
Fiori UIs
Fiori
Markup
OData
CQLas views on
Queries
• OData = REST + Querying
• SAP Fiori = flexible generic UIs
• CDS += View Building
16PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
RESTful ABAP
Common Programming Model
SAP Fiori / UI5
SAP HANA
SQL
OData, REST
ABAP
Frameworks
ABAP
Toolset
Core Data
Services
SAP Gateway
Extension
Services
Events
Models
Replication
Interoperability
Reuse of Skills
Cloud App Prog Model
SAP Fiori / UI5
SAP HANA / other
SQL
OData, REST
Java / Node
Frameworks
S/4 HANA
Cloud SDK
Core Data
Services
REST + OData libraries
» Our dog food @ SAP «
17PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Capture Intent on Conceptual Level
Best Practices & Benefits…
Accelerate your Projects
Leverage proven Methods
Openness & Flexibility
Cloud Foundry
Kubernetes
XSA
local
SAP Fiori Angular React Vue • • •
SAP HANA PostgreSQL sqlite • • •
SAP Web IDE
Eclipse
VSCode
• • •
Core
Node.js Java
Core Data Services
• We focus on the Core of Data-oriented Services
• We integrate recommended choices from periphery …
• But without lock-in!  still you decide what you use
18PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Capture Intent on Conceptual Level
Best Practices & Benefits…
Accelerate your Projects
Leverage proven Methods
Openness & Flexibility
Web IDE provides tailored tools for the
application programming model.
You can use Web IDE and/or local tools of
your choice and switch between both.
Common Project Layout & Build
• app
• srv
• db
Local Development
• Command-line Tools
• known IDEs / Editors
• w/ CDS Editors
• Local test runs
• Maven/npm-based
automation
• • •
SAP Web IDE Full-Stack
• Project Storyboard
• Project Explorer
• Database Explorer
• Graphical Modeling
• Service Discovery
• Fiori Dev Tools
• CDS Editors
• Drag & Drop
19PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
SAPWeb IDE Full-Stack tailored tools
 Project Storyboard
 Project Explorer
 Database Explorer
 CDS Editors
 Outline
 Drag & Drop
 Problems View
 Graphical Editors
 Service Discovery and
integration wizards (e.g. S/4)
 Fiori Development Toolset
20PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Capture Intent on Conceptual Level
Best Practices & Benefits…
Accelerate your Projects
Leverage proven Methods
Openness & Flexibility
Enterprise Qualities
Intrinsic Enterprise Features & Qualities
 Localized Metadata  e.g. labels
 Localized Data  text tables
o Temporal Data  valid from/to, time travel
 Authorization
 Audit Logging
 Project-level Extensibility ( providers)
o Tenant-level Extensibility ( clients)
o GDPR support
o Validation Framework
o Declarative Constraints
o TypeScript for implementors
o …
21PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Capture Intent on Conceptual Level
Best Practices & Benefits…
Accelerate your Projects
Leverage proven Methods
Openness & Flexibility
Enterprise Qualities
Cloud Qualities
Intrinsic Cloud Integration & Qualities
 Authentication / UAA
 JWT token handling
 Configuration (via VCAP services, …)
 Health checks
 Logging & Monitoring
 Tenant on/off boarding
 Tenant isolation
o Rate limiting
o Caching (via Hystrix, …)
o Messaging (via RapidMQ, …)
o Resilience (in S/4H CloudSDK)
o …
by S/4 HANA Cloud SDK
Deep dive on CDS
Who knows CDS?
You don’t know CDS! :)
25PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Entities & Views (from SQL)
Associations
Annotations
Aspects
Concise Queries
entity Books @(title:‘Bücher‘) {
key ID : UUID;
title : localized String;
author : Association to Authors;
}
entity Authors {
key ID : UUID;
name : String;
books : Composition of many Books;
}
entity BooksList as select from Books {
ID, title, author.name as author
}
 Entity-Relationship Modeling
 Reflexive View Building  borrowed from SQL
CDS is about…
26PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Entities & Views (from SQL)
Associations
Annotations
Aspects
Concise Queries
// Pure, unpolluted Structure
define entity Foo { bar : String; }
// Fiori UI Markup
annotate Foo with @UI.Label:'Foo‘;
// Authorization Model
annotate Foo with @requires:‘admin‘;
// Customer-specific Extensions
extend entity Foo with {
car:{ wheels: Integer; }
}
 separate concerns into partial definitions
 avoids polluting your structure
 allows using different tools on same effective models
 in same or different files up to different projects
CDS is about…
27PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
SELECT from Employees {
name, addresses [kind='business’] .city.{
name, country.name
}
}
 Path Expressions w/ optional Infix Filters
 (Nested) Postfix Projections
 Permeable for native database features
SELECT e.name, city.name, country.name from Employees e
LEFT JOIN Addresses a on a.id = e.address_id and a.kind='business'
LEFT JOIN Cities city on city.id = addresses.city_id
LEFT JOIN Countries country on country.id = city.country_id
Entities & Views (from SQL)
Associations
Annotations
Aspects
Concise Queries
CDS is about…
28PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Entities & Views (from SQL)
Associations
Annotations
Aspects
Concise Queries
service CatalogService {
entity Books as projection on my.Books;
entity Authors as projection on my.Authors;
entity Orders as projection on my.Orders {
*, book.title, book.author.name as author
} where createdBy = $user;
action cancel(order:UUID);
}
 data-centric: entities with intrinsic CRUD ops
 entities as views on underlying ones
 with seamless mapping to REST + OData
CDS is about…
Service Definitions
29PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Entities & Views (from SQL)
Associations
Annotations
Aspects
Concise Queries
 Core Schema Notation (CSN) as the core of all:
models are plain JavaScript/JSON objects
 minimal footprint, dynamic, no repositories
 fast innovation and delivery cycles
 zero lock-in to any database or stack
{ CSN }
CDS
YAML
OData
JSON, YAML
JPA
process
Open API
Code
SQL DDL
HANA DDL
JSON
CDS is about…
Litew8 reincarnation in Node.js
Service Definitions
let model = {Foo:{kind:'entity'}}
Adding Custom Logic…
cds.services
cds.ql
31PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Implementing Services
Place a <service>.js file next to your <service>.cds file1 Add a Service Implementation Function2
Register your Event Handlers
.before → before generic ones
.on → instead of generic ones
.after → before results go out
3
+
Only for your real, domain-specific custom
logic, leaving the rest to the built-in generic
handlers
Note:
• all non-blocking, running in parallel
• all connection handling, transaction mgmt.,
etc. is taken care of by the fwk
32PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Consuming Services
API Hub
cds importImport Service Definition
in case of external ones
1
Data Source
Database Data Model
Local Service
Service
Definition
External Service
Service
Definition
// query-style
SELECT.from (Foo) .where ({ID:111}) .then (foo => … )
let foo = await SELECT.from (Foo) .where ({ID:111})
// method call-style
ds.read(Foo) .where ({ID:111}) .then (foo => … )
// using declared custom operations
ds.getFoo (111) .then (foo => … )
Data Sources can be Databases, external Services or
local Services and are all consumed in the same way.
OData and cds.services support querying by default.
Connect to Data Source2
Read/Write Data3
const ds = await cds.connect.to ('SomeDataSource‘)
const { Foo } = ds.entities()
33PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Service-level Mashups
CDS allows to easily mashup imported
definitions with local ones.
Views define which subset of data we are
interested in.
Imported
Service
Definition
API Hub
cds import
Import the Service Definition1
Local Service
Definitions
using ExternalService as ext from ‚./imported/service‘;
service CatalogService {
// served from local database
entity Books as projection on bookshop.Books;
entity Authors as projection on bookshop.Authors;
// served from external service
entity Orders as SELECT from ext.Orders {
*, book.title, book.author.name as author
} where createdBy = $user;
}
const ext = await cds.connect.to ('ExternalService')
const { Orders } = ext.entities()
cds.serve ('CatalogService').with (function(){
this.on ('READ', 'Orders', ()=> SELECT.from (Orders) … )
})
Mashup into Local Service Definition:2
Call out to the external service in a custom handler:3
34PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Service-level Replication
using ExternalService as ext from '@imported/service‘;
entity Books {…}
entity Authors {…}
// local replica entity filled from external service
entity Orders as SELECT from ext.Orders {
*, book.title, book.author.name as author
} where createdBy = $user;
const { Orders } = cds.entities // local
cds.subscribe.to ('ExternalService‘) .with (ext => {
ext.on (['CREATED', 'UPDATED'], 'Orders‘, ({data:{IDs}}) => {
ext.read ('Orders') .where ('ID in', IDs) .foreach (
each => UPSERT(each).into (Orders)
)
})
})
Local Data
Model
Imported
Service
Definition
API Hub
cds import
Import the Service Definition1
Mashup into Local Data Model:2
Replicate actual data upon change events from the source:3
Cache data locally which is required in
frequent and close access.
Create tables with the views’ signature.
35PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Open, Non-intrusive Design — you stay in control
We use established OSS de-facto standards
We add components focused on enterprise features
You stay in control, you choose what to use and when!
… e.g. in a custom server.js:
Node.js
express.js, …
cds.services
cds.ql, …
Java
Servlets, Spring
Service SDK
JDBC, JPA, cds.ql
36PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Capture Intent on Conceptual Level
Best Practices & Benefits…
Accelerate your Projects
Leverage proven Methods
Openness & Flexibility
Enterprise Qualities
Cloud Qualities
Services, not BObjects
Data Model
Service A Service B
Services are stateless API facades.
They contain all logic and validations and
frequently expose views on data.
Data Models define passive
objects, mostly normalized and
managed in databases
37PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Single-purposed Services
Manage
Orders
Maintain
Catalog
Admins
service CatalogService {
expose entity Books @readonly;
expose entity Authors @readonly;
action order (book) @requires:$user;
}
service CustomersService @(requires:$user) {
expose entity Orders @(restrict:[
{grant:'READ,DELETE', where:'buyer=$user‘}
]);
}
service AdminService @(requires:‘admin‘) {
expose entity Books
expose entity Authors;
expose entity Orders;
}
 fosters focused and efficient implementations
 enables ‘late-cut µ services’
Browse Books
anybody
Order Books
registered
login
includes…
38PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Capture Intent on Conceptual Level
Best Practices & Benefits…
Accelerate your Projects
Leverage proven Methods
Openness & Flexibility
Enterprise Qualities
Cloud Qualities
Services, not BObjects
Querying, not ORM
ORMs provide…?
• Active objects manipulating internal state
• Abstraction, shielding me from SQL
• Portability across databases
• Eager/Lazy Loading
• Object Caches
• …?
39PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Data Access with cds.ql
Managed Data Sources w/ CDS-based Reflection
Queries as 1st class objects
SQL-style usage
Object-style usage
Reflexive Querying w/ Late Materialization
Asynchronous, non-blocking execution
Managed Units of Work
Conclusion
41PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Data
Services
Data
Models
Service
Defs.
Custom
Handlers
Fiori UIs
Fiori
Markup
OData
Stored
Procs
Breakouts
Summary — Core Programming Model
CDS
cds.services
cds.ql
We promote…
• Best Practices, not Anarchy!
• Openness, not Blackbox!
• Services, not Objects!
• Querying, not ORM!
• Capturing Intent
• Enterprise & Cloud Qualities
42PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Cookbook — there’s more…
Getting Started
—————————————
o Setup your env (once)
o Start a Project
o Define Services  Run
Add UIs / Frontends
——————————————
o Switch to Web IDE, and…
o Add a Fiori app  Run
o Add Fiori markup  Run
Provide Services
——————————————
o Derive Data Models  Run
o Deploy to DBs  Run
o Add Initial Data  Run
o Add Custom Logic  Run
o Reading / Writing Data
o Add Authorization, I18n, …
Reuse & Modularize
—————————————
o Reuse @sap/cds/common
o Reuse other packages
o Modularize your app
Consume Services
—————————————
o Import ext. Service APIs
o Consume Services
o Service-level Mashups
o Service-level Replication
o Serve required Interfaces
Deploy
——————————
o Deploy to Cloud
o Serverless
o … for own use
o … as SaaS solution
Customize
——————————
o Verticalization
o Tenant-level
Customization✓
✓
✓
✓
✓
43PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ
Status Quo / Outlook
o SAP Analytics Cloud integration
o Analytical List Page by Fiori
o Serverless deployment
o Reactive Java
o Enhanced GDPR support
o Validation Framework
o Declarative Constraints
o TypeScript for implementors
o …
 CDS-based Service and Data Model
 Service Providers in Node.js / Java
 1st class support for HANA DBaaS
 1st class support for Fiori Uis
 1st class support in Web IDE
 Local dev in VSCode, Eclipse, …
 Fastrack dev with node + sqlite db
 Intrinsic Enterprise Qualities, e.g…
 Localized Data + I18n
 Authorization
 Audit Logging
 GDPR support (basic)
 Service Consumption via S/4H SDK
 Service-level Mashups & Replication
 Project-level Extensibility
 Deployment to Cloud Foundry
o Basis for Serverless eBaaS
o 1st class support for PostgreSQL, …
o Fiori Draft support +
o OData v4
o Advanced support for Spring
o SaaS Tenant-level Extensibility
o More Tailored Tools Web IDE
o Temporal Data
o Events Consumption & Emitting
o Generic Service Consumption
o Generic support for Messaging
o Deploy to Kubernetes
 available o in progress o planned
Thank you!
Keren Rotenberg
Lead Product Manager
keren.rotenberg@sap.com
Daniel Hutzel
Chief Product Owner
daniel.hutzel@sap.com
✓
✓
Please complete your
feedback for session 
CNA221
Access replays at:
http://sapteched.com/online
Continue your discussions in:
sap.com/community
See all…
SAPTechEd blog posts
SAP TechEd
2018

More Related Content

What's hot

What's hot (20)

S4HANA Migration Overview
S4HANA Migration OverviewS4HANA Migration Overview
S4HANA Migration Overview
 
SAP ECC to S/4HANA Move
SAP ECC to S/4HANA MoveSAP ECC to S/4HANA Move
SAP ECC to S/4HANA Move
 
SAP PPM 6.0 powered by HANA
SAP PPM 6.0 powered by HANASAP PPM 6.0 powered by HANA
SAP PPM 6.0 powered by HANA
 
SAP ERP: Introduction
SAP ERP: IntroductionSAP ERP: Introduction
SAP ERP: Introduction
 
SAP S/4HANA: Everything you need to know for a successul implementation
SAP S/4HANA: Everything you need to know for a successul implementationSAP S/4HANA: Everything you need to know for a successul implementation
SAP S/4HANA: Everything you need to know for a successul implementation
 
Sap S/4 HANA New Implementation
Sap S/4 HANA New ImplementationSap S/4 HANA New Implementation
Sap S/4 HANA New Implementation
 
SAP S/4HANA Migration Cockpit
SAP S/4HANA Migration CockpitSAP S/4HANA Migration Cockpit
SAP S/4HANA Migration Cockpit
 
Sap bpc optimized for s4 hana real time consolidation
Sap bpc optimized for s4 hana   real time consolidationSap bpc optimized for s4 hana   real time consolidation
Sap bpc optimized for s4 hana real time consolidation
 
SAP Cloud Platform Product Overview
SAP Cloud Platform Product OverviewSAP Cloud Platform Product Overview
SAP Cloud Platform Product Overview
 
How to use abap cds for data provisioning in bw
How to use abap cds for data provisioning in bwHow to use abap cds for data provisioning in bw
How to use abap cds for data provisioning in bw
 
Introduction to SAP BTP
Introduction to SAP BTPIntroduction to SAP BTP
Introduction to SAP BTP
 
Sap fiori tutorial
Sap fiori tutorialSap fiori tutorial
Sap fiori tutorial
 
Overview of SAP HANA Cloud Platform
Overview of SAP HANA Cloud PlatformOverview of SAP HANA Cloud Platform
Overview of SAP HANA Cloud Platform
 
SAP Integration Suite L1
SAP Integration Suite L1SAP Integration Suite L1
SAP Integration Suite L1
 
Sap fiori-ux-architecture-for-s4h
Sap fiori-ux-architecture-for-s4hSap fiori-ux-architecture-for-s4h
Sap fiori-ux-architecture-for-s4h
 
SAP Roll Out - An Introduction and Advantages
SAP Roll Out - An Introduction and AdvantagesSAP Roll Out - An Introduction and Advantages
SAP Roll Out - An Introduction and Advantages
 
Sap overview
Sap overviewSap overview
Sap overview
 
About Group reporting
About Group reporting About Group reporting
About Group reporting
 
Sap for beginners
Sap for beginnersSap for beginners
Sap for beginners
 
Sap architecture
Sap architectureSap architecture
Sap architecture
 

Similar to Overview and Walkthrough of the Application Programming Model with SAP Cloud Platform

Similar to Overview and Walkthrough of the Application Programming Model with SAP Cloud Platform (20)

2017 sitNL Cloud Foundry Masterclass
2017 sitNL Cloud Foundry Masterclass2017 sitNL Cloud Foundry Masterclass
2017 sitNL Cloud Foundry Masterclass
 
Google Technical Webinar - Building Mashups with Google Apps and SAP, using S...
Google Technical Webinar - Building Mashups with Google Apps and SAP, using S...Google Technical Webinar - Building Mashups with Google Apps and SAP, using S...
Google Technical Webinar - Building Mashups with Google Apps and SAP, using S...
 
SAP and Red Hat JBoss Partner Webinar
SAP and Red Hat JBoss Partner WebinarSAP and Red Hat JBoss Partner Webinar
SAP and Red Hat JBoss Partner Webinar
 
The Decoupled CMS in Financial Services
The Decoupled CMS in Financial ServicesThe Decoupled CMS in Financial Services
The Decoupled CMS in Financial Services
 
SAP BTP Enablement
SAP BTP EnablementSAP BTP Enablement
SAP BTP Enablement
 
Introduction to NEW SAP - Accenture Technology Meetup
Introduction to NEW SAP - Accenture Technology MeetupIntroduction to NEW SAP - Accenture Technology Meetup
Introduction to NEW SAP - Accenture Technology Meetup
 
SAP TechEd 2013: CD105: Extending SuccessFactors EmployeeCentral with apps on...
SAP TechEd 2013: CD105: Extending SuccessFactors EmployeeCentral with apps on...SAP TechEd 2013: CD105: Extending SuccessFactors EmployeeCentral with apps on...
SAP TechEd 2013: CD105: Extending SuccessFactors EmployeeCentral with apps on...
 
Notes
NotesNotes
Notes
 
Learn about Cloud and Scalability in SAP Hybris Commerce Technology Strategy
Learn about Cloud and Scalability in SAP Hybris Commerce Technology StrategyLearn about Cloud and Scalability in SAP Hybris Commerce Technology Strategy
Learn about Cloud and Scalability in SAP Hybris Commerce Technology Strategy
 
L1_RISE_with_SAP_NNN_V3.4.pptx
L1_RISE_with_SAP_NNN_V3.4.pptxL1_RISE_with_SAP_NNN_V3.4.pptx
L1_RISE_with_SAP_NNN_V3.4.pptx
 
S4H_399 2 SL _Onboarding Presentation (2).pptx
S4H_399 2  SL _Onboarding Presentation (2).pptxS4H_399 2  SL _Onboarding Presentation (2).pptx
S4H_399 2 SL _Onboarding Presentation (2).pptx
 
SAP HANA Cloud Portal
SAP HANA Cloud PortalSAP HANA Cloud Portal
SAP HANA Cloud Portal
 
SAP HANA Cloud Portal - Overview Presentation
SAP HANA Cloud Portal - Overview PresentationSAP HANA Cloud Portal - Overview Presentation
SAP HANA Cloud Portal - Overview Presentation
 
Rise with SAP
Rise with SAPRise with SAP
Rise with SAP
 
SAP HANA Cloud: From Your Datacenter to the Cloud and Back
SAP HANA Cloud: From Your Datacenter to the Cloud and Back  SAP HANA Cloud: From Your Datacenter to the Cloud and Back
SAP HANA Cloud: From Your Datacenter to the Cloud and Back
 
SQL Data Warehousing in SAP HANA (Sefan Linders)
SQL Data Warehousing in SAP HANA (Sefan Linders)SQL Data Warehousing in SAP HANA (Sefan Linders)
SQL Data Warehousing in SAP HANA (Sefan Linders)
 
Unlock the Full Potential of SAP Hybris Solutions Using SAP Cloud Platform
Unlock the Full Potential of SAP Hybris Solutions Using SAP Cloud PlatformUnlock the Full Potential of SAP Hybris Solutions Using SAP Cloud Platform
Unlock the Full Potential of SAP Hybris Solutions Using SAP Cloud Platform
 
SAP Leonardo / Machine Learning (Iver van de Zand)
SAP Leonardo / Machine Learning (Iver van de Zand)SAP Leonardo / Machine Learning (Iver van de Zand)
SAP Leonardo / Machine Learning (Iver van de Zand)
 
6yearsResume
6yearsResume6yearsResume
6yearsResume
 
Sap on datacomm cloud
Sap on datacomm cloud  Sap on datacomm cloud
Sap on datacomm cloud
 

More from SAP Cloud Platform

More from SAP Cloud Platform (20)

SAP Cloud Platform CPEA Roadmap Services (07.2020)
SAP Cloud Platform CPEA Roadmap Services (07.2020)SAP Cloud Platform CPEA Roadmap Services (07.2020)
SAP Cloud Platform CPEA Roadmap Services (07.2020)
 
SAP Cloud Platform CPEA Roadmap Services June 2020
SAP Cloud Platform CPEA Roadmap Services June 2020SAP Cloud Platform CPEA Roadmap Services June 2020
SAP Cloud Platform CPEA Roadmap Services June 2020
 
SAP Cloud Platform Extension Suite Overview
SAP Cloud Platform Extension Suite OverviewSAP Cloud Platform Extension Suite Overview
SAP Cloud Platform Extension Suite Overview
 
SAP Cloud Platform Product Overview – Drive Agility During Rapid Change
SAP Cloud Platform Product Overview – Drive Agility During Rapid ChangeSAP Cloud Platform Product Overview – Drive Agility During Rapid Change
SAP Cloud Platform Product Overview – Drive Agility During Rapid Change
 
SAP Cloud Platform CPEA Roadmap Services (03.2020)
SAP Cloud Platform CPEA Roadmap Services (03.2020)SAP Cloud Platform CPEA Roadmap Services (03.2020)
SAP Cloud Platform CPEA Roadmap Services (03.2020)
 
SAP Cloud Platform CPEA Roadmap Services (05.2020)
SAP Cloud Platform CPEA  Roadmap Services (05.2020)SAP Cloud Platform CPEA  Roadmap Services (05.2020)
SAP Cloud Platform CPEA Roadmap Services (05.2020)
 
2020 central sapcp_requirementschannel_1slider
2020 central sapcp_requirementschannel_1slider2020 central sapcp_requirementschannel_1slider
2020 central sapcp_requirementschannel_1slider
 
SAP Cloud Platform CPEA Roadmap Services (04.2020)
SAP Cloud Platform CPEA  Roadmap Services (04.2020)SAP Cloud Platform CPEA  Roadmap Services (04.2020)
SAP Cloud Platform CPEA Roadmap Services (04.2020)
 
SAP Cloud Platform CPEA Services Roadmap (03.2020)
SAP Cloud Platform CPEA Services Roadmap (03.2020)SAP Cloud Platform CPEA Services Roadmap (03.2020)
SAP Cloud Platform CPEA Services Roadmap (03.2020)
 
SAP Cloud Platform CPEA Services Roadmap (01.2020)
SAP Cloud Platform CPEA Services Roadmap (01.2020)SAP Cloud Platform CPEA Services Roadmap (01.2020)
SAP Cloud Platform CPEA Services Roadmap (01.2020)
 
SAP Cloud Platform CPEA Services Roadmap (12.2019)
SAP Cloud Platform CPEA Services Roadmap (12.2019)SAP Cloud Platform CPEA Services Roadmap (12.2019)
SAP Cloud Platform CPEA Services Roadmap (12.2019)
 
SAP Cloud Platform CPEA Services Roadmap (Nov,19,2019)
SAP Cloud Platform CPEA Services Roadmap (Nov,19,2019)SAP Cloud Platform CPEA Services Roadmap (Nov,19,2019)
SAP Cloud Platform CPEA Services Roadmap (Nov,19,2019)
 
SAP Cloud Platform CPEA Services Roadmap (11.2019)
SAP Cloud Platform CPEA Services Roadmap (11.2019)SAP Cloud Platform CPEA Services Roadmap (11.2019)
SAP Cloud Platform CPEA Services Roadmap (11.2019)
 
SAP Cloud Platform CPEA Services Roadmap (10.2019)
SAP Cloud Platform CPEA Services Roadmap (10.2019)SAP Cloud Platform CPEA Services Roadmap (10.2019)
SAP Cloud Platform CPEA Services Roadmap (10.2019)
 
SAP TechEd 2019 CAA217 – Efficient Continuous Delivery in the SAP Ecosystem
SAP TechEd 2019 CAA217 – Efficient Continuous Delivery in the SAP EcosystemSAP TechEd 2019 CAA217 – Efficient Continuous Delivery in the SAP Ecosystem
SAP TechEd 2019 CAA217 – Efficient Continuous Delivery in the SAP Ecosystem
 
Process Excellence with SAP Cloud Platform Process Visibility
Process Excellence with SAP Cloud Platform Process VisibilityProcess Excellence with SAP Cloud Platform Process Visibility
Process Excellence with SAP Cloud Platform Process Visibility
 
Overview on What’s New in SAP Cloud Platform Business Rules
Overview on What’s New in SAP Cloud Platform Business RulesOverview on What’s New in SAP Cloud Platform Business Rules
Overview on What’s New in SAP Cloud Platform Business Rules
 
SAP Cloud Platform CPEA Roadmap
SAP Cloud Platform CPEA RoadmapSAP Cloud Platform CPEA Roadmap
SAP Cloud Platform CPEA Roadmap
 
Cloud Platform Enterprise Agreement (CPEA) in Detail
Cloud Platform Enterprise Agreement (CPEA) in DetailCloud Platform Enterprise Agreement (CPEA) in Detail
Cloud Platform Enterprise Agreement (CPEA) in Detail
 
What’s new in SAP Cloud Platform Workflow – summer edition 2019
What’s new in SAP Cloud Platform Workflow – summer edition 2019What’s new in SAP Cloud Platform Workflow – summer edition 2019
What’s new in SAP Cloud Platform Workflow – summer edition 2019
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Recently uploaded (20)

"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 

Overview and Walkthrough of the Application Programming Model with SAP Cloud Platform

  • 1. SAP Cloud Platform Application Programming Model Daniel Hutzel CNA221
  • 2. 2PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ Take the session survey. We want to hear from you! Be sure to complete the session evaluation on the SAPTechEd mobile app. Download the app from iPhone App Store or Google Play. CNA221 CNA221
  • 3. ✓ ✓ Please complete your feedback for session  CNA221 Access replays at: http://sapteched.com/online Continue your discussions in: sap.com/community See all… SAPTechEd blog posts SAP TechEd 2018
  • 4. 6PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ Introduction SAP Web IDE CDS Service SDKs REST OData FioriHANA Java EE, Spring Node.js express Eclipse VSCode CLI The “Application Programming Model for SAP Cloud Platform” is a framework of tools, languages and libraries by SAP and OSS to efficiently and rapidly build enterprise services and applications in a full-stack development approach. It guides developers along a golden path of best practices, allowing them to focus on their domain while relieving them from tedious technical tasks.
  • 5. 7PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ Overview We complement cloud-native technologies with…  a CDS-based Services framework with 1st-class support by and for…  SAP Web IDE w/ tailored tools  SAP Fiori  SAP HANA  S/4 Extension scenarios Resulting in…  A consistent end-to-end programming model for enterprise services & applications  Guidance and best practices leveraging proven SAP technologies + Open Source software WebIDE Infrastructure App UIs? Domain Logic? Domain Model? localWebIDE+local SAP Fiori + other SAP HANA + other Service SDKsCDS CDS planned: CDS PlatformServices
  • 6. 8PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ Setup Develop TestRun CI/CD Operate Data Services Consumers Context and our focus Databases SAP HANA API Management Monitoring Scaling Profiling Connectivity Big Data Identities Authentication CI/CD Destinations Provisioning Caching Frontends / UIs Your Services and Apps by S/4 HANA Cloud SDK, …
  • 8. 10PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ Fictional task given Extension on Cloud PlatformAdd Reviews Manage Orders Maintain Catalog Admins Browse Books anybody Order Books registered includes… login… includes… T/5 backend system In cloud first… T/5 later Reuse Service
  • 9. 11PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ Capture Intent on Conceptual Level Best Practices & Benefits… using { Country, managed } from '@sap/cds/common‘; service ProductService { entity Products : managed { key ID : UUID; title : localized String; descr : localized String; country : Country; } } » What, not How. «
  • 10. 12PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ Minimizing Boilerplate service ProductService { entity Products { key ID : UUID; title : localized String; descr : localized String; country : Country; createdAt : DateTime @cds.on.insert: $now; createdBy : User @cds.on.insert: $user; modifiedBy : User @cds.on.update: $user; modifiedAt : DateTime @cds.on.update: $now; localized : Association to Products_texts on localized.lang = $user.locale and localized.ID = ID; texts : Association to many Products_texts on texts.ID=ID; } entity Products_texts { key lang : Language; key ID : UUID; title : String; descr : String; } type User : String(111); type CountryCode : String(3); type Locale : String(5); //... type Country : Association to Countries; type Language : Association to Languages; entity Countries : CodeList{ key code: CountryCode; } entity Languages : CodeList{ key code: Locale; } abstract entity CodeList { name : localized String; descr : localized String; } annotate Country with @( title:'{i18n>Country}', Common.ValueList.entity: 'Languages' ); annotate Language with @( title:'{i18n>Language}', Common.ValueList.entity: 'Countries' ); annotate CodeList with @( UI.Identification: [{ $Type: 'UI.DataField', Value: name }], ); } using { Country, managed } from '@sap/cds/common‘; service ProductService { entity Products : managed { key ID : UUID; title : localized String; descr : localized String; country : Country; } } » What, not How. «
  • 11. 13PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ Capture Intent on Conceptual Level Best Practices & Benefits… » What, not How. « It’s not just about less to type… It’s much more about:  Conciseness and comprehensiveness  Detecting flaws early  Single points to fix  Single points to optimize  Refocusing on your domain i.e. about improving overall quality, robustness and adaptability.
  • 12. 14PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ Capture Intent on Conceptual Level Best Practices & Benefits… Accelerate your Projects » Run early « » Grow as you go « Getting Started ————————————— o Setup your env (once) o Start a Project o Define Services  Run Add UIs / Frontends —————————————— o Switch to Web IDE, and… o Add a Fiori app  Run o Add Fiori markup  Run Provide Services —————————————— o Derive Data Models  Run o Deploy to DBs  Run o Add Initial Data  Run o … 2b continued… Close Feedback Loop • Start with services top-down • Spin-off parallel workstreams (→ frontend / backend) • Using the Service Definitions as their contracts
  • 13. 15PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ Capture Intent on Conceptual Level Best Practices & Benefits… Accelerate your Projects Leverage proven Methods » We eat your dog food « … originate close to use cases … are pushed down to data sources for execution Database CDS-based Runtimes Data Models Service Defs. Fiori UIs Fiori Markup OData CQLas views on Queries • OData = REST + Querying • SAP Fiori = flexible generic UIs • CDS += View Building
  • 14. 16PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ RESTful ABAP Common Programming Model SAP Fiori / UI5 SAP HANA SQL OData, REST ABAP Frameworks ABAP Toolset Core Data Services SAP Gateway Extension Services Events Models Replication Interoperability Reuse of Skills Cloud App Prog Model SAP Fiori / UI5 SAP HANA / other SQL OData, REST Java / Node Frameworks S/4 HANA Cloud SDK Core Data Services REST + OData libraries » Our dog food @ SAP «
  • 15. 17PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ Capture Intent on Conceptual Level Best Practices & Benefits… Accelerate your Projects Leverage proven Methods Openness & Flexibility Cloud Foundry Kubernetes XSA local SAP Fiori Angular React Vue • • • SAP HANA PostgreSQL sqlite • • • SAP Web IDE Eclipse VSCode • • • Core Node.js Java Core Data Services • We focus on the Core of Data-oriented Services • We integrate recommended choices from periphery … • But without lock-in!  still you decide what you use
  • 16. 18PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ Capture Intent on Conceptual Level Best Practices & Benefits… Accelerate your Projects Leverage proven Methods Openness & Flexibility Web IDE provides tailored tools for the application programming model. You can use Web IDE and/or local tools of your choice and switch between both. Common Project Layout & Build • app • srv • db Local Development • Command-line Tools • known IDEs / Editors • w/ CDS Editors • Local test runs • Maven/npm-based automation • • • SAP Web IDE Full-Stack • Project Storyboard • Project Explorer • Database Explorer • Graphical Modeling • Service Discovery • Fiori Dev Tools • CDS Editors • Drag & Drop
  • 17. 19PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ SAPWeb IDE Full-Stack tailored tools  Project Storyboard  Project Explorer  Database Explorer  CDS Editors  Outline  Drag & Drop  Problems View  Graphical Editors  Service Discovery and integration wizards (e.g. S/4)  Fiori Development Toolset
  • 18. 20PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ Capture Intent on Conceptual Level Best Practices & Benefits… Accelerate your Projects Leverage proven Methods Openness & Flexibility Enterprise Qualities Intrinsic Enterprise Features & Qualities  Localized Metadata  e.g. labels  Localized Data  text tables o Temporal Data  valid from/to, time travel  Authorization  Audit Logging  Project-level Extensibility ( providers) o Tenant-level Extensibility ( clients) o GDPR support o Validation Framework o Declarative Constraints o TypeScript for implementors o …
  • 19. 21PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ Capture Intent on Conceptual Level Best Practices & Benefits… Accelerate your Projects Leverage proven Methods Openness & Flexibility Enterprise Qualities Cloud Qualities Intrinsic Cloud Integration & Qualities  Authentication / UAA  JWT token handling  Configuration (via VCAP services, …)  Health checks  Logging & Monitoring  Tenant on/off boarding  Tenant isolation o Rate limiting o Caching (via Hystrix, …) o Messaging (via RapidMQ, …) o Resilience (in S/4H CloudSDK) o … by S/4 HANA Cloud SDK
  • 22. You don’t know CDS! :)
  • 23. 25PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ Entities & Views (from SQL) Associations Annotations Aspects Concise Queries entity Books @(title:‘Bücher‘) { key ID : UUID; title : localized String; author : Association to Authors; } entity Authors { key ID : UUID; name : String; books : Composition of many Books; } entity BooksList as select from Books { ID, title, author.name as author }  Entity-Relationship Modeling  Reflexive View Building  borrowed from SQL CDS is about…
  • 24. 26PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ Entities & Views (from SQL) Associations Annotations Aspects Concise Queries // Pure, unpolluted Structure define entity Foo { bar : String; } // Fiori UI Markup annotate Foo with @UI.Label:'Foo‘; // Authorization Model annotate Foo with @requires:‘admin‘; // Customer-specific Extensions extend entity Foo with { car:{ wheels: Integer; } }  separate concerns into partial definitions  avoids polluting your structure  allows using different tools on same effective models  in same or different files up to different projects CDS is about…
  • 25. 27PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ SELECT from Employees { name, addresses [kind='business’] .city.{ name, country.name } }  Path Expressions w/ optional Infix Filters  (Nested) Postfix Projections  Permeable for native database features SELECT e.name, city.name, country.name from Employees e LEFT JOIN Addresses a on a.id = e.address_id and a.kind='business' LEFT JOIN Cities city on city.id = addresses.city_id LEFT JOIN Countries country on country.id = city.country_id Entities & Views (from SQL) Associations Annotations Aspects Concise Queries CDS is about…
  • 26. 28PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ Entities & Views (from SQL) Associations Annotations Aspects Concise Queries service CatalogService { entity Books as projection on my.Books; entity Authors as projection on my.Authors; entity Orders as projection on my.Orders { *, book.title, book.author.name as author } where createdBy = $user; action cancel(order:UUID); }  data-centric: entities with intrinsic CRUD ops  entities as views on underlying ones  with seamless mapping to REST + OData CDS is about… Service Definitions
  • 27. 29PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ Entities & Views (from SQL) Associations Annotations Aspects Concise Queries  Core Schema Notation (CSN) as the core of all: models are plain JavaScript/JSON objects  minimal footprint, dynamic, no repositories  fast innovation and delivery cycles  zero lock-in to any database or stack { CSN } CDS YAML OData JSON, YAML JPA process Open API Code SQL DDL HANA DDL JSON CDS is about… Litew8 reincarnation in Node.js Service Definitions let model = {Foo:{kind:'entity'}}
  • 29. 31PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ Implementing Services Place a <service>.js file next to your <service>.cds file1 Add a Service Implementation Function2 Register your Event Handlers .before → before generic ones .on → instead of generic ones .after → before results go out 3 + Only for your real, domain-specific custom logic, leaving the rest to the built-in generic handlers Note: • all non-blocking, running in parallel • all connection handling, transaction mgmt., etc. is taken care of by the fwk
  • 30. 32PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ Consuming Services API Hub cds importImport Service Definition in case of external ones 1 Data Source Database Data Model Local Service Service Definition External Service Service Definition // query-style SELECT.from (Foo) .where ({ID:111}) .then (foo => … ) let foo = await SELECT.from (Foo) .where ({ID:111}) // method call-style ds.read(Foo) .where ({ID:111}) .then (foo => … ) // using declared custom operations ds.getFoo (111) .then (foo => … ) Data Sources can be Databases, external Services or local Services and are all consumed in the same way. OData and cds.services support querying by default. Connect to Data Source2 Read/Write Data3 const ds = await cds.connect.to ('SomeDataSource‘) const { Foo } = ds.entities()
  • 31. 33PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ Service-level Mashups CDS allows to easily mashup imported definitions with local ones. Views define which subset of data we are interested in. Imported Service Definition API Hub cds import Import the Service Definition1 Local Service Definitions using ExternalService as ext from ‚./imported/service‘; service CatalogService { // served from local database entity Books as projection on bookshop.Books; entity Authors as projection on bookshop.Authors; // served from external service entity Orders as SELECT from ext.Orders { *, book.title, book.author.name as author } where createdBy = $user; } const ext = await cds.connect.to ('ExternalService') const { Orders } = ext.entities() cds.serve ('CatalogService').with (function(){ this.on ('READ', 'Orders', ()=> SELECT.from (Orders) … ) }) Mashup into Local Service Definition:2 Call out to the external service in a custom handler:3
  • 32. 34PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ Service-level Replication using ExternalService as ext from '@imported/service‘; entity Books {…} entity Authors {…} // local replica entity filled from external service entity Orders as SELECT from ext.Orders { *, book.title, book.author.name as author } where createdBy = $user; const { Orders } = cds.entities // local cds.subscribe.to ('ExternalService‘) .with (ext => { ext.on (['CREATED', 'UPDATED'], 'Orders‘, ({data:{IDs}}) => { ext.read ('Orders') .where ('ID in', IDs) .foreach ( each => UPSERT(each).into (Orders) ) }) }) Local Data Model Imported Service Definition API Hub cds import Import the Service Definition1 Mashup into Local Data Model:2 Replicate actual data upon change events from the source:3 Cache data locally which is required in frequent and close access. Create tables with the views’ signature.
  • 33. 35PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ Open, Non-intrusive Design — you stay in control We use established OSS de-facto standards We add components focused on enterprise features You stay in control, you choose what to use and when! … e.g. in a custom server.js: Node.js express.js, … cds.services cds.ql, … Java Servlets, Spring Service SDK JDBC, JPA, cds.ql
  • 34. 36PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ Capture Intent on Conceptual Level Best Practices & Benefits… Accelerate your Projects Leverage proven Methods Openness & Flexibility Enterprise Qualities Cloud Qualities Services, not BObjects Data Model Service A Service B Services are stateless API facades. They contain all logic and validations and frequently expose views on data. Data Models define passive objects, mostly normalized and managed in databases
  • 35. 37PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ Single-purposed Services Manage Orders Maintain Catalog Admins service CatalogService { expose entity Books @readonly; expose entity Authors @readonly; action order (book) @requires:$user; } service CustomersService @(requires:$user) { expose entity Orders @(restrict:[ {grant:'READ,DELETE', where:'buyer=$user‘} ]); } service AdminService @(requires:‘admin‘) { expose entity Books expose entity Authors; expose entity Orders; }  fosters focused and efficient implementations  enables ‘late-cut µ services’ Browse Books anybody Order Books registered login includes…
  • 36. 38PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ Capture Intent on Conceptual Level Best Practices & Benefits… Accelerate your Projects Leverage proven Methods Openness & Flexibility Enterprise Qualities Cloud Qualities Services, not BObjects Querying, not ORM ORMs provide…? • Active objects manipulating internal state • Abstraction, shielding me from SQL • Portability across databases • Eager/Lazy Loading • Object Caches • …?
  • 37. 39PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ Data Access with cds.ql Managed Data Sources w/ CDS-based Reflection Queries as 1st class objects SQL-style usage Object-style usage Reflexive Querying w/ Late Materialization Asynchronous, non-blocking execution Managed Units of Work
  • 39. 41PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ Data Services Data Models Service Defs. Custom Handlers Fiori UIs Fiori Markup OData Stored Procs Breakouts Summary — Core Programming Model CDS cds.services cds.ql We promote… • Best Practices, not Anarchy! • Openness, not Blackbox! • Services, not Objects! • Querying, not ORM! • Capturing Intent • Enterprise & Cloud Qualities
  • 40. 42PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ Cookbook — there’s more… Getting Started ————————————— o Setup your env (once) o Start a Project o Define Services  Run Add UIs / Frontends —————————————— o Switch to Web IDE, and… o Add a Fiori app  Run o Add Fiori markup  Run Provide Services —————————————— o Derive Data Models  Run o Deploy to DBs  Run o Add Initial Data  Run o Add Custom Logic  Run o Reading / Writing Data o Add Authorization, I18n, … Reuse & Modularize ————————————— o Reuse @sap/cds/common o Reuse other packages o Modularize your app Consume Services ————————————— o Import ext. Service APIs o Consume Services o Service-level Mashups o Service-level Replication o Serve required Interfaces Deploy —————————— o Deploy to Cloud o Serverless o … for own use o … as SaaS solution Customize —————————— o Verticalization o Tenant-level Customization✓ ✓ ✓ ✓ ✓
  • 41. 43PUBLIC© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ Status Quo / Outlook o SAP Analytics Cloud integration o Analytical List Page by Fiori o Serverless deployment o Reactive Java o Enhanced GDPR support o Validation Framework o Declarative Constraints o TypeScript for implementors o …  CDS-based Service and Data Model  Service Providers in Node.js / Java  1st class support for HANA DBaaS  1st class support for Fiori Uis  1st class support in Web IDE  Local dev in VSCode, Eclipse, …  Fastrack dev with node + sqlite db  Intrinsic Enterprise Qualities, e.g…  Localized Data + I18n  Authorization  Audit Logging  GDPR support (basic)  Service Consumption via S/4H SDK  Service-level Mashups & Replication  Project-level Extensibility  Deployment to Cloud Foundry o Basis for Serverless eBaaS o 1st class support for PostgreSQL, … o Fiori Draft support + o OData v4 o Advanced support for Spring o SaaS Tenant-level Extensibility o More Tailored Tools Web IDE o Temporal Data o Events Consumption & Emitting o Generic Service Consumption o Generic support for Messaging o Deploy to Kubernetes  available o in progress o planned
  • 42.
  • 43. Thank you! Keren Rotenberg Lead Product Manager keren.rotenberg@sap.com Daniel Hutzel Chief Product Owner daniel.hutzel@sap.com
  • 44. ✓ ✓ Please complete your feedback for session  CNA221 Access replays at: http://sapteched.com/online Continue your discussions in: sap.com/community See all… SAPTechEd blog posts SAP TechEd 2018