SlideShare a Scribd company logo
1
Demystifying Native, Web,
and Hybrid Mobile
Development on
BlackBerry 10
Manny Elawar and Edgar Parada
BlackBerry Developer Evangelists
@manny_elawar @edgarparada
Agenda
• What is BlackBerry 10?
• Demo
• HTML5 and WebWorks
• Native Development and Cascades
• Hybrid Development
• Q & A
What Is BlackBerry 10?
• Completely new
– Not a revision or upgrade of BlackBerry 7
• Secure
• Designed as a mobile computing
platform
– Not just another mobile phone OS
• Designed for people on the
move; people that want to get
something done
– Not just consume content on the couch
http://developer.blackberry.com
Where Did BlackBerry 10 Come From?
BlackBerry®
PlayBook™
HTML5
WebWorks
BlackBerry 10TM
http://developer.blackberry.com
Demo
• Will show the UX &
Flow. Specifically, one-
hand use, the amazing
keyboard, HUB, and
insane multitasking
designed to get stuff
done.
http://developer.blackberry.com
High Level Architecture
BlackBerry Services
(BES / Mobile Fusion, BIS, Push, Maps, Payments, BBM, Scoreloop, etc.)
HTML 5 &
WebWorks
Native C/C++ &
Cascades UI
BlackBerry 10 OS
http://developer.blackberry.com
Easy to Develop Apps
C/C++
Native SDK
C++/Qt
Cascades
HTML5
BlackBerry®
WebWorks™
“One F***ing Day”
Michael Shchade
CEO Fishlabs
http://developer.blackberry.com
BlackBerry
Runtime for
Android Apps
Adobe AIR
Developer Options
http://developer.blackberry.com
C/C++
Native SDK
C++/Qt
Cascades
HTML5
BlackBerry®
WebWorks™
BlackBerry
Runtime for
Android Apps
Adobe AIR
HTML5 an Open Web Platform
Kudos from developers
Where are we today?
Introducing BlackBerry WebWorks
Here are some fellows
How to get there?
Hello World
<script src="webworks.js" type="text/javascript"></script>
<script>
document.addEventListener("webworksready", function(e) {
document.getElementById('someInput').value = "Hello
World";
}, false);
</script>
Something more complex: Sensors
window.addEventListener("devicemotion", function(event)
{
var x = event.accelerationIncludingGravity.x;
var y = event.accelerationIncludingGravity.y;
var z = event.accelerationIncludingGravity.z;
}, true);
Geolocation, info from the GPS
function onSuccess(position) {
console.log("lat = " + pos.coords.latitude);
console.log("lon = " + pos.coords.longitude);
}
navigator.geolocation.getCurrentPosition(onSuccess, onError);
Some inspiration: WebGL
http://www.gooengine.com
Why Use WebWorks & HTML5?
• HTML5 Momentum
– Support everywhere
– Lot of options (frameworks,
libraries, tooling…)
– W3C & Cordova Alignment
• Great Native Integration
– Same performance & features
as Browser
– Access different APIs: Invoke,
BBM, PIM, Advertising,
Storage, and many more!
http://developer.blackberry.com
Developer Options
http://developer.blackberry.com
C/C++
Native SDK
C++/Qt
Cascades
HTML5
BlackBerry®
WebWorks™
BlackBerry
Runtime for
Android Apps
Adobe AIR
Cascades in the native SDK
Native C/C++
gameplay
http://developer.blackberry.com
Cascades, A Native UI Framework
• Cascades & Qt, a great match!
• Mature C++ application
framework
• Great APIs
• Signals and Slots
• Many helper classes
• QML
http://developer.blackberry.com
Typical Cascades App
http://developer.blackberry.com
JavaScript
based UI logic
QML based UI
structure
QT/C++
Backend
Any Mix Is Possible
http://developer.blackberry.com
JavaScript
based UI logic
QML based
UI structure
QT/C++
Backend
Hello world
import bb.cascades 1.0
Page {
Label {
text: "Hello World"
}
}
Same thing in C++
Page* root = new Page;
Label* label = Label::create()
.text("Hello World");
root->setContent(label);
Application::instance()->setScene(root);
C++ QML
http://developer.blackberry.com
31
60 fps!
Client server architecture
Client Server
Tell the server what to render
Get events back
Animations
• Translate, rotate, scale, fade
• Implicit animations
• Explicit animations
• Duration, start/end, easing curve
• Grouped animations
33
Grouped Animation
SequentialAnimation {
id: “turner”
repeatCount: AnimationRepeatCount.Forever
animations : [
RotateTransition {
fromAngleZ: 0;
toAngleZ: 90;
duration: 1000;
},
RotateTransition {
fromAngleZ: 90;
toAngleZ: 0;
duration: 1000;
}
]
}
0 ms 1000 ms 2000 ms
Easing Curves
ParallelAnimation {
id: bouncer
animations : [
TranslateTransition {
fromY: 0;
toY: 800;
duration: 2000;
easingCurve: StockCurve.DoubleBounceOut;
},
TranslateTransition {
fromX: 0;
toX: 500;
duration: 1000;
easingCurve: StockCurve.QuarticOut;
}
]
}
Demo Events
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;
}
}
}
}
QObject::connect(bubble,SIGNAL
(touch(bb::cascades::TouchEvent*))
this,SLOT
(touched(bb::cascades::TouchEvent*))
);
Handling Touch Events in C++
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);
}
}
}
UI Adaptability - Multiple Form Factors
How to create an adaptable UI?
• Built in controls adapt to device type
• Layouts, space quota, 9-sliced images, …
• Unique (sub)set of assets per
configuration
Asset selectors
Based on resolution and/or visual style
assets/
main_screen.qml
dialog.qml
picture.png
icon.png
720x720/
main_screen.qml
picture.png
Asset selectors
Based on resolution and/or visual style
assets/
main_screen.qml
dialog.qml
picture.png
icon.png
720x720/
main_screen.qml
picture.png
Asset selectors
Based on resolution and/or visual style
assets/
main_screen.qml
dialog.qml
picture.png
icon.png
720x720/
main_screen.qml
picture.png
Why Use Cascades?
• Elegant UI Framework
– Great looking core UI
components
– Easy to build custom
components
– Dedicated UI tooling including
real-time design preview and
Photoshop plugin
• Increased Productivity
– Higher level APIs
– QT flavored C++ and declarative UI
http://developer.blackberry.com
Demo
• USA Today vs New York Times
– Can you tell which is HTML5 and which is
Cascades?
Developer Options
http://developer.blackberry.com
C/C++
Native SDK
C++/Qt
Cascades
BlackBerry
Runtime for
Android Apps
Adobe AIR
HTML5
BlackBerry®
WebWorks™

