SlideShare una empresa de Scribd logo
1 de 40
Native Application (C/C++)
development on BlackBerry 10
Aaron Ardiri
Principal Developer Evangelist
AARDIRI@rim.com
twitter: @ARDIRI
BlackBerry 10
SDKs

C++/Qt

Cascades

C/C++

HTML5 BlackBerry®

Native SDK

WebWorks™

ActionScript

Java

Adobe® AIR®

Android™
Runtime
Native SDK
OSS & Developer Experience
Native SDK
Hello World
#include <stdio.h>
#include <stdlib.h>
int
main(intargc, char **argv)
{
fprintf(stdout, “Hello World!n”);
return EXIT_SUCCESS;
}
Native SDK
BlackBerry Platform Services
the BlackBerry Platform Services (BPS) library provides an
application with a single consistent interface to a number
of different services during the execution of the application.
•
•
•
•
•

universal event management
user interaction/navigator
input/output (sensors, audio, LED, screen, multimedia)
device information, locale and payment services
network status and geo-location
Native SDK
BlackBerry Platform Services
bps_event_t *event_bps;
event_bps = NULL;
bps_get_event(&event_bps, timeout); // -1, forever
if (event_bps != NULL)
{
event_domain = bps_event_get_domain(event_bps);
if (event_domain == xxx)
{
// request event information within the domain
}
}
Native SDK
BlackBerry Platform Services
handling {service} events
{service}_request_events({param}); // request events

then capture the appropriate {service} events
event_domain = bps_event_get_domain(event_bps);
if (event_domain == {service}_get_domain())
{
// handle the {service} event
NATIVE SDK:
“HARDCORE” DEVELOPMENT
VI, BASH &SSH DEBUGGING
Native SDK
Open Industry Standards
Native SDK
Open Source Support
CASCADES SDK
Cascades SDK
OSS & Developer Experience
Mature C++ application framework
Good APIs
Signals and Slots
Many help classes

QML
QtGui Cascades
Qt
• Cross-platform application framework
• Design GUI, Command line, Daemon Applications
• More than a software development kit
• Extends C++ (Meta Object Compiler)
Cascades
• Replacement for Qt UI Creation Kit (Qt
Quick)
• Libraries to access device hardware
• Provides development tools (Cascades Builder)
Powerful toolkit with many components
• QtNetwork Module
• QtMedia Module
• QtCore
• C++ Extensions
QtQuick
• QtModeling Language (QML)
• JavaScript based declarative language
• Used in design of User Interface Applications
Qt Creator
• Aids in QML development
Replacement for QtQuick
• Cascades UI rendering is NOT on the main thread!
Features
• Provides BlackBerry Look and Feel
• Provides advanced placement management of
components
• Supports multiple resolutions
• Supports orientation changes (Landscape vs
Portrait)
Uses QML
• Replaces Qt Creator
• QNX Momentics IDE Plugin – Cascades Builder
CascadesSDK
Hello World
import bb.cascades 1.0
Page {
content: Label {
text: "Hello World"
}
}
Cascades SDK
Hello World
Page* root = new Page;
Label* label = Label::create()
.text("Hello World");
root->setContent(label);
Application::instance()->setScene(root);
60 FPS!
UI in separate thread

App logic
28

Cascades

Photos by rumpleteaser and whologwy Flickr
Scene Graph
Root
Container

Hello World

RotationZ
Scale
Opacity

Container
Text: “Hello World”
Scene Graph
Designing UI with QML
• QML User Interfaces built on Object-Tree Model
• Need a root node
Typical root nodes
• Anything that subclasses AbstractPane
• Page – individual screen within an application
• NavigationPane
• TabbedPane

Container – contains multiple UI objects
• Used for custom components
In QML

Container {
opacity: 0.5
scaleX: 1.5; scaleY: 1.5
rotationZ: 45
ImageView { … }
Label { … }
}
C++

Container *bubble= new Container();
bubble->setOpacity(0.5f);
bubble->setScale(1.5f);
bubble->setRotationZ(45);
bubble->add(ImageView::create() ... );
bubble->add(Label::create() ... );
…
Events
Qt uses signals&slots paradigm
Cascades events are mapped to Qt signals
Handling Touch Events in QML
Container
{
onTouch:
{
if (event.isDown()) {
scaleX = 2; scaleY= 2; rotationZ = 45;
}
else if (event.isUp()){
scaleX = 1; scaleY= 1; rotationZ = 0;
}
}
…
}
Handling Touch Events in C++

QObject::connect(bubble,SIGNAL
(touch(bb::cascades::TouchEvent*))
this,SLOT
(touched(bb::cascades::TouchEvent*))
);

touched(bb::cascades::TouchEvent *t)
{
if (t->isDown()) {
bubble->setScale(2f);
bubble->setRotation(45.0f);
}
else if (t->isUp()) {
bubble->setScale(1f);
bubble->setRotation(0.0f);
}
}
}
C++

