SlideShare a Scribd company logo
1 of 20
Cross-Platform C++
for TV and Mobile Apps
1/26/2016
© 2016 Stephen Spann
demic apps LLC
Agenda
1. Mobile C++ Overview
2. Cross-Platform C++ Architecture with Djinni
3. Other C++ Tools for Android
4. Q&A
Image Credit: Toni Rodrigo
About Me
Background in web development, with iOS and Java experience 2007-2015
Began working with Cross-Platform C++ in July 2015
Mobile C++ Tutorials
mobilecpptutorials.com
Cross-Platform TV App: imperson8
imperson8.com
Mobile C++ Overview
What is C++?
Designed by Bjarne Stroustrup at Bell labs in 1983
Extension of the C Language (++ as in numerical increment)
Used in all sorts of applications from Robots to Gaming
Known for high performance
C++ Advantages
It’s been around a long time... yay!
Plenty of troubleshooting info on the Internet
Many open-source libraries available (OpenCV, Boost, etc)
Good for apps that have heavy use of databases, APIs, etc.
Great for new apps, cross-platform Prototypes and MVPs
Unit testing across all platforms
Utilize Native UI (better performance)
Works on TVs!
C++ Disadvantages
It’s been around a long time… boo!
Out-of-date information on the Internet
Multiple ways of accomplishing the same thing
Bad for apps that are primarily UI
Difficult to migrate existing apps
Steep learning curve
Large number of languages and tools involved
Hard sell to clients/stakeholders
Who’s Doing It?
https://mobilecpp.slack.com/
Cross-Platform C++
Architecture
Cross-Platform C++ Architecture
Java
C++
Objective-C
JNI Objective-C++
“Back end” Code
● SQLite Database Code
● API Calls
● Analytics
“Front end” Code
● User Interface
● Animations
● Device Features
Bridge Code
No one likes writing bridge code!
● Error-prone
● Hard to troubleshoot
● Little to no documentation, syntax hints, etc
The Secret Sauce: Dropbox’s Djinni
● Configured with IDL Files (Interface Definition Language)
● Generates all needed bridge code: JNI and Objective-C++
● Creates idiomatic interfaces for C++, Java, and Objective-C
hello_world = interface +c {
static create(): hello_world;
get_hello_world(): string;
}
Djinni in Action: C++
hello_world.hpp
helloworld.djinni
Generated by Djinni
Handwritten
C++ Interface
hello_world_impl.cpp
hello_world_impl.hpp
IDL File
C++ Implementation
hello_world = interface +c {
static create(): hello_world;
get_hello_world(): string;
}
Djinni in Action: Java
NativeHelloWorld.hpp
helloworld.djinni
Generated by Djinni
Handwritten
JNI Bridge
IDL File
Java Interface(?)
NativeHelloWorld.cpp
HelloWorld.java
MainActivity.java Java Implementation
Other Tools
C++ Tools for Android
GYP (Generate Your Projects)
● Android no longer supported
● Have to write both GYP and
Make files
CMake
● Ideal for making reusable libraries
Experimental Gradle Plugin
● Build/include libraries and source
files all in Gradle
Android NDK
● Android’s libc (Bionic) has
several bugs
● Missing parts of the Standard
Libary (ex: std::thread and
std::mutex)
NDK OptionsBuilding Libraries
CrystaX NDK
● More C++ Support
● Bug fixes
Boost C++ Libraries
http://www.boost.org/
● Peer-reviewed by the C++ Community
● Boost libraries are often incorporated into the
C++ Standard Library
Can be difficult to integrate into Android/iOS, some helpful links:
Build Script for OS X/iOS: https://gist.github.com/faithfracture
Precompiled for tvOS: https://github.com/danoli3/ofxtvOSBoost
Android 3rd-Party NDK: https://www.crystax.net/
CrystaX NDK
https://www.crystax.net/
● Drop-in replacement for Google’s Android NDK
● Includes Boost Libraries
● Built-in C++11 and C++14 Support
● Includes missing elements from the Android NDK
(ex: std::thread and std::mutex)
● Includes most recent Clang and GCC Compilers
● Fixes to bugs in Android libc (Bionic)
Where to go from here?
Djinni and MX3 repos with examples:
https://github.com/dropbox/djinni
https://github.com/libmx3/mx3
Mobile C++ Tutorials:
http://mobilecpptutorials.com
Mobile C++ Slack Channel:
https://mobilecpp.slack.com/
CPP Con:
http://cppcon.org/
Contact Me
Stephen Spann
*demic apps LLC
spann@demicapps.com
@spanndemic