Developer Options
http://developer.blackberry.com
C/C++
Native SDK
C++/Qt
Cascades
BlackBerry
Runtime for
Android Apps
Adobe AIR
HTML5
BlackBerry®
WebWorks™
  
Love is in the AIR
• Open Source SDK
• Cross platform (Mobile & Desk)
• 3.5 millions of devs
• 70% of online games built on Flash
• Different tools & frameworks
Adobe AIR
 Free and open source SDK
 Cross platfom for desktop, mobi
 3.5 million developers
 ~70% online games built with Fl
 Lot of frameworks and tools
AIR for BlackBerry 10 SDK
• FileSystem Access
• API Sensors
• SQL lite
• Fuse QNX Components
• Invocation Framework
• Push, Cards, Payment, etc.
• Adobe Native Extensions ANEs
Fuse QNX Components
Adobe AIR on BlackBerry 10
Hello World
import flash.display.Sprite;
import qnx.fuse.ui.text.Label;
public class BlackBerryIOAS3 extends Sprite
{
public function BlackBerryIOAS3(){initUI();}
private function initUI():void {
var myLabel:Label = new Label();
myLabel.text = "BlackBerryIO";
addChild(myLabel);
}
}
Local File System
var appBundle:File =
File.applicationDirectory.resolvePath("myFile.txt");
var shared:File =
File.applicationStorageDirectory.resolvePath("writeable
File.txt");
Invoke Framework
var request:InvokeRequest = new InvokeRequest();
request.target = "com.example.image.view";
request.action = InvokeAction.OPEN;
request.mimeType = "image/png";
request.uri = "file:///path/to/image.png";
InvokeManager.invokeManager.invoke(request);
Some inspiration
Why Use AIR?
• AIR Community
– Lot of Learning Resources
– Fast for create games
– Different Frameworks,
Engines & Libraries
• Empowering UX
– First Class Citizen for BB10
– Great Designer-Developer
Workflows
– Creative UI to the limit
http://developer.blackberry.com
BlackBerry Runtime for Android Apps
• Based on Open Source Android, v2.3.3 aka “Gingerbread”
• Repackage Android apps, sign, and submitted to BlackBerry World
• Majority of apps convert with no changes to source (~65%)
• Some limitations for first release
• No: Native, Google APIs
• Eclipse plugin & SDK w/simulator
• Android-based apps appear like all other apps in BlackBerry World (AIR,
WebWorks, etc.). To the consumer, “An app, is an app”
http://developer.blackberry.com
.apk in .bar
out
thank you!
Manny Elawar, Edgar Parada
BlackBerry Developer Evangelists
@manny_elawar @edgarparada

More Related Content

PPTX
Sviluppare per una piattaforma mobile aperta: opportunità e sfide
PDF
Sg conference multiplatform_apps_adam_stanley
PDF
QNX, C/C++, Qt, Cascades, HTML5… So what’s now BlackBerry 10 application deve...
PDF
Cordova 3, apps para android
PDF
RIM Casual Meetup - Bandung #DevIDBdg
PPT
Training on webwroks1
PDF
Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu
PPTX
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Sviluppare per una piattaforma mobile aperta: opportunità e sfide
Sg conference multiplatform_apps_adam_stanley
QNX, C/C++, Qt, Cascades, HTML5… So what’s now BlackBerry 10 application deve...
Cordova 3, apps para android
RIM Casual Meetup - Bandung #DevIDBdg
Training on webwroks1
Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)

