SlideShare a Scribd company logo
1 of 60
© nabisoft. All rights reserved. Proprietary and confidential.
Hacking the Explored App by Adding Custom Code
A smart way to share (Open|SAP) UI5 code snippets with others
www.nabisoft.com
Nabi Zamani, CEO & Software Engineer3/11/16
www.nabisoft.com 2
Overview
www.nabisoft.com 3
Motivation
www.nabisoft.com 4
Overview
www.nabisoft.com 5
What is the Explored App?
 An app build with UI5
 Looks like a Master-Detail app
 It runs on mobile devices
 #1 resource for Copy&Paste code snippets
 Illustrates / contains
 UI5 features
 API usage
 Controls in action
 Best Practices
 Tutorials
 Downloadable Code
 Available on GitHub
If you don’t know it very well you might want to
get familiar with it
www.nabisoft.com 6
Where can I find the Explored App?
 Latest versions:
 OpenUI5: https://openui5.hana.ondemand.com/explored.html
 OpenUI5 Beta: https://openui5beta.hana.ondemand.com/explored.html
 SAPUI5: https://sapui5.hana.ondemand.com/explored.html
 Specific versions, i.e.:
 OpenUI5 1.34.8: https://openui5.hana.ondemand.com/1.34.8/explored.html
 OpenUI5 Beta 1.36.4: https://openui5beta.hana.ondemand.com/1.36.4/explored.html
 SAPUI5 1.34.8: https://sapui5.hana.ondemand.com/1.34.8/explored.html
 GitHub: https://github.com/SAP/openui5/tree/master/src/sap.ui.demokit/src/sap/ui/demokit/explored
 Hint – This is how to find the available versions:
 OpenUI5: https://openui5.hana.ondemand.com/versionoverview.html
 OpenUI5 Beta: https://openui5beta.hana.ondemand.com/versionoverview.html
 SAPUI5: https://sapui5.hana.ondemand.com/versionoverview.html
www.nabisoft.com 7
Getting to the Explored App is easy
www.nabisoft.com 8
The Explored App looks like a Master-Detail app
www.nabisoft.com 9
For every item in the master list you have one or more examples
www.nabisoft.com 10
Each example can be executed directly in the browser incl. mobile browsers
www.nabisoft.com 11
You can also check the source code before you download the whole example
www.nabisoft.com 12
Most of the examples use XMLViews – the recommended ViewType
www.nabisoft.com 13
Who could use the Explored App?
 Developers
 Copy & Paste
 Code faster
 Effort estimation
 ...
 UI/UX Designer
 Getting familiar with
Out-of-the-Box Look&Feel
 Consider what‘s easily possible
 Product Owners / Concepters
 See what‘s possible
 Effort estimation
 Everybody
 See how UI5 feels + looks like
 „Corporate Design“
 Framework Evaluation
 Demonstration
www.nabisoft.com 14
Overview
www.nabisoft.com 15
To get the code just clone OpenUI5 from GitHub
 The Explored App is part of the Demo Kit
 GitHub: https://github.com/SAP/openui5
 Setup your dev environment:
https://github.com/SAP/openui5/blob/master/docs/
developing.md
 Finally open the
 Testsuite: http://localhost:8080/testsuite/
 Explored App:
http://localhost:8080/testsuite/explored.html
www.nabisoft.com 16
www.nabisoft.com 17
Disclaimer - What you will see from now on is subject to change
 No public API published for „intrusion“ of own
examples to the Explored App
 But sometimes you have to break the rules
 Let‘s break the rules and ask for forgiveness later 
www.nabisoft.com 18
www.nabisoft.com 19
 Categories are defined here
 Only place you might want
to change
 Suggestion: do not change
other parts of the
Explored App itself
www.nabisoft.com 20
Component
based app
www.nabisoft.com 21
 Routing configuration is
done in the Component
 „Old“ Component  no
manifest.json file aka
app descriptor
 Component loads the
root view
www.nabisoft.com 22
 From the folder
structure you can guess
that the Explored App is
an „old“ app
 Views and Controllers
are in the same folder
 The root view app.view.js
consists of a simple
sap.m.SplitApp
www.nabisoft.com 23
Overview
www.nabisoft.com 24
A few days/weeks ago the first sap.ui.table.TreeTable example was added
www.nabisoft.com 25
Basic OData TreeBinding without $metadata annotations and nav. properties
 We want to add a new TreeTable example now
 Existing sap.ui.table.TreeTable examples can be found here:
 /openui5/src/sap.ui.table/test/sap/ui/table/demokit/sample/TreeTable
 Step 1: Changing the corresponding docuindex.json file:
 This file is typically in a „demokit“ folder
 /openui5/src/sap.ui.table/test/sap/ui/table/demokit/docuindex.json
 The content of this file is used by the Explored App
www.nabisoft.com 26
The SDK/Demokit knows how to find the
docuindex.json file from the library‘s
.library file
www.nabisoft.com 27
First modify the entities in the docuindex.json file
 Add new entries to the entities array if needed
 In our case there is already entry for
sap.ui.table.TreeTable
 We just add a new entry to ist samples array
 For more information check the docuindex.json file