More Related Content

What's hot

Mono + .NET Core = ❤️
Mono + .NET Core =  ❤️Mono + .NET Core =  ❤️
Mono + .NET Core = ❤️Egor Bogatov
 
Introduction to OpenCV 3.x (with Java)
Introduction to OpenCV 3.x (with Java)Introduction to OpenCV 3.x (with Java)
Introduction to OpenCV 3.x (with Java)Luigi De Russis
 
Async await in C++
Async await in C++Async await in C++
Async await in C++cppfrug
 
The Present and The Future of Functional Programming in C++
The Present and The Future of Functional Programming in C++The Present and The Future of Functional Programming in C++
The Present and The Future of Functional Programming in C++Alexander Granin
 
Introduction to OpenCV (with Java)
Introduction to OpenCV (with Java)Introduction to OpenCV (with Java)
Introduction to OpenCV (with Java)Luigi De Russis
 
Go Programming Language (Golang)
Go Programming Language (Golang)Go Programming Language (Golang)
Go Programming Language (Golang)Ishin Vin
 
C Under Linux
C Under LinuxC Under Linux
C Under Linuxmohan43u
 
Vladymyr Bahrii Understanding polymorphism in C++ 16.11.17
Vladymyr Bahrii Understanding polymorphism in C++ 16.11.17Vladymyr Bahrii Understanding polymorphism in C++ 16.11.17
Vladymyr Bahrii Understanding polymorphism in C++ 16.11.17LogeekNightUkraine
 
С++ without new and delete
С++ without new and deleteС++ without new and delete
С++ without new and deletePlatonov Sergey
 
Разработка кросс-платформенного кода между iPhone < -> Windows с помощью o...
Разработка кросс-платформенного кода между iPhone < -> Windows с помощью o...Разработка кросс-платформенного кода между iPhone < -> Windows с помощью o...
Разработка кросс-платформенного кода между iPhone < -> Windows с помощью o...Yandex
 
Not Your Fathers C - C Application Development In 2016
Not Your Fathers C - C Application Development In 2016Not Your Fathers C - C Application Development In 2016
Not Your Fathers C - C Application Development In 2016maiktoepfer
 
Jython: Integrating Python and Java
Jython: Integrating Python and JavaJython: Integrating Python and Java
Jython: Integrating Python and JavaCharles Anderson
 
Review: Apitrace and Vogl
Review: Apitrace and VoglReview: Apitrace and Vogl
Review: Apitrace and VoglGao Yunzhong
 
[COSCUP 2020] How to use llvm frontend library-libtooling
[COSCUP 2020] How to use llvm frontend library-libtooling[COSCUP 2020] How to use llvm frontend library-libtooling
[COSCUP 2020] How to use llvm frontend library-libtoolingDouglas Chen
 

What's hot (20)

C++ via C#
C++ via C#C++ via C#
C++ via C#
 
Mono + .NET Core = ❤️
Mono + .NET Core =  ❤️Mono + .NET Core =  ❤️
Mono + .NET Core = ❤️
 
Summary of C++17 features
Summary of C++17 featuresSummary of C++17 features
Summary of C++17 features
 
Introduction to OpenCV 3.x (with Java)
Introduction to OpenCV 3.x (with Java)Introduction to OpenCV 3.x (with Java)
Introduction to OpenCV 3.x (with Java)
 
Async await in C++
Async await in C++Async await in C++
Async await in C++
 
The Present and The Future of Functional Programming in C++
The Present and The Future of Functional Programming in C++The Present and The Future of Functional Programming in C++
The Present and The Future of Functional Programming in C++
 
Introduction to OpenCV (with Java)
Introduction to OpenCV (with Java)Introduction to OpenCV (with Java)
Introduction to OpenCV (with Java)
 
Go Programming Language (Golang)
Go Programming Language (Golang)Go Programming Language (Golang)
Go Programming Language (Golang)
 
C Under Linux
C Under LinuxC Under Linux
C Under Linux
 