QML

You can choose!
No difference between UI created in QML or C++

They can be combined
Typically, UI in QML and business logic in C++

QML supports JavaScript for signal handling
Animations

Any Cascades UI element can be animated

Animations are “running” on the engine thread
Remember the client server setup?

Explicit&Implicit animations:
translation, rotation, scale, opacity, …
Core Controls
Custom controls
Custom Controls
SpeedGauge
Container
DockLayout

RotationZ (-0)
TranslationY
(30)

RotationZ (-40)
TranslationY(3
0)
Standard List Items
Custom list items
Data Binding
SQL

XML

JSON

Anyth
ing
StackLayout&DockLayout
Pages, Panes and Navigation
CASCADES SDK:
“PLEASING” DEVELOPMENT
IDE, GUI, REAL-TIME UPDATES
For More Information…

developer.blackberry.com/cascades
Thanks!
Aaron Ardiri
AARDIRI@rim.com
twitter: @ARDIRI
Luca Filigheddu
LFILIGHEDDU@rim.com
twitter: @FILOS

Más contenido relacionado

La actualidad más candente

Dark slides broadcasting reveal
Dark slides   broadcasting revealDark slides   broadcasting reveal
Dark slides broadcasting reveal
Krishna Raman
 

La actualidad más candente (20)

Get started with Kubernetes on GKE
Get started with Kubernetes on GKEGet started with Kubernetes on GKE
Get started with Kubernetes on GKE
 
Gdsc muk - innocent
Gdsc   muk - innocentGdsc   muk - innocent
Gdsc muk - innocent
 
Kubernetes best practices.odf
Kubernetes best practices.odfKubernetes best practices.odf
Kubernetes best practices.odf
 
Introduction to Kubernetes with demo
Introduction to Kubernetes with demoIntroduction to Kubernetes with demo
Introduction to Kubernetes with demo
 
e-KTP Information Extraction with Google Cloud Function & Google Cloud Vision
e-KTP Information Extraction with Google Cloud Function & Google Cloud Visione-KTP Information Extraction with Google Cloud Function & Google Cloud Vision
e-KTP Information Extraction with Google Cloud Function & Google Cloud Vision
 
High Performance Cloud-Native Microservices With Distributed Caching
High Performance Cloud-Native Microservices With Distributed CachingHigh Performance Cloud-Native Microservices With Distributed Caching
High Performance Cloud-Native Microservices With Distributed Caching
 
Developing Serverless Applications on Kubernetes with Knative - OSCON 2019
Developing Serverless Applications on Kubernetes with Knative - OSCON 2019Developing Serverless Applications on Kubernetes with Knative - OSCON 2019
Developing Serverless Applications on Kubernetes with Knative - OSCON 2019
 
Dark slides broadcasting reveal
Dark slides   broadcasting revealDark slides   broadcasting reveal
Dark slides broadcasting reveal
 
Implementing an Automated Staging Environment
Implementing an Automated Staging EnvironmentImplementing an Automated Staging Environment
Implementing an Automated Staging Environment
 
Exploring Google (Cloud) APIs & Cloud Computing overview
Exploring Google (Cloud) APIs & Cloud Computing overviewExploring Google (Cloud) APIs & Cloud Computing overview
Exploring Google (Cloud) APIs & Cloud Computing overview
 
Introducing the Geomajas Open Source framework for building spatial web appli...
Introducing the Geomajas Open Source framework for building spatial web appli...Introducing the Geomajas Open Source framework for building spatial web appli...
Introducing the Geomajas Open Source framework for building spatial web appli...
 
What is Google Cloud Platform - GDG DevFest 18 Depok
What is Google Cloud Platform - GDG DevFest 18 DepokWhat is Google Cloud Platform - GDG DevFest 18 Depok
What is Google Cloud Platform - GDG DevFest 18 Depok
 
Keynote #Tech - Google : aperçu de la gestion des services distribués chez Go...
Keynote #Tech - Google : aperçu de la gestion des services distribués chez Go...Keynote #Tech - Google : aperçu de la gestion des services distribués chez Go...
Keynote #Tech - Google : aperçu de la gestion des services distribués chez Go...
 