www.nabisoft.com 28
Then modify the samples in the same docuindex.json file
 The id is the same entry you added to samples array on the previous slide
 The name will be displayed in the Explored App
 The description is also displayed
www.nabisoft.com 29
Next we want to implement the Example itself
 From the docuindex.json file we can find out where to put our examples
 The namespace sap.ui.table.sample is mapped to
/openui5/src/sap.ui.table/test/sap/ui/table/demokit/sample/
 So our sap.ui.table.sample.TreeTable.BasicODataTreeBinding example must be in the folder
/openui5/src/sap.ui.table/test/sap/ui/table/demokit/sample/TreeTable/BasicODataTreeBinding
www.nabisoft.com 30
Implementing the example
 Examples are component based
 Our example consists of the following files:
 metadata.xml: describes our Odata service
 Nodes.json: this is the mock data for out Nodes EntitySet
 mockserver.js: custom configuration of our mock server
 Controller.controll.js: our only controller (just for the sake of it)
 View.view.xml: Our only view, which is the root view
 Component.js: here we call our mockserver and bind an OdataModel to the
Component. This file is loaded by the Explored App.
www.nabisoft.com 31
www.nabisoft.com 32
 This mock data contains the hiarachy for the TreeTable
 No Navigation Properties
 No Annotations in the $metadata file
 The data actually looks like a flat list
www.nabisoft.com 33
www.nabisoft.com 34
www.nabisoft.com 35
 Tell the TreeTable how to
construct the Tree/Hierarchy
 Feels like magic 
 For details check the API docs
www.nabisoft.com 36
 The component is called/used by the Explored App
 It loads our view
 Files to be included in the downloaded archive
www.nabisoft.com 37
Our example is now in the Explored App
www.nabisoft.com 38
We can try it out – just as easy as we are used to do it
www.nabisoft.com 39
The can also have a look at the code
www.nabisoft.com 40
An we can download the files that we listed in the Component.js file
www.nabisoft.com 41
The downloaded archive even contains a generated index.html file
www.nabisoft.com 42
Get the code of the TreeTable example we saw on the previous slides
 TreeTable with Basic OData TreeBinding + additional OData TreeBinding example:
 Change (own fork):
https://github.com/nzamani/openui5/tree/ui5con2016-treetable-explored-samples
 I will create a pull request for this