Vladymyr Bahrii Understanding polymorphism in C++ 16.11.17
Vladymyr Bahrii Understanding polymorphism in C++ 16.11.17Vladymyr Bahrii Understanding polymorphism in C++ 16.11.17
Vladymyr Bahrii Understanding polymorphism in C++ 16.11.17
 
С++ without new and delete
С++ without new and deleteС++ without new and delete
С++ without new and delete
 
Android antipatterns
Android antipatternsAndroid antipatterns
Android antipatterns
 
Разработка кросс-платформенного кода между iPhone < -> Windows с помощью o...
Разработка кросс-платформенного кода между iPhone < -> Windows с помощью o...Разработка кросс-платформенного кода между iPhone < -> Windows с помощью o...
Разработка кросс-платформенного кода между iPhone < -> Windows с помощью o...
 
Not Your Fathers C - C Application Development In 2016
Not Your Fathers C - C Application Development In 2016Not Your Fathers C - C Application Development In 2016
Not Your Fathers C - C Application Development In 2016
 
GCC, GNU compiler collection
GCC, GNU compiler collectionGCC, GNU compiler collection
GCC, GNU compiler collection
 
Jython: Integrating Python and Java
Jython: Integrating Python and JavaJython: Integrating Python and Java
Jython: Integrating Python and Java
 
A Python Tutorial
A Python TutorialA Python Tutorial
A Python Tutorial
 
Review: Apitrace and Vogl
Review: Apitrace and VoglReview: Apitrace and Vogl
Review: Apitrace and Vogl
 
Go. Why it goes
Go. Why it goesGo. Why it goes
Go. Why it goes
 
[COSCUP 2020] How to use llvm frontend library-libtooling
[COSCUP 2020] How to use llvm frontend library-libtooling[COSCUP 2020] How to use llvm frontend library-libtooling
[COSCUP 2020] How to use llvm frontend library-libtooling
 

Viewers also liked

Sharing up to 80% code for iOS, Android, and Windows platforms, a Retail App ...
Sharing up to 80% code for iOS, Android, and Windows platforms, a Retail App ...Sharing up to 80% code for iOS, Android, and Windows platforms, a Retail App ...
Sharing up to 80% code for iOS, Android, and Windows platforms, a Retail App ...Xamarin
 
Cross Platform Mobile Development with Visual Studio 2015 and C++
Cross Platform Mobile Development with Visual Studio 2015 and C++Cross Platform Mobile Development with Visual Studio 2015 and C++
Cross Platform Mobile Development with Visual Studio 2015 and C++Richard Thomson
 
Mobile Cross-Platform Development in C++
Mobile Cross-Platform Development in C++Mobile Cross-Platform Development in C++
Mobile Cross-Platform Development in C++Ragi Burhum Espinoza
 
Life Sciences: Career Development in Europe and Asia
Life Sciences: Career Development in Europe and AsiaLife Sciences: Career Development in Europe and Asia
Life Sciences: Career Development in Europe and AsiaKelly Services
 
Introduction to Go language
Introduction to Go languageIntroduction to Go language
Introduction to Go languageTzar Umang
 
Learning Analytics - What Do Stakeholders Really Think?
Learning Analytics - What Do Stakeholders Really Think?Learning Analytics - What Do Stakeholders Really Think?
Learning Analytics - What Do Stakeholders Really Think?Neil Witt
 
Agile Methodologies and Cost Estimation
Agile Methodologies and Cost EstimationAgile Methodologies and Cost Estimation
Agile Methodologies and Cost Estimationshansa2014
 
Software engineer
Software engineerSoftware engineer
Software engineerxccoffey10
 
bti asia salary guide
bti asia salary guidebti asia salary guide
bti asia salary guideFebrian ‎
 
Southeast Indonesia: A guide for investors and developers in Lombok, Sumbawa,...
Southeast Indonesia: A guide for investors and developers in Lombok, Sumbawa,...Southeast Indonesia: A guide for investors and developers in Lombok, Sumbawa,...
Southeast Indonesia: A guide for investors and developers in Lombok, Sumbawa,...Travis Albee
 
GO Mobile presentation for English Language Centre at the University of Liver...
GO Mobile presentation for English Language Centre at the University of Liver...GO Mobile presentation for English Language Centre at the University of Liver...
GO Mobile presentation for English Language Centre at the University of Liver...Alex Spiers
 
