2. M I G R A T I N G A P P S T O
B L A C K B E R R Y 1 0
D E F I N I T I V E P O I N T S
O F I N T E R E S T
Jim Ing (@jim_ing)
Sr. Enterprise Developer
Join the Conversation!
BlackBerry Experience Forum 2013 - #BEF13
3. Join the Conversation! BlackBerry Experience Forum 2013 - #BEF13
…and dive straight down
• Applications types
• Tools to use
• Strategies
• Samples and examples
• Resources
4. Join the Conversation! BlackBerry Experience Forum 2013 - #BEF13
Go green by recycling existing apps
• BlackBerry OS
• HTML5 / web-based
• Adobe Air / Flash
• Qt
• And even iOS!
5. Join the Conversation! BlackBerry Experience Forum 2013 - #BEF13
One-size does not fit ALL
HTML5 C/C++/Qt/Cascades ActionScript
BlackBerry Native SDK Adobe AIR
WebWorks
6. Join the Conversation! BlackBerry Experience Forum 2013 - #BEF13
6
Generic HTML User Interface Access 100% of the Native API’s
Use the existing BlackBerry
extensions, or build your
own custom extensions to
execute any class you’ve
Premium Rendering Fidelity already built. Compiled Native Application
No compromises, run in the
Open Sourced Apache 2.0
background, run at startup,
Community participation listen for pushed data, invoke
extends beyond the sole other applications.
Powerful Framework Support interest of RIM, check out:
http://blackberry.github.com
Enterprise Ready Application
Customizable Configuration Manage and deploy
WebWorks applications
Define icons, features, and
with the most trusted MDM
Support for App Frameworks permissions. Enable
solution in enterprise.
communication protocols.
https://developer.blackberry.com/html5/documentation/
7. Join the Conversation! BlackBerry Experience Forum 2013 - #BEF13
Browser Application JavaScript/HTML/CSS
WebWorks Framework for running Web code
WebKit Web rendering Engine
BlackBerry 10 OS QNX!
8. Join the Conversation! BlackBerry Experience Forum 2013 - #BEF13
http://developer.blackberry.com/native/documentation/bb10/getting_started.html
9. Join the Conversation! BlackBerry Experience Forum 2013 - #BEF13
Cascades Application Native Application Gaming & Porting
Developers Developers Developers
C++ UI APIs Cascades
C++ platform, device & Platform API (C++)
service APIs QtCore
Wide range of API’s
(From open source and
platform providers)
BlackBerry 10
Core APIs
10. Join the Conversation! BlackBerry Experience Forum 2013 - #BEF13
• Easily adapt and deploy existing content
• Native BlackBerry® component set look and feel
• Can create hybrid apps
• Access to native API’s with Adobe® AIR® Native Extensions
• Lots of great community support
• Lots of open-source frameworks
https://developer.blackberry.com/air/documentation/bb10/
11. Join the Conversation! BlackBerry Experience Forum 2013 - #BEF13
• Based on 2.3.3 release; Jelly Bean coming!
• Self Contained Virtual Machine
• Only supports Personal Perimeter
Java
Android Runtime
• Camera API • Notifications
• Compose Support • Push Support
• File Picker • Sensor Support
http://developer.blackberry.com/android/documentation/
13. Join the Conversation! BlackBerry Experience Forum 2013 - #BEF13
Why? How?
• Easier to port • Avoid platform dependent
• More code reuse across projects functionality
• Use cross-platform libraries,
• Easily identify platform dependent frameworks or engines
code
• Isolate platform dependent code
14. Join the Conversation! BlackBerry Experience Forum 2013 - #BEF13
If you are using any of these, you might have some things to
think about:
• UI and graphics • Audio / video
• Event handling • NFC
• Touch screen input • File I/O Maybe you already
• Application control • Threads developed with
• Sensors standard libraries?
15. Join the Conversation! BlackBerry Experience Forum 2013 - #BEF13
Mobilizing the Enterprise for YEARS!
• Developed with BlackBerry Java
• Tightly coupled application tiers
• No “Java to BlackBerry 10 Converter”
Strategies:
• The HTML5 Recipe
• Native leveraging cascades
16. Join the Conversation! BlackBerry Experience Forum 2013 - #BEF13
6
Decouple the Application
User Interface Web Native
Leverage Web UI BlackBerry
Framework Cascades UI
Business Logic
Java Methods to BlackBerry or Open-
JavaScript Functions Source Libraries
BlackBerry
Device Integration WebWorks or Hybrid BlackBerry 10 Core
Container
17. Join the Conversation! BlackBerry Experience Forum 2013 - #BEF13
Your target for years!
• Developed with HTML, CSS, JavaScript
• Running the internet to intranets
• Cross-platform
Strategies:
• The HTML5 Recipe
18. Join the Conversation! BlackBerry Experience Forum 2013 - #BEF13
To create repeatable cross-platform:
Build towards Standards:
WebKit, HTML5, CSS3 + JavaScript
Your Org
Frameworks:
“Micro” “Meso” “Macro” Don’t re-invent the wheel
Frameworks Frameworks Frameworks Research frameworks
JavaScript Libraries (Macro) jQuery, Sencha
(Micro) ZeptoJS, jQmobi
HTML5, CSS3, JavaScript…
JavaScript Libraries:
Forget (External) Animations, Look
it 2-3+ 0+ and Feel, + Code
4-5+
year months AliceJS, bbuiJS, ZeptoJS
year
Age of Device
19. Join the Conversation! BlackBerry Experience Forum 2013 - #BEF13
Legacy devices need Micro Frameworks: Layer Light
DOM Zepto.js
• Layered approach recommended MVC Spine, Knockout
UI Bootstrap, Jo, jQTouch
• Gives you the tools you need and not every tool
Loader defer.js, LABjs, RequireJS
• Perform well on little horsepower Storage Lawnchair
Touch Events Hammer.js, Swipe JS
Your Org Event Chaining jWorkflow, Chainvas
Animations Alice.js, Emile, Shifty, Morf
“Micro” Frameworks Graphics Raphael
Graphics/Charting gRaphael
JavaScript Libraries Media
Modest Maps, Leaflet,
Mapping
Open Layers Mobile
HTML5, CSS3, JavaScript, …
Utilities xmlObjectifier
20. Join the Conversation! BlackBerry Experience Forum 2013 - #BEF13
Modern devices can use both Frameworks: Layer Medium
DOM xui.js
• Bigger libraries = more or combined feature sets MVC Backbone.js, AngularJS
UI bbUI, Enyo, Ember
• New browsers understand HTML5
Loader PreloadJS
• Web features are hardware accelerated Storage remoteStorage.js
Touch Events Covered by Frameworks (bbui)
Your Org Event Chaining jWorkflow
Animations FluxSlider, TweenJS
“Meso” Frameworks Graphics EaselJS
Graphics/Charting HighCharts
JavaScript Libraries Media SoundJS
Mapping Bing, Nokia Ovi
HTML5, CSS3, JavaScript, …
Utilities Underscore.js
21. Join the Conversation! BlackBerry Experience Forum 2013 - #BEF13
Future devices will run everything: Layer Heavy
DOM jQuery, sencha, dojo, jo
• Resource consumption irrelevant MVC JavaScriptMVC
DHTMLX Touch,
• Exact look and feel cross-platform UI
jQuery Mobile
• Framework becomes Enterprise philosophy Loader Covered by Frameworks
Storage Any (HTML5, Framework, etc)
Touch Events Covered by Frameworks
Your Org Event Chaining jWorkflow
Animations Any
“Macro” Frameworks
Graphics Box2DJS
Graphics/Charting D3, Google Charts
JavaScript Libraries Media Popcorn.js
Mapping MapQuest, Google Maps
HTML5, CSS3, JavaScript, …
Utilities Any
22. Join the Conversation! BlackBerry Experience Forum 2013 - #BEF13
• Supports Qt 4.8 framework
Cascades UI apps
(C++ and QML)
• C/C++ and QML
Exclusive modules
Qt-based Cascades UI
• Port Qt Widget or Shared modules Platform API framework
• Qt Quick
Qt Quick
Strategies: QtScript QtSvg QtCore QtNetwork
QtGui
Items and
elements
• Minor changes Style
QtDeclarative QtSql QtXml QtXmlPatterns
• Use Cascades UI over
Qt Widget or Qt Quick UI QPA plugin QNX adaptations
BlackBerry
adaptations
23. Join the Conversation! BlackBerry Experience Forum 2013 - #BEF13
Step by step
• Set up the tool chain
• Make the application build
• Set up packaging and deployment
• Fix the look-and-feel issues
• Address platform specific runtime issues
• Add platform specific features (device integration)
• Submit to App-World
• BOOM Done!
24. Join the Conversation! BlackBerry Experience Forum 2013 - #BEF13
• Interact with One app at a time • Interact with Many apps at a time
̶ In/Out Paradigm ̶ Extend/Connect Paradigm
• Most of UI app interaction is based • BlackBerry people Multi-Task
on “taps” and gestures • Content is King, App Must Flow
• An app is a collection of screens
through which the user navigates – a
window always fills the device main
screen
25. Join the Conversation! BlackBerry Experience Forum 2013 - #BEF13
User interface development User interface development
• Cocoa Touch UI Framework • Cascades Framework
• UIKit • Use QML
• Use Objective-C
Application logic Application logic
• Objective-C or… • C
• Objective-C++ and C++ (rename your .m • C++
file to .mm and add wrappers)
27. Join the Conversation! BlackBerry Experience Forum 2013 - #BEF13
Application UI
Cocoa Touch Cascades
Device integration
Graphics
Media Layer Animation
Media
Cascades Qt APIs
Storage
Core Services Location
Payment
Sensors BlackBerry Platform Services
Core OS Hardware Qt APIs
Security QNX APIs
28. Join the Conversation! BlackBerry Experience Forum 2013 - #BEF13
Cascades Objective-C to Native C/C++
UIKit MIGRATE
/ QML Wrapper allows Objective-C in pure C++ projects
Objective MIGRATE
Native Objective-C to Cascades
C/C++
C Wrapper Mapping approach
Open Source Commercial
Libraries: Libraries:
Box2D Marmalade
Cocos2D Unity3D
29. Join the Conversation! BlackBerry Experience Forum 2013 - #BEF13
0
iOS NS Class BlackBerry 10 Class Description
An array of bytes. The size of a
QByteArray can be set in the class
NS Array / NSMutableArray QByteArray constructor or via the size() method.
It can be changed using the resize()
method
Stored a date and provides helper
methods to for example calculate
NSDate Qdate date differences. QDateTime is used
to store date and time
Used to contain and manipulate
strings. There is no separate class
NSString NSMutableString QString for strings that cannot be modified in
BlackBerry 10
NSURL QUrl Stores and manipulates a URL
31. Join the Conversation! BlackBerry Experience Forum 2013 - #BEF13
2
Porting Applications from the BlackBerry PlayBook
• http://developer.blackberry.com/native/documentation/bb10/porting_from_playbook.html
Porting Applications from iOS
• http://developer.blackberry.com/native/documentation/bb10/porting_ios_intro.html
Porting Applications from Android
• http://developer.blackberry.com/native/documentation/bb10/porting_from_android_ndk.html
Porting Applications from QT
• http://developer.blackberry.com/native/documentation/bb10/porting_qt_apps.html
32. Join the Conversation! BlackBerry Experience Forum 2013 - #BEF13
Qt on BlackBerry 10
• https://github.com/blackberry/Qt
Qt Projects
• http://community.qnx.com/sf/sfmain/do/viewProject/projects.qt
Qt
• http://qt-project.org/
Qt4
• git://gitorious.org/qt/qt.git
QtMobility Sensors, Multimedia, Bluetooth and Nfc
• git://gitorious.org/+kdab-developers/qt-mobility/qnx-qt-mobility.git
33. Join the Conversation! BlackBerry Experience Forum 2013 - #BEF13
Posix compatible
• QNX Neutrino certification of compliance as a PSE52 Realtime Controller 1003.13-2003 System
• http://developer.blackberry.com/native/documentation/bb10/com.qnx.doc.neutrino.prog/topic/posix_confor
mance.html
BPS event model
• BlackBerry Platform Services (BPS) library provides an application with a single consistent interface to a
number of different platform services
Support C and C++ Libraries
• The BlackBerry 10 OS supports Posix-compliant C and C++, as well as the Dinkum C99 and C++
libraries.
• http://developer.blackberry.com/native/reference/bb10/library_support_at_a_glance.html
BlackBerry 10
Core APIs
34. Join the Conversation! BlackBerry Experience Forum 2013 - #BEF13
Built-in Libraries
• Tons of built-in libraries
• http://developer.blackberry.com/native/reference/bb10/library_support_at_a_glance.html#builtin
Open Source Libraries
• BlackBerry has ported some of the most commonly used open source libraries to the platform. Check out
our Github repositories!
• http://developer.blackberry.com/native/reference/bb10/library_support_at_a_glance.html#opensource
Commerical Frameworks
• Tools and Middelware support by BlackBerry 10
• http://developer.blackberry.com/native/reference/bb10/library_support_at_a_glance.html#commercial
Wide range of API’s
(From open source and
platform providers)
35. Join the Conversation! BlackBerry Experience Forum 2013 - #BEF13
6
The Basics
• Application Structure
Screen Structure
• Screen Sizes
• Portrait and Landscape
https://developer.blackberry.com/devzone/files/desi
gn/bb10/UI_Guidelines_BlackBerry_10.pdf
36. Join the Conversation! BlackBerry Experience Forum 2013 - #BEF13
7
JAM808 - Introduction to the BlackBerry 10 NDK - Developing a Native BlackBerry 10 App from
Start to Finish
• New to Native development on BlackBerry® 10? This session will discuss the basics of the Native Software Development
Kit (NDK). It will provide a good foundation for understanding what can be done with the NDK, as well as provide an
overview of the APIs and associated tooling. Follow the development of a Native app from start to finish, including a user
interface written in Cascades™, Qt and QML concepts, file system, accessing device APIs, perimeters and access control.
This session is an excellent way to learn about the key components of the platform and how they work together to enable
application development.
• http://hosting.desire2learncapture.com/RIM/1/watch/85.aspx
JAM804 - BlackBerry 10 Visual Style and Finding your Flow
• Flow is one of the main concepts behind the UI/UX design for BlackBerry® 10. Join this session for a high level
understanding of BlackBerry 10 design concepts, both from a user and developer perspective. You will learn how to design
your apps to take full advantage of the flow related features BlackBerry 10 has to offer, including peek gestures, the tab
sidebar and list peeking
• http://hosting.desire2learncapture.com/RIM/1/watch/86.aspx
37. Join the Conversation! BlackBerry Experience Forum 2013 - #BEF13
JAM811 - Porting: iOS
• Are you an iOS® app developer interested in porting iOS native applications to BlackBerry® 10? Join this session to learn
how to get started with porting apps that use iOS UIKIt to BlackBerry 10 using the Cascades™ framework. We will cover
the iOS and BlackBerry 10 platforms and frameworks, discuss similarities, differences and what to consider when porting
applications. This session will focus on understanding iOS and BlackBerry 10 aspects of application lifecycle. Discover
platform services offered and how to use them as well as aspects of UI design and implementation, networking and data
persistence.
• http://hosting.desire2learncapture.com/RIM/1/watch/95.aspx
JAM817 - Native API Deep Dive: Location Based Services & Sensors
• Location Based Services and Sensors provide many unique ways to add features and functionality to your app. Join this
session to learn more about Location Based Services and Sensor APIs in the BlackBerry® 10 NDK and to discover new
ways to use them in your native C and Cascades apps
• http://hosting.desire2learncapture.com/RIM/1/watch/96.aspx
38. Join the Conversation! BlackBerry Experience Forum 2013 - #BEF13
WebKit
Ripple
BlackBerry WebWorks
Samples
Community API extensions
Toolkits (Alice.js, bbUI.js)
http://blackberry.github.com