www.nabisoft.com 43
Next Example: Tutorials inside the Explored App
 Did you every think about displaying a PDF inside you UI5 app?
 Let’s create a tutorial that has four steps:
 Displaying PDF files via <embed>
 Displaying PDF files via iFrame
 Displaying PDF files via iFrame that loads HTML wrapper for object/embed
 Displaying PDF files using pdf.js (https://mozilla.github.io/pdf.js/)
 In all steps we will use sap.ui.core.HTML
 Therefore we want the tutorial to be part of sap.ui.core
 Let’s do it…
www.nabisoft.com 44
This is what we want in the end
www.nabisoft.com 45
Step 1: Press a Button to display a PDF via <embed>
www.nabisoft.com 46
Step 1: Press a Button to display a PDF via <embed>
www.nabisoft.com 47
Modify the entities in the docuindex.json file (no other changes in this file!)
 Add a new tutorial entity to the docuindex.json file at
/openui5/src/sap.ui.core/test/sap/ui/core/demokit/docuindex.json
www.nabisoft.com 48
Create a new folder for the tutorial (i.e. by copying from existing tutorials)
 Create folder:
/openui5/src/sap.ui.core/test/sap/ui/core/demokit/tutorial/pdfviewer/
 In this folder create the following index.html file (for convenience):
www.nabisoft.com 49
Create a numbered folder 01 for the first step of the new tutorial
 Your app code will be inside the webapp
folder of each step
 Each step has a Component.js
file which is on the same level
as the webapp folder
 Let’s call this file the
“Step Component”
 Each step is a
Component based app
www.nabisoft.com 50
 The Step Component defines
 The starting point of the step
 the files for download
/openui5/src/sap.ui.core/test/sap/ui/core/demokit/tutorial/pdfviewer/01/Component.js
www.nabisoft.com 51
 Our index.html file loads our component
based tutorial
 This file will not change in later steps
/openui5/src/sap.ui.core/test/sap/ui/core/demokit/tutorial/pdfviewer/01/webapp/index.html
www.nabisoft.com 52
 The Component.js is very simple
 It will not change later
/openui5/src/sap.ui.core/test/sap/ui/core/demokit/tutorial/pdfviewer/01/webapp/Component.js
www.nabisoft.com 53
 In the App Descriptor we configure the routing
 It‘s as simple as the other published tutorials
/openui5/src/sap.ui.core/test/sap/ui/core/demokit/tutorial/pdfviewer/01/webapp/manifest.json
www.nabisoft.com 54
The rest of the magic “happens“ in one of our 4 PDF controllers (Step 1 + 2)
/pdfviewer/01/webapp/controller/PdfEmbed.controller.js
/pdfviewer/02/webapp/controller/PdfIframe.controller.js
www.nabisoft.com 55
The rest of the magic “happens“ in one of our 4 PDF controllers (Step 3 + 4)
/pdfviewer/03/webapp/controller/PdfIframeHtmlWrapper
/pdfviewer/04/webapp/controller/PdfJs.controller.js
www.nabisoft.com 56
What we have after Step 4
www.nabisoft.com 57
Pdf.js was introduced in Step 4 and it works great even on mobile devices
www.nabisoft.com 58
The tutorial step can also be accessed directly without the Explored App
www.nabisoft.com 59
Get the code of the PDF Viewer tutorial we created on the previous slides
 PDF Viewer Tutorial:
 Change (own fork):
https://github.com/nzamani/openui5/tree/ui5con2016-pdfviewer-explored-tutorial
 Or browse my fork: https://github.com/nzamani/openui5
www.nabisoft.com 60
Thank You
 Check our UI5 tutorials:
https://www.nabisoft.com/tutorials/sapui5/
 Contact us:
https://www.nabisoft.com/contact
 Share your experience & create Pull Requests on GitHub 

More Related Content

What's hot

Rendra Toro - Model View Presenter
Rendra Toro - Model View PresenterRendra Toro - Model View Presenter
Rendra Toro - Model View PresenterDicoding
 
Testable Android Apps DroidCon Italy 2015
Testable Android Apps DroidCon Italy 2015Testable Android Apps DroidCon Italy 2015
Testable Android Apps DroidCon Italy 2015Fabio Collini
 
CookpadTechConf2018-(Mobile)TestAutomation
CookpadTechConf2018-(Mobile)TestAutomationCookpadTechConf2018-(Mobile)TestAutomation
CookpadTechConf2018-(Mobile)TestAutomationKazuaki Matsuo
 
Drupal 8 Quick Start: An Overview of Lightning
Drupal 8 Quick Start: An Overview of LightningDrupal 8 Quick Start: An Overview of Lightning
Drupal 8 Quick Start: An Overview of LightningAcquia
 
GOTO - The Ultimate Android Lock Screen
GOTO - The Ultimate Android Lock ScreenGOTO - The Ultimate Android Lock Screen
GOTO - The Ultimate Android Lock ScreenInnoWeb Tech, LLC
 
DelhiMeetup_AnypointMonitoring_v1.pptx
DelhiMeetup_AnypointMonitoring_v1.pptxDelhiMeetup_AnypointMonitoring_v1.pptx
DelhiMeetup_AnypointMonitoring_v1.pptxAnuragSharma900
 
MuleSoft Surat Virtual Meetup#36 - MuleSoft Composer for Salesforce - No Code...
MuleSoft Surat Virtual Meetup#36 - MuleSoft Composer for Salesforce - No Code...MuleSoft Surat Virtual Meetup#36 - MuleSoft Composer for Salesforce - No Code...
MuleSoft Surat Virtual Meetup#36 - MuleSoft Composer for Salesforce - No Code...Jitendra Bafna
 
Go ahead outside Japan
Go ahead outside JapanGo ahead outside Japan
Go ahead outside JapanKazuaki Matsuo
 
Testable Android Apps using data binding and MVVM
Testable Android Apps using data binding and MVVMTestable Android Apps using data binding and MVVM
Testable Android Apps using data binding and MVVMFabio Collini
 
20170302 tryswift tasting_tests
20170302 tryswift tasting_tests20170302 tryswift tasting_tests
20170302 tryswift tasting_testsKazuaki Matsuo
 
Lesson 2 introduction in computing
Lesson 2 introduction in computingLesson 2 introduction in computing
Lesson 2 introduction in computingProfessor Thor
 
Advance appium workshop.pptx
Advance appium workshop.pptxAdvance appium workshop.pptx
Advance appium workshop.pptxVodqaBLR
 
Android SDK and PhoneGap
Android SDK and PhoneGapAndroid SDK and PhoneGap
Android SDK and PhoneGapDoncho Minkov
 
How to create android applications
How to create android applicationsHow to create android applications
How to create android applicationsTOPS Technologies
 
Snowplow - Analytics & Data Rollout at Seven
Snowplow - Analytics & Data Rollout at SevenSnowplow - Analytics & Data Rollout at Seven
Snowplow - Analytics & Data Rollout at SevenLuke Lewandowski
 
The Tester Role in the Agile Release Train
The Tester Role in the Agile Release TrainThe Tester Role in the Agile Release Train
The Tester Role in the Agile Release TrainTechWell
 
Hassle-Free Continuous Integration with Real Device Testing
Hassle-Free Continuous Integration with Real Device TestingHassle-Free Continuous Integration with Real Device Testing
Hassle-Free Continuous Integration with Real Device TestingBitbar
 
Desmistificando Tecnologias
Desmistificando TecnologiasDesmistificando Tecnologias
Desmistificando TecnologiasJuliano Martins
 

What's hot (20)

Rendra Toro - Model View Presenter
Rendra Toro - Model View PresenterRendra Toro - Model View Presenter
Rendra Toro - Model View Presenter
 
Testable Android Apps DroidCon Italy 2015
Testable Android Apps DroidCon Italy 2015Testable Android Apps DroidCon Italy 2015
Testable Android Apps DroidCon Italy 2015
 
Espresso
EspressoEspresso
Espresso
 
CookpadTechConf2018-(Mobile)TestAutomation
CookpadTechConf2018-(Mobile)TestAutomationCookpadTechConf2018-(Mobile)TestAutomation
CookpadTechConf2018-(Mobile)TestAutomation
 
Drupal 8 Quick Start: An Overview of Lightning
Drupal 8 Quick Start: An Overview of LightningDrupal 8 Quick Start: An Overview of Lightning
Drupal 8 Quick Start: An Overview of Lightning
 
GOTO - The Ultimate Android Lock Screen
GOTO - The Ultimate Android Lock ScreenGOTO - The Ultimate Android Lock Screen
GOTO - The Ultimate Android Lock Screen
 
DelhiMeetup_AnypointMonitoring_v1.pptx
DelhiMeetup_AnypointMonitoring_v1.pptxDelhiMeetup_AnypointMonitoring_v1.pptx
DelhiMeetup_AnypointMonitoring_v1.pptx
 
MuleSoft Surat Virtual Meetup#36 - MuleSoft Composer for Salesforce - No Code...
MuleSoft Surat Virtual Meetup#36 - MuleSoft Composer for Salesforce - No Code...MuleSoft Surat Virtual Meetup#36 - MuleSoft Composer for Salesforce - No Code...
MuleSoft Surat Virtual Meetup#36 - MuleSoft Composer for Salesforce - No Code...
 
Go ahead outside Japan
Go ahead outside JapanGo ahead outside Japan
Go ahead outside Japan
 
Testable Android Apps using data binding and MVVM
Testable Android Apps using data binding and MVVMTestable Android Apps using data binding and MVVM
Testable Android Apps using data binding and MVVM
 
20170302 tryswift tasting_tests
20170302 tryswift tasting_tests20170302 tryswift tasting_tests
20170302 tryswift tasting_tests
 
Lesson 2 introduction in computing
Lesson 2 introduction in computingLesson 2 introduction in computing
Lesson 2 introduction in computing
 
Advance appium workshop.pptx
Advance appium workshop.pptxAdvance appium workshop.pptx
Advance appium workshop.pptx
 
Xcode 6 release_notes
Xcode 6 release_notesXcode 6 release_notes
Xcode 6 release_notes
 
Android SDK and PhoneGap
Android SDK and PhoneGapAndroid SDK and PhoneGap
Android SDK and PhoneGap
 
How to create android applications
How to create android applicationsHow to create android applications
How to create android applications
 
Snowplow - Analytics & Data Rollout at Seven
Snowplow - Analytics & Data Rollout at SevenSnowplow - Analytics & Data Rollout at Seven
Snowplow - Analytics & Data Rollout at Seven
 
The Tester Role in the Agile Release Train
The Tester Role in the Agile Release TrainThe Tester Role in the Agile Release Train
The Tester Role in the Agile Release Train
 
Hassle-Free Continuous Integration with Real Device Testing
Hassle-Free Continuous Integration with Real Device TestingHassle-Free Continuous Integration with Real Device Testing
Hassle-Free Continuous Integration with Real Device Testing
 
Desmistificando Tecnologias
Desmistificando TecnologiasDesmistificando Tecnologias
Desmistificando Tecnologias
 

Viewers also liked

Displaying server-side OData messages in ui5 (Ui5con 2017)
Displaying server-side OData messages in ui5 (Ui5con 2017)Displaying server-side OData messages in ui5 (Ui5con 2017)
Displaying server-side OData messages in ui5 (Ui5con 2017)Nabi Zamani
 
Minimize time-to-market with UI5
Minimize time-to-market with UI5Minimize time-to-market with UI5
Minimize time-to-market with UI5Benjamin Steinvorth
 
Building Custom Controls to Visualize Data (UI5Con 2016 Frankfurt)
Building Custom Controls to Visualize Data (UI5Con 2016 Frankfurt)Building Custom Controls to Visualize Data (UI5Con 2016 Frankfurt)
Building Custom Controls to Visualize Data (UI5Con 2016 Frankfurt)Maximilian Lenkeit
 
UI5 Controls (UI5con 2016)
UI5 Controls (UI5con 2016)UI5 Controls (UI5con 2016)
UI5 Controls (UI5con 2016)Andreas Kunz
 
SAP TRAINING CLASSES FOR UI5
SAP TRAINING CLASSES FOR UI5SAP TRAINING CLASSES FOR UI5
SAP TRAINING CLASSES FOR UI5tmanasaganesh
 
Ux strategy in SAP - Leverage your current investments
Ux strategy in SAP - Leverage your current investmentsUx strategy in SAP - Leverage your current investments
Ux strategy in SAP - Leverage your current investmentsTom Van Doorslaer
 
Analytics & Fiori with the Analysis Path Framework
Analytics & Fiori with the Analysis Path FrameworkAnalytics & Fiori with the Analysis Path Framework
Analytics & Fiori with the Analysis Path FrameworkTobias Trapp
 
SAP TechEd 2016 when_to_use_fiori_or_sap_screen_personas
SAP TechEd 2016 when_to_use_fiori_or_sap_screen_personasSAP TechEd 2016 when_to_use_fiori_or_sap_screen_personas
SAP TechEd 2016 when_to_use_fiori_or_sap_screen_personasPeter Spielvogel
 
How to write a Developer CV/Résumé that will get you hired
How to write a Developer CV/Résumé that will get you hiredHow to write a Developer CV/Résumé that will get you hired
How to write a Developer CV/Résumé that will get you hiredPerl Careers
 
How to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheHow to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheLeslie Samuel
 

Viewers also liked (13)

Displaying server-side OData messages in ui5 (Ui5con 2017)
Displaying server-side OData messages in ui5 (Ui5con 2017)Displaying server-side OData messages in ui5 (Ui5con 2017)
Displaying server-side OData messages in ui5 (Ui5con 2017)
 
Minimize time-to-market with UI5
Minimize time-to-market with UI5Minimize time-to-market with UI5
Minimize time-to-market with UI5
 
Building Custom Controls to Visualize Data (UI5Con 2016 Frankfurt)
Building Custom Controls to Visualize Data (UI5Con 2016 Frankfurt)Building Custom Controls to Visualize Data (UI5Con 2016 Frankfurt)
Building Custom Controls to Visualize Data (UI5Con 2016 Frankfurt)
 
UI5 Controls (UI5con 2016)
UI5 Controls (UI5con 2016)UI5 Controls (UI5con 2016)
UI5 Controls (UI5con 2016)
 
Web dynpro & ui5
Web dynpro & ui5Web dynpro & ui5
Web dynpro & ui5
 
SAP TRAINING CLASSES FOR UI5
SAP TRAINING CLASSES FOR UI5SAP TRAINING CLASSES FOR UI5
SAP TRAINING CLASSES FOR UI5
 
User experience
User experienceUser experience
User experience
 
Bof - grey haired abap
Bof - grey haired abapBof - grey haired abap
Bof - grey haired abap
 
Ux strategy in SAP - Leverage your current investments
Ux strategy in SAP - Leverage your current investmentsUx strategy in SAP - Leverage your current investments
Ux strategy in SAP - Leverage your current investments
 
Analytics & Fiori with the Analysis Path Framework
Analytics & Fiori with the Analysis Path FrameworkAnalytics & Fiori with the Analysis Path Framework
Analytics & Fiori with the Analysis Path Framework
 
SAP TechEd 2016 when_to_use_fiori_or_sap_screen_personas
SAP TechEd 2016 when_to_use_fiori_or_sap_screen_personasSAP TechEd 2016 when_to_use_fiori_or_sap_screen_personas
SAP TechEd 2016 when_to_use_fiori_or_sap_screen_personas
 
How to write a Developer CV/Résumé that will get you hired
How to write a Developer CV/Résumé that will get you hiredHow to write a Developer CV/Résumé that will get you hired
How to write a Developer CV/Résumé that will get you hired
 
How to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheHow to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your Niche
 

Similar to Hacking the Explored App by Adding Custom Code (UI5con 2016)

Introduction to Behavior Driven Development
Introduction to Behavior Driven Development Introduction to Behavior Driven Development
Introduction to Behavior Driven Development Robin O'Brien
 
How to Create a Custom WordPress Plugin
How to Create a Custom WordPress PluginHow to Create a Custom WordPress Plugin
How to Create a Custom WordPress PluginAndolasoft Inc
 
WP7 HUB_Introducción a Visual Studio
WP7 HUB_Introducción a Visual StudioWP7 HUB_Introducción a Visual Studio
WP7 HUB_Introducción a Visual StudioMICTT Palma
 
OpenWhisk by Example - Auto Retweeting Example in Python
OpenWhisk by Example - Auto Retweeting Example in PythonOpenWhisk by Example - Auto Retweeting Example in Python
OpenWhisk by Example - Auto Retweeting Example in PythonCodeOps Technologies LLP
 
Introduction to Interactive Shiny Web Application
Introduction to Interactive Shiny Web ApplicationIntroduction to Interactive Shiny Web Application
Introduction to Interactive Shiny Web ApplicationOlga Scrivner
 
Getting started-with-zend-framework
Getting started-with-zend-frameworkGetting started-with-zend-framework
Getting started-with-zend-frameworkNilesh Bangar
 
XCode Templates tutorial – How To Create Custom Template Step By Step.pdf
XCode Templates tutorial – How To Create Custom Template Step By Step.pdfXCode Templates tutorial – How To Create Custom Template Step By Step.pdf
XCode Templates tutorial – How To Create Custom Template Step By Step.pdfSatawareTechnologies6
 
3 Ways to Get Started with a React App in 2024.pdf
3 Ways to Get Started with a React App in 2024.pdf3 Ways to Get Started with a React App in 2024.pdf
3 Ways to Get Started with a React App in 2024.pdfBOSC Tech Labs
 
Basic iOS Training with SWIFT - Part 4
Basic iOS Training with SWIFT - Part 4Basic iOS Training with SWIFT - Part 4
Basic iOS Training with SWIFT - Part 4Manoj Ellappan
 
[Patel] SPFx: An ISV Insight into latest Microsoft's customization model
[Patel] SPFx: An ISV Insight into latest Microsoft's customization model[Patel] SPFx: An ISV Insight into latest Microsoft's customization model
[Patel] SPFx: An ISV Insight into latest Microsoft's customization modelEuropean Collaboration Summit
 
Create Your First Cocoa pods
Create Your First Cocoa podsCreate Your First Cocoa pods
Create Your First Cocoa podsPawan Ramteke
 
Introduction to package manager
Introduction to package managerIntroduction to package manager
Introduction to package manageryashobantabai
 
Appear IQ - Tutorials Backbone.js
Appear IQ - Tutorials Backbone.jsAppear IQ - Tutorials Backbone.js
Appear IQ - Tutorials Backbone.jsAppear
 
How to create a local Android open source project mirror in 6 easy steps
How to create a local Android open source project mirror in 6 easy stepsHow to create a local Android open source project mirror in 6 easy steps
How to create a local Android open source project mirror in 6 easy stepsDeveo
 
Expanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate UsabilityExpanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate UsabilityTeamstudio
 
Azure DevOps Extensions
Azure DevOps ExtensionsAzure DevOps Extensions
Azure DevOps ExtensionsChristian Waha
 
How create react app help in creating a new react applications
How create react app help in creating a new react applications How create react app help in creating a new react applications
How create react app help in creating a new react applications Concetto Labs
 

Similar to Hacking the Explored App by Adding Custom Code (UI5con 2016) (20)

Introduction to Behavior Driven Development
Introduction to Behavior Driven Development Introduction to Behavior Driven Development
Introduction to Behavior Driven Development
 
How to Create a Custom WordPress Plugin
How to Create a Custom WordPress PluginHow to Create a Custom WordPress Plugin
How to Create a Custom WordPress Plugin
 
WP7 HUB_Introducción a Visual Studio
WP7 HUB_Introducción a Visual StudioWP7 HUB_Introducción a Visual Studio
WP7 HUB_Introducción a Visual Studio
 
OpenWhisk by Example - Auto Retweeting Example in Python
OpenWhisk by Example - Auto Retweeting Example in PythonOpenWhisk by Example - Auto Retweeting Example in Python
OpenWhisk by Example - Auto Retweeting Example in Python
 
Wordpress as a framework
Wordpress as a frameworkWordpress as a framework
Wordpress as a framework
 
django
djangodjango
django
 
Introduction to Interactive Shiny Web Application
Introduction to Interactive Shiny Web ApplicationIntroduction to Interactive Shiny Web Application
Introduction to Interactive Shiny Web Application
 
Getting started-with-zend-framework
Getting started-with-zend-frameworkGetting started-with-zend-framework
Getting started-with-zend-framework
 
XCode Templates tutorial – How To Create Custom Template Step By Step.pdf
XCode Templates tutorial – How To Create Custom Template Step By Step.pdfXCode Templates tutorial – How To Create Custom Template Step By Step.pdf
XCode Templates tutorial – How To Create Custom Template Step By Step.pdf
 
3 Ways to Get Started with a React App in 2024.pdf
3 Ways to Get Started with a React App in 2024.pdf3 Ways to Get Started with a React App in 2024.pdf
3 Ways to Get Started with a React App in 2024.pdf
 
Basic iOS Training with SWIFT - Part 4
Basic iOS Training with SWIFT - Part 4Basic iOS Training with SWIFT - Part 4
Basic iOS Training with SWIFT - Part 4
 
[Patel] SPFx: An ISV Insight into latest Microsoft's customization model
[Patel] SPFx: An ISV Insight into latest Microsoft's customization model[Patel] SPFx: An ISV Insight into latest Microsoft's customization model
[Patel] SPFx: An ISV Insight into latest Microsoft's customization model
 
Create Your First Cocoa pods
Create Your First Cocoa podsCreate Your First Cocoa pods
Create Your First Cocoa pods
 
Introduction to package manager
Introduction to package managerIntroduction to package manager
Introduction to package manager
 
Appear IQ - Tutorials Backbone.js
Appear IQ - Tutorials Backbone.jsAppear IQ - Tutorials Backbone.js
Appear IQ - Tutorials Backbone.js
 
How to create a local Android open source project mirror in 6 easy steps
How to create a local Android open source project mirror in 6 easy stepsHow to create a local Android open source project mirror in 6 easy steps
How to create a local Android open source project mirror in 6 easy steps
 
Expanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate UsabilityExpanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate Usability
 
Azure DevOps Extensions
Azure DevOps ExtensionsAzure DevOps Extensions
Azure DevOps Extensions
 
How create react app help in creating a new react applications
How create react app help in creating a new react applications How create react app help in creating a new react applications
How create react app help in creating a new react applications
 
Open sap ui5 - week_2 unit_1_syjewa_exercises
Open sap ui5  - week_2 unit_1_syjewa_exercisesOpen sap ui5  - week_2 unit_1_syjewa_exercises
Open sap ui5 - week_2 unit_1_syjewa_exercises
 

Recently uploaded

Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxnada99848
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 

Recently uploaded (20)

Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptx
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 

Hacking the Explored App by Adding Custom Code (UI5con 2016)

  • 1. © nabisoft. All rights reserved. Proprietary and confidential. Hacking the Explored App by Adding Custom Code A smart way to share (Open|SAP) UI5 code snippets with others www.nabisoft.com Nabi Zamani, CEO & Software Engineer3/11/16
  • 5. www.nabisoft.com 5 What is the Explored App?  An app build with UI5  Looks like a Master-Detail app  It runs on mobile devices  #1 resource for Copy&Paste code snippets  Illustrates / contains  UI5 features  API usage  Controls in action  Best Practices  Tutorials  Downloadable Code  Available on GitHub If you don’t know it very well you might want to get familiar with it
  • 6. www.nabisoft.com 6 Where can I find the Explored App?  Latest versions:  OpenUI5: https://openui5.hana.ondemand.com/explored.html  OpenUI5 Beta: https://openui5beta.hana.ondemand.com/explored.html  SAPUI5: https://sapui5.hana.ondemand.com/explored.html  Specific versions, i.e.:  OpenUI5 1.34.8: https://openui5.hana.ondemand.com/1.34.8/explored.html  OpenUI5 Beta 1.36.4: https://openui5beta.hana.ondemand.com/1.36.4/explored.html  SAPUI5 1.34.8: https://sapui5.hana.ondemand.com/1.34.8/explored.html  GitHub: https://github.com/SAP/openui5/tree/master/src/sap.ui.demokit/src/sap/ui/demokit/explored  Hint – This is how to find the available versions:  OpenUI5: https://openui5.hana.ondemand.com/versionoverview.html  OpenUI5 Beta: https://openui5beta.hana.ondemand.com/versionoverview.html  SAPUI5: https://sapui5.hana.ondemand.com/versionoverview.html
  • 7. www.nabisoft.com 7 Getting to the Explored App is easy
  • 8. www.nabisoft.com 8 The Explored App looks like a Master-Detail app
  • 9. www.nabisoft.com 9 For every item in the master list you have one or more examples
  • 10. www.nabisoft.com 10 Each example can be executed directly in the browser incl. mobile browsers
  • 11. www.nabisoft.com 11 You can also check the source code before you download the whole example
  • 12. www.nabisoft.com 12 Most of the examples use XMLViews – the recommended ViewType
  • 13. www.nabisoft.com 13 Who could use the Explored App?  Developers  Copy & Paste  Code faster  Effort estimation  ...  UI/UX Designer  Getting familiar with Out-of-the-Box Look&Feel  Consider what‘s easily possible  Product Owners / Concepters  See what‘s possible  Effort estimation  Everybody  See how UI5 feels + looks like  „Corporate Design“  Framework Evaluation  Demonstration
  • 15. www.nabisoft.com 15 To get the code just clone OpenUI5 from GitHub  The Explored App is part of the Demo Kit  GitHub: https://github.com/SAP/openui5  Setup your dev environment: https://github.com/SAP/openui5/blob/master/docs/ developing.md  Finally open the  Testsuite: http://localhost:8080/testsuite/  Explored App: http://localhost:8080/testsuite/explored.html
  • 17. www.nabisoft.com 17 Disclaimer - What you will see from now on is subject to change  No public API published for „intrusion“ of own examples to the Explored App  But sometimes you have to break the rules  Let‘s break the rules and ask for forgiveness later 
  • 19. www.nabisoft.com 19  Categories are defined here  Only place you might want to change  Suggestion: do not change other parts of the Explored App itself
  • 21. www.nabisoft.com 21  Routing configuration is done in the Component  „Old“ Component  no manifest.json file aka app descriptor  Component loads the root view
  • 22. www.nabisoft.com 22  From the folder structure you can guess that the Explored App is an „old“ app  Views and Controllers are in the same folder  The root view app.view.js consists of a simple sap.m.SplitApp
  • 24. www.nabisoft.com 24 A few days/weeks ago the first sap.ui.table.TreeTable example was added
  • 25. www.nabisoft.com 25 Basic OData TreeBinding without $metadata annotations and nav. properties  We want to add a new TreeTable example now  Existing sap.ui.table.TreeTable examples can be found here:  /openui5/src/sap.ui.table/test/sap/ui/table/demokit/sample/TreeTable  Step 1: Changing the corresponding docuindex.json file:  This file is typically in a „demokit“ folder  /openui5/src/sap.ui.table/test/sap/ui/table/demokit/docuindex.json  The content of this file is used by the Explored App
  • 26. www.nabisoft.com 26 The SDK/Demokit knows how to find the docuindex.json file from the library‘s .library file
  • 27. www.nabisoft.com 27 First modify the entities in the docuindex.json file  Add new entries to the entities array if needed  In our case there is already entry for sap.ui.table.TreeTable  We just add a new entry to ist samples array  For more information check the docuindex.json file
  • 28. www.nabisoft.com 28 Then modify the samples in the same docuindex.json file  The id is the same entry you added to samples array on the previous slide  The name will be displayed in the Explored App  The description is also displayed
  • 29. www.nabisoft.com 29 Next we want to implement the Example itself  From the docuindex.json file we can find out where to put our examples  The namespace sap.ui.table.sample is mapped to /openui5/src/sap.ui.table/test/sap/ui/table/demokit/sample/  So our sap.ui.table.sample.TreeTable.BasicODataTreeBinding example must be in the folder /openui5/src/sap.ui.table/test/sap/ui/table/demokit/sample/TreeTable/BasicODataTreeBinding
  • 30. www.nabisoft.com 30 Implementing the example  Examples are component based  Our example consists of the following files:  metadata.xml: describes our Odata service  Nodes.json: this is the mock data for out Nodes EntitySet  mockserver.js: custom configuration of our mock server  Controller.controll.js: our only controller (just for the sake of it)  View.view.xml: Our only view, which is the root view  Component.js: here we call our mockserver and bind an OdataModel to the Component. This file is loaded by the Explored App.
  • 32. www.nabisoft.com 32  This mock data contains the hiarachy for the TreeTable  No Navigation Properties  No Annotations in the $metadata file  The data actually looks like a flat list
  • 35. www.nabisoft.com 35  Tell the TreeTable how to construct the Tree/Hierarchy  Feels like magic   For details check the API docs
  • 36. www.nabisoft.com 36  The component is called/used by the Explored App  It loads our view  Files to be included in the downloaded archive
  • 37. www.nabisoft.com 37 Our example is now in the Explored App
  • 38. www.nabisoft.com 38 We can try it out – just as easy as we are used to do it
  • 39. www.nabisoft.com 39 The can also have a look at the code
  • 40. www.nabisoft.com 40 An we can download the files that we listed in the Component.js file
  • 41. www.nabisoft.com 41 The downloaded archive even contains a generated index.html file
  • 42. www.nabisoft.com 42 Get the code of the TreeTable example we saw on the previous slides  TreeTable with Basic OData TreeBinding + additional OData TreeBinding example:  Change (own fork): https://github.com/nzamani/openui5/tree/ui5con2016-treetable-explored-samples  I will create a pull request for this
  • 43. www.nabisoft.com 43 Next Example: Tutorials inside the Explored App  Did you every think about displaying a PDF inside you UI5 app?  Let’s create a tutorial that has four steps:  Displaying PDF files via <embed>  Displaying PDF files via iFrame  Displaying PDF files via iFrame that loads HTML wrapper for object/embed  Displaying PDF files using pdf.js (https://mozilla.github.io/pdf.js/)  In all steps we will use sap.ui.core.HTML  Therefore we want the tutorial to be part of sap.ui.core  Let’s do it…
  • 44. www.nabisoft.com 44 This is what we want in the end
  • 45. www.nabisoft.com 45 Step 1: Press a Button to display a PDF via <embed>
  • 46. www.nabisoft.com 46 Step 1: Press a Button to display a PDF via <embed>
  • 47. www.nabisoft.com 47 Modify the entities in the docuindex.json file (no other changes in this file!)  Add a new tutorial entity to the docuindex.json file at /openui5/src/sap.ui.core/test/sap/ui/core/demokit/docuindex.json
  • 48. www.nabisoft.com 48 Create a new folder for the tutorial (i.e. by copying from existing tutorials)  Create folder: /openui5/src/sap.ui.core/test/sap/ui/core/demokit/tutorial/pdfviewer/  In this folder create the following index.html file (for convenience):
  • 49. www.nabisoft.com 49 Create a numbered folder 01 for the first step of the new tutorial  Your app code will be inside the webapp folder of each step  Each step has a Component.js file which is on the same level as the webapp folder  Let’s call this file the “Step Component”  Each step is a Component based app
  • 50. www.nabisoft.com 50  The Step Component defines  The starting point of the step  the files for download /openui5/src/sap.ui.core/test/sap/ui/core/demokit/tutorial/pdfviewer/01/Component.js
  • 51. www.nabisoft.com 51  Our index.html file loads our component based tutorial  This file will not change in later steps /openui5/src/sap.ui.core/test/sap/ui/core/demokit/tutorial/pdfviewer/01/webapp/index.html
  • 52. www.nabisoft.com 52  The Component.js is very simple  It will not change later /openui5/src/sap.ui.core/test/sap/ui/core/demokit/tutorial/pdfviewer/01/webapp/Component.js
  • 53. www.nabisoft.com 53  In the App Descriptor we configure the routing  It‘s as simple as the other published tutorials /openui5/src/sap.ui.core/test/sap/ui/core/demokit/tutorial/pdfviewer/01/webapp/manifest.json
  • 54. www.nabisoft.com 54 The rest of the magic “happens“ in one of our 4 PDF controllers (Step 1 + 2) /pdfviewer/01/webapp/controller/PdfEmbed.controller.js /pdfviewer/02/webapp/controller/PdfIframe.controller.js
  • 55. www.nabisoft.com 55 The rest of the magic “happens“ in one of our 4 PDF controllers (Step 3 + 4) /pdfviewer/03/webapp/controller/PdfIframeHtmlWrapper /pdfviewer/04/webapp/controller/PdfJs.controller.js
  • 56. www.nabisoft.com 56 What we have after Step 4
  • 57. www.nabisoft.com 57 Pdf.js was introduced in Step 4 and it works great even on mobile devices
  • 58. www.nabisoft.com 58 The tutorial step can also be accessed directly without the Explored App
  • 59. www.nabisoft.com 59 Get the code of the PDF Viewer tutorial we created on the previous slides  PDF Viewer Tutorial:  Change (own fork): https://github.com/nzamani/openui5/tree/ui5con2016-pdfviewer-explored-tutorial  Or browse my fork: https://github.com/nzamani/openui5
  • 60. www.nabisoft.com 60 Thank You  Check our UI5 tutorials: https://www.nabisoft.com/tutorials/sapui5/  Contact us: https://www.nabisoft.com/contact  Share your experience & create Pull Requests on GitHub 