Developing a technology enhanced learning strategy
Developing a technology enhanced learning strategyDeveloping a technology enhanced learning strategy
Developing a technology enhanced learning strategySarah Knight
 
Natural Resources: Career Development in Europe and Asia
Natural Resources: Career Development in Europe and AsiaNatural Resources: Career Development in Europe and Asia
Natural Resources: Career Development in Europe and AsiaKelly Services
 
Estimation or, "How to Dig your Grave"
Estimation or, "How to Dig your Grave"Estimation or, "How to Dig your Grave"
Estimation or, "How to Dig your Grave"Rowan Merewood
 
Open Minded? Software Engineer to a UX Engineer. Ask me how. by Micael Diaz d...
Open Minded? Software Engineer to a UX Engineer. Ask me how. by Micael Diaz d...Open Minded? Software Engineer to a UX Engineer. Ask me how. by Micael Diaz d...
Open Minded? Software Engineer to a UX Engineer. Ask me how. by Micael Diaz d...DEVCON
 
Project-Based Instruction and the Importance of Self-Directed Learning
Project-Based Instruction and the Importance of Self-Directed LearningProject-Based Instruction and the Importance of Self-Directed Learning
Project-Based Instruction and the Importance of Self-Directed LearningLinkedIn Learning Solutions
 
#CodingL1: Coding as a (second) mother language
#CodingL1: Coding as a (second) mother language#CodingL1: Coding as a (second) mother language
#CodingL1: Coding as a (second) mother languageAlessandro Bogliolo
 
Spark Streaming Tips for Devs and Ops by Fran perez y federico fernández
Spark Streaming Tips for Devs and Ops by Fran perez y federico fernándezSpark Streaming Tips for Devs and Ops by Fran perez y federico fernández
Spark Streaming Tips for Devs and Ops by Fran perez y federico fernándezJ On The Beach
 

Viewers also liked (20)

Sharing up to 80% code for iOS, Android, and Windows platforms, a Retail App ...
Sharing up to 80% code for iOS, Android, and Windows platforms, a Retail App ...Sharing up to 80% code for iOS, Android, and Windows platforms, a Retail App ...
Sharing up to 80% code for iOS, Android, and Windows platforms, a Retail App ...
 
Cross Platform Mobile Development with Visual Studio 2015 and C++
Cross Platform Mobile Development with Visual Studio 2015 and C++Cross Platform Mobile Development with Visual Studio 2015 and C++
Cross Platform Mobile Development with Visual Studio 2015 and C++
 
Mobile Cross-Platform Development in C++
Mobile Cross-Platform Development in C++Mobile Cross-Platform Development in C++
Mobile Cross-Platform Development in C++
 
Life Sciences: Career Development in Europe and Asia
Life Sciences: Career Development in Europe and AsiaLife Sciences: Career Development in Europe and Asia
Life Sciences: Career Development in Europe and Asia
 
Introduction to Go language
Introduction to Go languageIntroduction to Go language
Introduction to Go language
 
Agile cost estimation
Agile cost estimationAgile cost estimation
Agile cost estimation
 
Learning Analytics - What Do Stakeholders Really Think?
Learning Analytics - What Do Stakeholders Really Think?Learning Analytics - What Do Stakeholders Really Think?
Learning Analytics - What Do Stakeholders Really Think?
 
Agile Methodologies and Cost Estimation
Agile Methodologies and Cost EstimationAgile Methodologies and Cost Estimation
Agile Methodologies and Cost Estimation
 
Software engineer
Software engineerSoftware engineer
Software engineer
 
bti asia salary guide
bti asia salary guidebti asia salary guide
bti asia salary guide
 
Southeast Indonesia: A guide for investors and developers in Lombok, Sumbawa,...
Southeast Indonesia: A guide for investors and developers in Lombok, Sumbawa,...Southeast Indonesia: A guide for investors and developers in Lombok, Sumbawa,...
Southeast Indonesia: A guide for investors and developers in Lombok, Sumbawa,...
 
GO Mobile presentation for English Language Centre at the University of Liver...
GO Mobile presentation for English Language Centre at the University of Liver...GO Mobile presentation for English Language Centre at the University of Liver...
GO Mobile presentation for English Language Centre at the University of Liver...
 
