sap inside track frankfurt 2015 martin steinberg and damir majer
TRANSCRIPT
![Page 1: Sap inside track frankfurt 2015 martin steinberg and damir majer](https://reader030.vdocuments.us/reader030/viewer/2022032617/55ac224c1a28abe50b8b46aa/html5/thumbnails/1.jpg)
APIs (not only) in SAP environments
Damir Majer @majcon
SAP Inside Track Frankfurt 2015
Martin Steinberg @SbgMartin
![Page 2: Sap inside track frankfurt 2015 martin steinberg and damir majer](https://reader030.vdocuments.us/reader030/viewer/2022032617/55ac224c1a28abe50b8b46aa/html5/thumbnails/2.jpg)
API?
more and more companies expose their application‘s functionality to the outside world
Copyright: http://www.webplanex.com/wp-‐content/uploads/2014/03/API-‐Development.png
![Page 3: Sap inside track frankfurt 2015 martin steinberg and damir majer](https://reader030.vdocuments.us/reader030/viewer/2022032617/55ac224c1a28abe50b8b46aa/html5/thumbnails/3.jpg)
Why is it important for me?
‣API can be stated to be a foundation for building applications ‣ Innovative applications based on existing implementations/functionality ‣Applications need functionality from different (cloud) services/systems ‣API „customers“ are developers ‣ can be composed creatively
![Page 4: Sap inside track frankfurt 2015 martin steinberg and damir majer](https://reader030.vdocuments.us/reader030/viewer/2022032617/55ac224c1a28abe50b8b46aa/html5/thumbnails/4.jpg)
An example
‣more and more applications use this exposed functionality
mobile application
Any SaaS API Amazon SaaS API SAP Backend API
<<uses>>
Apache API
![Page 5: Sap inside track frankfurt 2015 martin steinberg and damir majer](https://reader030.vdocuments.us/reader030/viewer/2022032617/55ac224c1a28abe50b8b46aa/html5/thumbnails/5.jpg)
Why is it important for me?
‣API‘s are usually available over internet (public) ‣ customers/users have to signup for usage („apikey“) ‣ „private API‘s“ for internal use (e.g. SAP backend system or SAP HANA system) within company‘s environment
![Page 6: Sap inside track frankfurt 2015 martin steinberg and damir majer](https://reader030.vdocuments.us/reader030/viewer/2022032617/55ac224c1a28abe50b8b46aa/html5/thumbnails/6.jpg)
Versioning
Security
Scalable
Documentation
Simple
Monetizable
Analyzable7
![Page 7: Sap inside track frankfurt 2015 martin steinberg and damir majer](https://reader030.vdocuments.us/reader030/viewer/2022032617/55ac224c1a28abe50b8b46aa/html5/thumbnails/7.jpg)
API foundation
API foundation layer
Business Logic
Standardization of ‣ user Management ‣ authorization checks ‣ logging ‣ use of harmonized patterns ‣ discovery ‣ documentation
Shared Memory
![Page 8: Sap inside track frankfurt 2015 martin steinberg and damir majer](https://reader030.vdocuments.us/reader030/viewer/2022032617/55ac224c1a28abe50b8b46aa/html5/thumbnails/8.jpg)
„Private API“
SAP Business Suite System
Business Logic
API components API components API components„private API“
Service Integration Layer
dependency
Custom Applications
<<uses>>
HTML5 Apps SAPUI5
<<embedded>>
![Page 9: Sap inside track frankfurt 2015 martin steinberg and damir majer](https://reader030.vdocuments.us/reader030/viewer/2022032617/55ac224c1a28abe50b8b46aa/html5/thumbnails/9.jpg)
Solutions in ABAP
![Page 10: Sap inside track frankfurt 2015 martin steinberg and damir majer](https://reader030.vdocuments.us/reader030/viewer/2022032617/55ac224c1a28abe50b8b46aa/html5/thumbnails/10.jpg)
‣ Systems should expose behavior with interfaces ‣ Interfaces are meant and not Classes… ‣ Interfaces only show the Specification and allow clear isolation from the implementation part
Program against an Interface and not against an Implementation
![Page 11: Sap inside track frankfurt 2015 martin steinberg and damir majer](https://reader030.vdocuments.us/reader030/viewer/2022032617/55ac224c1a28abe50b8b46aa/html5/thumbnails/11.jpg)
class lcl_very_important definition. public section.
interfaces: lif_smart_interface. “…
endclass.
class lcl_very_important implementation. “… method lif_smart_interface~applause. “ really cool and fancy implementations“ it´s your action ;-) endmethod.
endclass.
interface lif_smart_interface. public section.
methods: applause importing iv_loudness type i.
endinterface.
client lif_smart_interface lcl_very_important
![Page 12: Sap inside track frankfurt 2015 martin steinberg and damir majer](https://reader030.vdocuments.us/reader030/viewer/2022032617/55ac224c1a28abe50b8b46aa/html5/thumbnails/12.jpg)
Design Pattern
![Page 13: Sap inside track frankfurt 2015 martin steinberg and damir majer](https://reader030.vdocuments.us/reader030/viewer/2022032617/55ac224c1a28abe50b8b46aa/html5/thumbnails/13.jpg)
![Page 14: Sap inside track frankfurt 2015 martin steinberg and damir majer](https://reader030.vdocuments.us/reader030/viewer/2022032617/55ac224c1a28abe50b8b46aa/html5/thumbnails/14.jpg)
‣ complex Solutions are defined by a Name ‣Developer has an unique vocabulary
creational structural behavioral
Pattern categories
![Page 15: Sap inside track frankfurt 2015 martin steinberg and damir majer](https://reader030.vdocuments.us/reader030/viewer/2022032617/55ac224c1a28abe50b8b46aa/html5/thumbnails/15.jpg)
Facade Pattern
FACADE
![Page 16: Sap inside track frankfurt 2015 martin steinberg and damir majer](https://reader030.vdocuments.us/reader030/viewer/2022032617/55ac224c1a28abe50b8b46aa/html5/thumbnails/16.jpg)
API as a facade
Business LogicAPI components
Business LogicAPI components
Business LogicAPI components
Idealistic approach: harmonized object model homogenous interface design
delivered or custom
Business Logic
Business Logic
clear and simple to use
![Page 17: Sap inside track frankfurt 2015 martin steinberg and damir majer](https://reader030.vdocuments.us/reader030/viewer/2022032617/55ac224c1a28abe50b8b46aa/html5/thumbnails/17.jpg)
API components – from a quality perspective
Let‘s differentiate between 3 different quality levels: • Tools
• for time-‐limited usage, like data migration report • Potential library components
• any implementation which is not library, yet • Library components
• automated testing necessary from the beginning • stable interface • Versioning • Documentation
• API components are „library components“
• ABAP Unit • Documentation (ABAP Doc + DMS)
![Page 18: Sap inside track frankfurt 2015 martin steinberg and damir majer](https://reader030.vdocuments.us/reader030/viewer/2022032617/55ac224c1a28abe50b8b46aa/html5/thumbnails/18.jpg)
Testable Code
![Page 19: Sap inside track frankfurt 2015 martin steinberg and damir majer](https://reader030.vdocuments.us/reader030/viewer/2022032617/55ac224c1a28abe50b8b46aa/html5/thumbnails/19.jpg)
25% - 50% of Development costs are used for Testing
Software should be simple tested
![Page 20: Sap inside track frankfurt 2015 martin steinberg and damir majer](https://reader030.vdocuments.us/reader030/viewer/2022032617/55ac224c1a28abe50b8b46aa/html5/thumbnails/20.jpg)
isolated testedtoo much dependencies
![Page 21: Sap inside track frankfurt 2015 martin steinberg and damir majer](https://reader030.vdocuments.us/reader030/viewer/2022032617/55ac224c1a28abe50b8b46aa/html5/thumbnails/21.jpg)
![Page 22: Sap inside track frankfurt 2015 martin steinberg and damir majer](https://reader030.vdocuments.us/reader030/viewer/2022032617/55ac224c1a28abe50b8b46aa/html5/thumbnails/22.jpg)
Dependency Injection
‣concept idea by Martin Fowler ‣based on Single Responsibility Principle (SRP)
‣a class uses available functionality of another class only by implementing against the interface ‣allows different implementation approaches
http://en.wikipedia.org/wiki/Dependency_injection http://en.wikipedia.org/wiki/Dependency_inversion_principle http://en.wikipedia.org/wiki/SOLID_%28object-‐oriented_design%29
![Page 23: Sap inside track frankfurt 2015 martin steinberg and damir majer](https://reader030.vdocuments.us/reader030/viewer/2022032617/55ac224c1a28abe50b8b46aa/html5/thumbnails/23.jpg)
Dependency(Injec+on(
![Page 24: Sap inside track frankfurt 2015 martin steinberg and damir majer](https://reader030.vdocuments.us/reader030/viewer/2022032617/55ac224c1a28abe50b8b46aa/html5/thumbnails/24.jpg)
Isola&on(by(mocking(
0 Mocking(is(a(principle(coming(from(test(driven(development(
0 use(dependency(injec&on(for(mocking(purposes(
0 use(it(for(contract0first(approach(
![Page 25: Sap inside track frankfurt 2015 martin steinberg and damir majer](https://reader030.vdocuments.us/reader030/viewer/2022032617/55ac224c1a28abe50b8b46aa/html5/thumbnails/25.jpg)
Public API
SAP Business Suite System
Business Logic
API components API components API components„private API“
Service Integration Layere.g. AS ABAP frontend server(s) EAI
API components„public API“ API components API componentsAPI Mgmt.
HTML5 Apps Customers …
![Page 26: Sap inside track frankfurt 2015 martin steinberg and damir majer](https://reader030.vdocuments.us/reader030/viewer/2022032617/55ac224c1a28abe50b8b46aa/html5/thumbnails/26.jpg)
Service Integration Layer
API components
API Mgmt.Service Integration Layer
API components
API Mgmt.
Service Integration Layer
API components
API Mgmt.Service Integration Layer
API components
API Mgmt.
Gateway as a Service
API components
API Mgmt.
Extension Apps
Public API provider
HybrisGoogle, …
Did you recognize the yaas.io announcement?
![Page 27: Sap inside track frankfurt 2015 martin steinberg and damir majer](https://reader030.vdocuments.us/reader030/viewer/2022032617/55ac224c1a28abe50b8b46aa/html5/thumbnails/27.jpg)
is to be flexible
![Page 28: Sap inside track frankfurt 2015 martin steinberg and damir majer](https://reader030.vdocuments.us/reader030/viewer/2022032617/55ac224c1a28abe50b8b46aa/html5/thumbnails/28.jpg)
Martin Steinberg
about.me/martin.steinberg twitter: @SbgMartin
Damir Majer
www.majcon.de twitter: @majcon
![Page 29: Sap inside track frankfurt 2015 martin steinberg and damir majer](https://reader030.vdocuments.us/reader030/viewer/2022032617/55ac224c1a28abe50b8b46aa/html5/thumbnails/29.jpg)
Thank you for your attention!