Google Cloud Platform and Kubernetes
Google Cloud Platform and KubernetesGoogle Cloud Platform and Kubernetes
Google Cloud Platform and Kubernetes
 
Building production-quality apps with Node.js
Building production-quality apps with Node.jsBuilding production-quality apps with Node.js
Building production-quality apps with Node.js
 
Take the Fastest Path to Node.Js Application Development with Bitnami & AWS L...
Take the Fastest Path to Node.Js Application Development with Bitnami & AWS L...Take the Fastest Path to Node.Js Application Development with Bitnami & AWS L...
Take the Fastest Path to Node.Js Application Development with Bitnami & AWS L...
 
Wso2 con 2014-asia - Rapidly Building Enterprise Apps, APIs, and Services wit...
Wso2 con 2014-asia - Rapidly Building Enterprise Apps, APIs, and Services wit...Wso2 con 2014-asia - Rapidly Building Enterprise Apps, APIs, and Services wit...
Wso2 con 2014-asia - Rapidly Building Enterprise Apps, APIs, and Services wit...
 
What you have to know about Certified Kubernetes Administrator (CKA)
What you have to know about Certified Kubernetes Administrator (CKA)What you have to know about Certified Kubernetes Administrator (CKA)
What you have to know about Certified Kubernetes Administrator (CKA)
 
Kubecon seattle 2018 recap - Application Deployment aspects
Kubecon seattle 2018 recap - Application Deployment aspectsKubecon seattle 2018 recap - Application Deployment aspects
Kubecon seattle 2018 recap - Application Deployment aspects
 
16. Cncf meetup-docker
16. Cncf meetup-docker16. Cncf meetup-docker
16. Cncf meetup-docker
 

Similar a Native Application (C/C++) on BlackBerry 10

Native client
Native clientNative client
Native client
zyc901016
 
Developer Experience Cloud Native - From Code Gen to Git Commit without a CI/...
Developer Experience Cloud Native - From Code Gen to Git Commit without a CI/...Developer Experience Cloud Native - From Code Gen to Git Commit without a CI/...
Developer Experience Cloud Native - From Code Gen to Git Commit without a CI/...
Michael Hofmann
 
Android Introduction
Android IntroductionAndroid Introduction
Android Introduction
aswapnal
 
RIM Casual Meetup - Bandung #DevIDBdg
RIM Casual Meetup - Bandung #DevIDBdgRIM Casual Meetup - Bandung #DevIDBdg
RIM Casual Meetup - Bandung #DevIDBdg
Ziyad Bazed
 

Similar a Native Application (C/C++) on BlackBerry 10 (20)

Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu
 Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu
Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu
 
Demystifying Native, Web, and Hybrid Mobile Development on BlackBerry 10 wit...
 Demystifying Native, Web, and Hybrid Mobile Development on BlackBerry 10 wit... Demystifying Native, Web, and Hybrid Mobile Development on BlackBerry 10 wit...
Demystifying Native, Web, and Hybrid Mobile Development on BlackBerry 10 wit...
 
QNX, C/C++, Qt, Cascades, HTML5… So what’s now BlackBerry 10 application deve...
QNX, C/C++, Qt, Cascades, HTML5… So what’s now BlackBerry 10 application deve...QNX, C/C++, Qt, Cascades, HTML5… So what’s now BlackBerry 10 application deve...
QNX, C/C++, Qt, Cascades, HTML5… So what’s now BlackBerry 10 application deve...
 
Luca Filigheddu - Sviluppiamo in Cascades per Blackberry 10
Luca Filigheddu - Sviluppiamo in Cascades per Blackberry 10Luca Filigheddu - Sviluppiamo in Cascades per Blackberry 10
Luca Filigheddu - Sviluppiamo in Cascades per Blackberry 10
 
Develop For BlackBerry10
Develop For BlackBerry10 Develop For BlackBerry10
Develop For BlackBerry10
 
NativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
NativeScript: Cross-Platform Mobile Apps with JavaScript and AngularNativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
NativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
 
Native client
Native clientNative client
Native client
 
Developer Experience Cloud Native - From Code Gen to Git Commit without a CI/...
Developer Experience Cloud Native - From Code Gen to Git Commit without a CI/...Developer Experience Cloud Native - From Code Gen to Git Commit without a CI/...
Developer Experience Cloud Native - From Code Gen to Git Commit without a CI/...
 
Ionic Framework - get up and running to build hybrid mobile apps
Ionic Framework - get up and running to build hybrid mobile appsIonic Framework - get up and running to build hybrid mobile apps
Ionic Framework - get up and running to build hybrid mobile apps
 