Developing a technology enhanced learning strategy
Developing a technology enhanced learning strategyDeveloping a technology enhanced learning strategy
Developing a technology enhanced learning strategy
 
Natural Resources: Career Development in Europe and Asia
Natural Resources: Career Development in Europe and AsiaNatural Resources: Career Development in Europe and Asia
Natural Resources: Career Development in Europe and Asia
 
Estimation or, "How to Dig your Grave"
Estimation or, "How to Dig your Grave"Estimation or, "How to Dig your Grave"
Estimation or, "How to Dig your Grave"
 
Open Minded? Software Engineer to a UX Engineer. Ask me how. by Micael Diaz d...
Open Minded? Software Engineer to a UX Engineer. Ask me how. by Micael Diaz d...Open Minded? Software Engineer to a UX Engineer. Ask me how. by Micael Diaz d...
Open Minded? Software Engineer to a UX Engineer. Ask me how. by Micael Diaz d...
 
Project-Based Instruction and the Importance of Self-Directed Learning
Project-Based Instruction and the Importance of Self-Directed LearningProject-Based Instruction and the Importance of Self-Directed Learning
Project-Based Instruction and the Importance of Self-Directed Learning
 
#CodingL1: Coding as a (second) mother language
#CodingL1: Coding as a (second) mother language#CodingL1: Coding as a (second) mother language
#CodingL1: Coding as a (second) mother language
 
Spark Streaming Tips for Devs and Ops by Fran perez y federico fernández
Spark Streaming Tips for Devs and Ops by Fran perez y federico fernándezSpark Streaming Tips for Devs and Ops by Fran perez y federico fernández
Spark Streaming Tips for Devs and Ops by Fran perez y federico fernández
 
Code Drives the World
Code Drives the WorldCode Drives the World
Code Drives the World
 

Similar to Mobile C++

Lviv MD Day 2015 Ігор Кантор "Розробка додатків зі спільним C++ кодом для iOS...
Lviv MD Day 2015 Ігор Кантор "Розробка додатків зі спільним C++ кодом для iOS...Lviv MD Day 2015 Ігор Кантор "Розробка додатків зі спільним C++ кодом для iOS...
Lviv MD Day 2015 Ігор Кантор "Розробка додатків зі спільним C++ кодом для iOS...Lviv Startup Club
 
Mobile Development with Visual Studio by Sergey Seletsky
Mobile Development with Visual Studio by Sergey SeletskyMobile Development with Visual Studio by Sergey Seletsky
Mobile Development with Visual Studio by Sergey SeletskySoftServe
 
Mobile development with visual studio
Mobile development with visual studioMobile development with visual studio
Mobile development with visual studioSergey Seletsky
 
Presentation of programming languages for beginners
Presentation of programming languages for beginnersPresentation of programming languages for beginners
Presentation of programming languages for beginnersClement Levallois
 
Unit 1 of c++ part 1 basic introduction
Unit 1 of c++ part 1 basic introductionUnit 1 of c++ part 1 basic introduction
Unit 1 of c++ part 1 basic introductionAKR Education
 
Programming In Linux Presentation
Programming In Linux PresentationProgramming In Linux Presentation
Programming In Linux Presentationdanyal.khashabi
 
C++ TRAINING IN AMBALA CANTT! BATRA COMPUTER CENTER
C++ TRAINING IN AMBALA CANTT! BATRA COMPUTER CENTERC++ TRAINING IN AMBALA CANTT! BATRA COMPUTER CENTER
C++ TRAINING IN AMBALA CANTT! BATRA COMPUTER CENTERgroversimrans
 
CVformicrosoft
CVformicrosoftCVformicrosoft
CVformicrosoftmomofarm
 
Android | Xamarin | Mobile Application development
Android | Xamarin | Mobile Application developmentAndroid | Xamarin | Mobile Application development
Android | Xamarin | Mobile Application developmentKrishnaMildain
 
All good things scale - ohs 2020 - 03.13.2020
All good things scale - ohs 2020 - 03.13.2020All good things scale - ohs 2020 - 03.13.2020
All good things scale - ohs 2020 - 03.13.2020Amanda Wozniak
 
All You Need To Know About C Program Assignment Help.pdf
All You Need To Know About C Program Assignment Help.pdfAll You Need To Know About C Program Assignment Help.pdf
All You Need To Know About C Program Assignment Help.pdfBrad Smith
 