What's hot (20)

PDF
Mobile Vue.js – From PWA to Native
PDF
Apache Cordova
KEY
Phonegap/Cordova vs Native Application
PDF
Apache cordova
PDF
Cordova + Ionic + MobileFirst
PDF
Cordova: APIs and instruments
PDF
Cross-platform development frameworks
PDF
WebWorks Development for BlackBerry PlayBook and Smartphones
PPTX
Introduction to Apache Cordova (Phonegap)
PPTX
An overview of mobile html + java script frameworks
PPTX
Visual Studio 2015: novità per gli sviluppatori iOS, Android e Cross-Platform
PDF
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGap
PDF
Web works presso
PPTX
Html5 features: location, history and offline apps
PDF
Apps with Apache Cordova and Phonegap
PDF
Cross-platform mobile apps with Apache Cordova
ODP
Apache Cordova, Hybrid Application Development
PPTX
Cross-Platform Development
PDF
Optimizing HTML5 Sites with CQ5/WEM
PDF
BlackBerry Developer Overview
Mobile Vue.js – From PWA to Native
Apache Cordova
Phonegap/Cordova vs Native Application
Apache cordova
Cordova + Ionic + MobileFirst
Cordova: APIs and instruments
Cross-platform development frameworks
WebWorks Development for BlackBerry PlayBook and Smartphones
Introduction to Apache Cordova (Phonegap)
An overview of mobile html + java script frameworks
Visual Studio 2015: novità per gli sviluppatori iOS, Android e Cross-Platform
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGap
Web works presso
Html5 features: location, history and offline apps
Apps with Apache Cordova and Phonegap
Cross-platform mobile apps with Apache Cordova
Apache Cordova, Hybrid Application Development
Cross-Platform Development
Optimizing HTML5 Sites with CQ5/WEM
BlackBerry Developer Overview
Ad

Similar to Demystifying Native, Web, and Hybrid Mobile Development on BlackBerry 10 with Manny Elawar, Edgar Parada (20)