Android Introduction
Android IntroductionAndroid Introduction
Android Introduction
 
Sviluppare per una piattaforma mobile aperta: opportunità e sfide
Sviluppare per una piattaforma mobile aperta: opportunità e sfideSviluppare per una piattaforma mobile aperta: opportunità e sfide
Sviluppare per una piattaforma mobile aperta: opportunità e sfide
 
Red Hat and kubernetes: awesome stuff coming your way
Red Hat and kubernetes:  awesome stuff coming your wayRed Hat and kubernetes:  awesome stuff coming your way
Red Hat and kubernetes: awesome stuff coming your way
 
From React to React Native - Things I wish I knew when I started
From React to React Native - Things I wish I knew when I startedFrom React to React Native - Things I wish I knew when I started
From React to React Native - Things I wish I knew when I started
 
Comment développer une application mobile en 8 semaines - Meetup PAUG 24-01-2023
Comment développer une application mobile en 8 semaines - Meetup PAUG 24-01-2023Comment développer une application mobile en 8 semaines - Meetup PAUG 24-01-2023
Comment développer une application mobile en 8 semaines - Meetup PAUG 24-01-2023
 
Cross Platform Mobile Development using Flutter by Wei Meng Lee at Mobile foc...
Cross Platform Mobile Development using Flutter by Wei Meng Lee at Mobile foc...Cross Platform Mobile Development using Flutter by Wei Meng Lee at Mobile foc...
Cross Platform Mobile Development using Flutter by Wei Meng Lee at Mobile foc...
 
Flutter
FlutterFlutter
Flutter
 
RIM Casual Meetup - Bandung #DevIDBdg
RIM Casual Meetup - Bandung #DevIDBdgRIM Casual Meetup - Bandung #DevIDBdg
RIM Casual Meetup - Bandung #DevIDBdg
 
Containers as a Service with Docker
Containers as a Service with DockerContainers as a Service with Docker
Containers as a Service with Docker
 
Docker Container As A Service - March 2016
Docker Container As A Service - March 2016Docker Container As A Service - March 2016
Docker Container As A Service - March 2016
 
Getting Started with Docker
Getting Started with DockerGetting Started with Docker
Getting Started with Docker
 

Más de ardiri

Start to Finish: Porting to BlackBerry 10
Start to Finish: Porting to BlackBerry 10Start to Finish: Porting to BlackBerry 10
Start to Finish: Porting to BlackBerry 10
ardiri
 
Introduction to BlackBerry 10 NDK for Game Developers.
Introduction to BlackBerry 10 NDK for Game Developers.Introduction to BlackBerry 10 NDK for Game Developers.
Introduction to BlackBerry 10 NDK for Game Developers.
ardiri
 

Más de ardiri (8)

20180517 Oraclecode Shenzhen Keynote
20180517 Oraclecode Shenzhen Keynote20180517 Oraclecode Shenzhen Keynote
20180517 Oraclecode Shenzhen Keynote
 
20180517 OracleCode Singapore Keynote
20180517 OracleCode Singapore Keynote20180517 OracleCode Singapore Keynote
20180517 OracleCode Singapore Keynote
 
Feasibility of Security in Micro-Controllers
Feasibility of Security in Micro-ControllersFeasibility of Security in Micro-Controllers
Feasibility of Security in Micro-Controllers
 
Introduction to the Internet of Things
Introduction to the Internet of ThingsIntroduction to the Internet of Things
Introduction to the Internet of Things
 
Start to Finish: Porting to BlackBerry 10
Start to Finish: Porting to BlackBerry 10Start to Finish: Porting to BlackBerry 10
Start to Finish: Porting to BlackBerry 10
 
Introduction to BlackBerry 10 NDK for Game Developers.
Introduction to BlackBerry 10 NDK for Game Developers.Introduction to BlackBerry 10 NDK for Game Developers.
Introduction to BlackBerry 10 NDK for Game Developers.
 
iPhone Introduction
iPhone IntroductioniPhone Introduction
iPhone Introduction
 
Game Development using SDL and the PDK
Game Development using SDL and the PDK Game Development using SDL and the PDK
Game Development using SDL and the PDK
 

Último

Último (20)

How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptxBT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
Your enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jYour enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4j
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 

Native Application (C/C++) on BlackBerry 10

Notas del editor

  1. SWITCH TO KAMEL LAPTOP/PRESENTATION – 25-30mins
  2. Martin will talk more about custom controls in