RAD Studio, Delphi and C++Builder 10 Feature Matrix
RAD Studio, Delphi and C++Builder 10 Feature MatrixRAD Studio, Delphi and C++Builder 10 Feature Matrix
RAD Studio, Delphi and C++Builder 10 Feature MatrixEmbarcadero Technologies
 
Introduction to C++
Introduction to C++Introduction to C++
Introduction to C++Manoj Kumar
 

Similar to Mobile C++ (20)

Programming in c plus plus2
Programming in c plus plus2Programming in c plus plus2
Programming in c plus plus2
 
Lviv MD Day 2015 Ігор Кантор "Розробка додатків зі спільним C++ кодом для iOS...
Lviv MD Day 2015 Ігор Кантор "Розробка додатків зі спільним C++ кодом для iOS...Lviv MD Day 2015 Ігор Кантор "Розробка додатків зі спільним C++ кодом для iOS...
Lviv MD Day 2015 Ігор Кантор "Розробка додатків зі спільним C++ кодом для iOS...
 
Mobile Development with Visual Studio by Sergey Seletsky
Mobile Development with Visual Studio by Sergey SeletskyMobile Development with Visual Studio by Sergey Seletsky
Mobile Development with Visual Studio by Sergey Seletsky
 
Alvaro Denis Resume
Alvaro Denis ResumeAlvaro Denis Resume
Alvaro Denis Resume
 
Mobile development with visual studio
Mobile development with visual studioMobile development with visual studio
Mobile development with visual studio
 
Session 1 - c++ intro
Session   1 - c++ introSession   1 - c++ intro
Session 1 - c++ intro
 
Presentation of programming languages for beginners
Presentation of programming languages for beginnersPresentation of programming languages for beginners
Presentation of programming languages for beginners
 
Unit 1 of c++ part 1 basic introduction
Unit 1 of c++ part 1 basic introductionUnit 1 of c++ part 1 basic introduction
Unit 1 of c++ part 1 basic introduction
 
C# rocks
C# rocksC# rocks
C# rocks
 
Programming In Linux Presentation
Programming In Linux PresentationProgramming In Linux Presentation
Programming In Linux Presentation
 
C++ TRAINING IN AMBALA CANTT! BATRA COMPUTER CENTER
C++ TRAINING IN AMBALA CANTT! BATRA COMPUTER CENTERC++ TRAINING IN AMBALA CANTT! BATRA COMPUTER CENTER
C++ TRAINING IN AMBALA CANTT! BATRA COMPUTER CENTER
 
CuongDang_CV
CuongDang_CVCuongDang_CV
CuongDang_CV
 
CVformicrosoft
CVformicrosoftCVformicrosoft
CVformicrosoft
 
C++ Kasirul Rashtawi Institute.pdf
C++ Kasirul Rashtawi Institute.pdfC++ Kasirul Rashtawi Institute.pdf
C++ Kasirul Rashtawi Institute.pdf
 
Android | Xamarin | Mobile Application development
Android | Xamarin | Mobile Application developmentAndroid | Xamarin | Mobile Application development
Android | Xamarin | Mobile Application development
 
All good things scale - ohs 2020 - 03.13.2020
All good things scale - ohs 2020 - 03.13.2020All good things scale - ohs 2020 - 03.13.2020
All good things scale - ohs 2020 - 03.13.2020
 
All You Need To Know About C Program Assignment Help.pdf
All You Need To Know About C Program Assignment Help.pdfAll You Need To Know About C Program Assignment Help.pdf
All You Need To Know About C Program Assignment Help.pdf
 
C++ in our world
C++ in our worldC++ in our world
C++ in our world
 
RAD Studio, Delphi and C++Builder 10 Feature Matrix
RAD Studio, Delphi and C++Builder 10 Feature MatrixRAD Studio, Delphi and C++Builder 10 Feature Matrix
RAD Studio, Delphi and C++Builder 10 Feature Matrix
 
Introduction to C++
Introduction to C++Introduction to C++
Introduction to C++
 

Recently uploaded

Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...kalichargn70th171
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfryanfarris8
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 

Recently uploaded (20)

Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 