PDF
Develop For BlackBerry10
PPTX
Native Application (C/C++) on BlackBerry 10
PPT
An Overview of Blackberry 10
PDF
BEF2013 - Toronto - Dev Track 2 - Migrating Apps to BlackBerry 10
PPT
Develop with love bb10
PDF
An Overview of Blackberry 10 & Blackberry App Development
PPTX
The Blackberry Opportunity (RIM) 160612
PPT
BB10 Leading Mobile Web Platform W3C 2013
PDF
PDF
Luca Filigheddu - Sviluppiamo in Cascades per Blackberry 10
PDF
Getting Started with BB Development..
PDF
"BlackBerry Webworks : Apps for The Smartphone and Tablet"
PPT
HTML5 App Dev on BlackBerry 10
PPT
Mobile App Dev Android, HTML5, Enterprise and More
PPTX
02 BlackBerry Application Development
PPTX
BlackBerry WebWorks
PPTX
HTML5 WebWorks
PDF
Droid con berlin_the_bb10_android_runtime
PDF
Platform update and super apps ON BB App World
PDF
Blackberry presentaition
Develop For BlackBerry10
Native Application (C/C++) on BlackBerry 10
An Overview of Blackberry 10
BEF2013 - Toronto - Dev Track 2 - Migrating Apps to BlackBerry 10
Develop with love bb10
An Overview of Blackberry 10 & Blackberry App Development
The Blackberry Opportunity (RIM) 160612
BB10 Leading Mobile Web Platform W3C 2013
Luca Filigheddu - Sviluppiamo in Cascades per Blackberry 10
Getting Started with BB Development..
"BlackBerry Webworks : Apps for The Smartphone and Tablet"
HTML5 App Dev on BlackBerry 10
Mobile App Dev Android, HTML5, Enterprise and More
02 BlackBerry Application Development
BlackBerry WebWorks
HTML5 WebWorks
Droid con berlin_the_bb10_android_runtime
Platform update and super apps ON BB App World
Blackberry presentaition
Ad

More from FITC (20)

PPTX
Cut it up
PDF
Designing for Digital Health
PDF
Profiling JavaScript Performance
PPTX
Surviving Your Tech Stack
PDF
How to Pitch Your First AR Project
PDF
Start by Understanding the Problem, Not by Delivering the Answer
PDF
Cocaine to Carrots: The Art of Telling Someone Else’s Story
PDF
Everyday Innovation
PDF
HyperLight Websites
PDF
Everything is Terrifying
PDF
Post-Earth Visions: Designing for Space and the Future Human
PDF
The Rise of the Creative Social Influencer (and How to Become One)
PDF
East of the Rockies: Developing an AR Game
PDF
Creating a Proactive Healthcare System
PDF
World Transformation: The Secret Agenda of Product Design
PDF
The Power of Now
PDF
High Performance PWAs
PDF
Rise of the JAMstack
PDF
From Closed to Open: A Journey of Self Discovery
PDF
Projects Ain’t Nobody Got Time For
Cut it up
Designing for Digital Health
Profiling JavaScript Performance
Surviving Your Tech Stack
How to Pitch Your First AR Project
Start by Understanding the Problem, Not by Delivering the Answer
Cocaine to Carrots: The Art of Telling Someone Else’s Story
Everyday Innovation
HyperLight Websites
Everything is Terrifying
Post-Earth Visions: Designing for Space and the Future Human
The Rise of the Creative Social Influencer (and How to Become One)
East of the Rockies: Developing an AR Game
Creating a Proactive Healthcare System
World Transformation: The Secret Agenda of Product Design
The Power of Now
High Performance PWAs
Rise of the JAMstack
From Closed to Open: A Journey of Self Discovery
Projects Ain’t Nobody Got Time For

Recently uploaded (20)

PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Cloud computing and distributed systems.
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PPT
Teaching material agriculture food technology
PDF
Encapsulation_ Review paper, used for researhc scholars
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Per capita expenditure prediction using model stacking based on satellite ima...
Building Integrated photovoltaic BIPV_UPV.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Empathic Computing: Creating Shared Understanding
Diabetes mellitus diagnosis method based random forest with bat algorithm
Advanced methodologies resolving dimensionality complications for autism neur...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Cloud computing and distributed systems.
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Digital-Transformation-Roadmap-for-Companies.pptx
Network Security Unit 5.pdf for BCA BBA.
Teaching material agriculture food technology
Encapsulation_ Review paper, used for researhc scholars
The AUB Centre for AI in Media Proposal.docx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Understanding_Digital_Forensics_Presentation.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows

Demystifying Native, Web, and Hybrid Mobile Development on BlackBerry 10 with Manny Elawar, Edgar Parada