Mobile C++

  • 1. Cross-Platform C++ for TV and Mobile Apps 1/26/2016 © 2016 Stephen Spann demic apps LLC
  • 2. Agenda 1. Mobile C++ Overview 2. Cross-Platform C++ Architecture with Djinni 3. Other C++ Tools for Android 4. Q&A Image Credit: Toni Rodrigo
  • 3. About Me Background in web development, with iOS and Java experience 2007-2015 Began working with Cross-Platform C++ in July 2015 Mobile C++ Tutorials mobilecpptutorials.com Cross-Platform TV App: imperson8 imperson8.com
  • 5. What is C++? Designed by Bjarne Stroustrup at Bell labs in 1983 Extension of the C Language (++ as in numerical increment) Used in all sorts of applications from Robots to Gaming Known for high performance
  • 6. C++ Advantages It’s been around a long time... yay! Plenty of troubleshooting info on the Internet Many open-source libraries available (OpenCV, Boost, etc) Good for apps that have heavy use of databases, APIs, etc. Great for new apps, cross-platform Prototypes and MVPs Unit testing across all platforms Utilize Native UI (better performance) Works on TVs!
  • 7. C++ Disadvantages It’s been around a long time… boo! Out-of-date information on the Internet Multiple ways of accomplishing the same thing Bad for apps that are primarily UI Difficult to migrate existing apps Steep learning curve Large number of languages and tools involved Hard sell to clients/stakeholders
  • 10. Cross-Platform C++ Architecture Java C++ Objective-C JNI Objective-C++ “Back end” Code ● SQLite Database Code ● API Calls ● Analytics “Front end” Code ● User Interface ● Animations ● Device Features Bridge Code
  • 11. No one likes writing bridge code! ● Error-prone ● Hard to troubleshoot ● Little to no documentation, syntax hints, etc
  • 12. The Secret Sauce: Dropbox’s Djinni ● Configured with IDL Files (Interface Definition Language) ● Generates all needed bridge code: JNI and Objective-C++ ● Creates idiomatic interfaces for C++, Java, and Objective-C
  • 13. hello_world = interface +c { static create(): hello_world; get_hello_world(): string; } Djinni in Action: C++ hello_world.hpp helloworld.djinni Generated by Djinni Handwritten C++ Interface hello_world_impl.cpp hello_world_impl.hpp IDL File C++ Implementation
  • 14. hello_world = interface +c { static create(): hello_world; get_hello_world(): string; } Djinni in Action: Java NativeHelloWorld.hpp helloworld.djinni Generated by Djinni Handwritten JNI Bridge IDL File Java Interface(?) NativeHelloWorld.cpp HelloWorld.java MainActivity.java Java Implementation
  • 16. C++ Tools for Android GYP (Generate Your Projects) ● Android no longer supported ● Have to write both GYP and Make files CMake ● Ideal for making reusable libraries Experimental Gradle Plugin ● Build/include libraries and source files all in Gradle Android NDK ● Android’s libc (Bionic) has several bugs ● Missing parts of the Standard Libary (ex: std::thread and std::mutex) NDK OptionsBuilding Libraries CrystaX NDK ● More C++ Support ● Bug fixes
  • 17. Boost C++ Libraries http://www.boost.org/ ● Peer-reviewed by the C++ Community ● Boost libraries are often incorporated into the C++ Standard Library Can be difficult to integrate into Android/iOS, some helpful links: Build Script for OS X/iOS: https://gist.github.com/faithfracture Precompiled for tvOS: https://github.com/danoli3/ofxtvOSBoost Android 3rd-Party NDK: https://www.crystax.net/
  • 18. CrystaX NDK https://www.crystax.net/ ● Drop-in replacement for Google’s Android NDK ● Includes Boost Libraries ● Built-in C++11 and C++14 Support ● Includes missing elements from the Android NDK (ex: std::thread and std::mutex) ● Includes most recent Clang and GCC Compilers ● Fixes to bugs in Android libc (Bionic)
  • 19. Where to go from here? Djinni and MX3 repos with examples: https://github.com/dropbox/djinni https://github.com/libmx3/mx3 Mobile C++ Tutorials: http://mobilecpptutorials.com Mobile C++ Slack Channel: https://mobilecpp.slack.com/ CPP Con: http://cppcon.org/
  • 20. Contact Me Stephen Spann *demic apps LLC spann@demicapps.com @spanndemic