Editor's Notes

  • #5: TAT was acquired by RIM the winter of 2010 Creating a new platform is very difficult task
  • #16: A Page defines an individual screen within an application. Set the content of the page to a Label. Set the text property of a Label to “Hello World”
  • #17: A Page defines an individual screen within an application. Set the content of the page to a Label. Set the text property of a Label to “Hello World”
  • #18: A Page defines an individual screen within an application. Set the content of the page to a Label. Set the text property of a Label to “Hello World”
  • #28: A Page defines an individual screen within an application. Set the content of the page to a Label. Set the text property of a Label to “Hello World”
  • #29: Here is the equivalent in C++ Note what you have to do in C++ that is implicitly done for you in the declarative QML. Dynamic creation (using “new” keyword, or static “create()” method in the case of the Label) Explicitly set the content of the page Reference the Application Singleton instance and set the scene
  • #30: - So what should you choose? - QML for UI, C++ for business logic - Can be combined - Up to the developer, strength 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
  • #33: - Client server model to not block the rendering - Once an animation or a list scroll is started, it run - Goodbye to choppy animations GPU - Cascades is single threaded .Like any other UI toolkit .All internal multithreading is hidden from the developer - All access to every class in the toolkit expects to be executed on Application (UI) thread Blocking of the UI thread won’t cause repaint issues, but still block processing of events
  • #34: Why animations? Eye candy. Usability. Draws attention to what is important. (Etc. etc.) “ Any Cascades UI element can be animated ” What can be animated? Switching layouts animates the children of the control “ the layout of a control in a container, such as preferred width and preferred height” Possible to animate character spacing? Implicit animations: Enabled by default Property change triggers animation Can be turned off Properties of an animation: Duration, starting and ending points, and easing curve. (Using different animation classed.) Easing curves: The ones available in the StockCurve class. Characteristics: Interpolation function (animation shape), and velocity (easin/easout functions) Grouped animations: Parallel or sequential
  • #35: Grouped SequantialAnimation Animations listed as list using square brackets First animation rotates the cow 90 degrees for 1000 ms Second animation rotates cow 90 degrees in reverse direction for 1000 ms “ repeatCount ” property of Sequential Animation is set to forever, so animation will run forever when triggered
  • #36: Combining two translate animations in parallel using easing curves. Both animations get applied at the same time and are combined to form a single animation on the cow
  • #37: Qt uses signals &amp; slots paradigm Cascades events are mapped to Qt signals
  • #38: Qt uses signals &amp; slots paradigm Cascades events are mapped to Qt signals Different components -&gt; different events Eg button -&gt; onclicked There are predefined signals and slots for the built-in controls in the Cascades UI framework. Visit the API documentation at developer.blackberry.com to discover them
  • #39: In C++ you use the Qobject::connect method to link a signal that is emitted to a slot that handles the signal Slot can be a custom function that is implemented. Signal can also be custom
  • #40: Quick few slides on developing for different resolutions and form factors Discuss the differences between Z10 and Q10, and commitment to 16:9 and 1:1 ratios
  • #41: Leverage the built-in controls as much as possible, because we have made them adaptable to the device the app is running on Use layouts properly and with rotation and different form factors in mind 9-sliced images help with re-sizing by breaking down a picture into sections and scaling based on specified instructions Asset subset using the Asset Selector (next slide)
  • #42: Assets that are named the same as objects in the main assets, and placed in a folder titled 720x720 will be selected for use on Q10 Must be using 10.1 SDK
  • #43: Assets that are named the same as objects in the main assets, and placed in a folder titled 720x720 will be selected for use on Q10 Must be using 10.1 SDK
  • #44: Assets that are named the same as objects in the main assets, and placed in a folder titled 720x720 will be selected for use on Q10 Must be using 10.1 SDK
  • #51: A Page defines an individual screen within an application. Set the content of the page to a Label. Set the text property of a Label to “Hello World”
  • #52: A Page defines an individual screen within an application. Set the content of the page to a Label. Set the text property of a Label to “Hello World”
  • #53: A Page defines an individual screen within an application. Set the content of the page to a Label. Set the text property of a Label to “Hello World”
  • #54: A Page defines an individual screen within an application. Set the content of the page to a Label. Set the text property of a Label to “Hello World”