64
Develop for BlackBerry 10 Approaches and Possibilities Luca Filigheddu –Developer Evangelist Developer Relations EMEA - BlackBerry @filos

Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Embed Size (px)

DESCRIPTION

La piattaforma BlackBerry 10, lanciata lo scorso 30 Gennaio, é attualmente la piattaforma mobile piú aperta presente sul mercato per quanto riguarda le tecnologie di sviluppo supportate. Gli sviluppatori possono agilmente portare il proprio codice su BB10 con il minimo sforzo e, grazie ai numerosi framework e SDK a disposizione, avere a portata di mano un’ambia scelta di strumenti per sfruttare al meglio la potenza del nuovo sistema operativo. Quale strategia adottare per portare la propria app su BlackBerry 10? Quali le opportunitá?

Citation preview

Page 1: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Develop for BlackBerry 10 Approaches and Possibilities Luca Filigheddu –Developer Evangelist Developer Relations EMEA - BlackBerry @filos

Page 2: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Agenda

•  Why developing for BlackBerry •  Platform Overview •  Developer Ecosystem •  Technical Overview •  Q&A

Page 3: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Why developing for BlackBerry 10?

Page 4: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Storefront Reach

4

Over 80 Million Subscribers 170 Markets Over 4 Billion Apps Downloaded Over 70.000 BB10 Apps Approved For Sale 100.000+ BB10 apps submitted for review 110.000+ apps for BBOS and older devices 54.000+ vendors

Page 5: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Money!

5

Page 6: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

More money for devs!

�  4% more than iOS developers (per App / month) �  >35% more than Android developers (per App /

month) �  Developing an app for iOS costs

�  21% more than Android �  81% more than BlackBerry

6

Page 7: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Ok, now let’s talk about technology!

Page 8: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Acquisitions

8

Social Calendaring App Distribution

Smartphone Security

Web Development

UX / UI Design

Navigation

Platform OS

Social Gaming

Social Contacts

Webkit Experts

Device Mgmt.

Encryption

Ripple!

Page 9: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Platform

�  Built on QNX Neutrino Real-time OS �  Microkernel based OS �  POSIX Compliant OS

�  (Portable Operating System Interface) �  Native C/C++ Applications

�  Direct OpenGL / HW Access �  Qt/Cascades for native development

9

Page 10: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Transition

10

Page 11: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Choices!

Page 12: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

BlackBerry 10 SDKs

12

ActionScript

Adobe AIR HTML5, CSS, JavaScript

WebWorks C/C++

Native SDK

Java

Android Runtime

Page 13: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

What to choose?

�  Background and Skills �  Reuse of existing code, assets

�  Requirements �  Cross-portfolio, cross-platform, features

�  Platform Capabilities �  APIs, tooling, frameworks, constraints

�  Tools �  IDE, utilities, simulation, familiarity

�  Support �  Community, docs, samples

13

Page 14: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

BlackBerry Native SDK

Page 15: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Standard

•  STL and POSIX compliant libraries •  Screen and Windowing APIs •  Gestures library •  Input events library •  Imaging and Compression •  OpenGL ES 1.1/2.0 •  OpenAL 1.1 •  Freetype Font Rendering •  Math •  XML and SQLite Database library

15

Page 16: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Cross-platform Libraries

•  Boost: portable C++ libraries •  Cocos2D-X: cross-platform 2D game framework •  Box2D: 2D physics engine •  Bullet : 3D physics engine •  GamePlay: cross-platform 3D gaming framework •  Lua: embeddable scripting language •  SFML/SDL: cross-platform multimedia library. •  Skia: Fast 2D rendering engine

16

Page 17: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Gaming Platform

�  Scoreloop  SDK    �   Integrate  Social  Gaming  Features  �   Solid  Analy8cs    �   Cross-­‐pla<orm  presence  �   Billing  /  Mone8za8on  feature  

�  Payment  APIs  for  in-­‐Game  transac8ons  

17

Page 18: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

BlackBerry on GitHub

•  Open Source Development Community •  Port libraries and frameworks •  Create libraries and frameworks •  Collaborate and contribute •  Work directly with other BlackBerry Platform Developers

blackberry.github.com

18

Page 19: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Game Engines

�  Unity  Technologies  �  Marmalade  SDK  �  ShiVa3D  Game  Engine  with  Development  tools  �  More  Coming!  

19

Page 20: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Development tools

•  GCC and GDB based tool chain •  Momentics IDE - Eclipse based C/C++ Development

Tools •  In-built Application Debugging, Profiling and Memory

Analysis •  Microsoft Visual Studio plugin

20

Page 21: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Visual Studio Plugin

�  You can use the BlackBerry Native Plug-in for Microsoft Visual Studio to develop C and C++ applications for your BlackBerry 10 device or BlackBerry PlayBook tablet.

21

Page 22: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Links

�  BlackBerry  Na8ve  SDK  developer.blackberry.com/na2ve  -­‐>  “Download  the  Na-ve  SDK”  -­‐>  “Get  started  with  Na-ve  SDK”  

�  Blackberry  Open  Source    blackberry.github.com  

22

Page 23: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Cascades

C++/Qt

Page 24: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

What is Cascades?

�  Easy  to  use  framework  for  delivering  the  astonishing  user  experience  and  UI  �  Rich  set  of  core  UI  components  �  Built  in  signature  effects  �  Pre-­‐packaged  interac8on  design  �  Easy  data  binding  to  various  data  sources  (SQL/XML/JSON)  �  Ease  of  integra8on  with  pla<orm  services  �  C++  and/or  QML/JavaScript®  power  for  the  same  object  model  

24

Page 25: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

What is Cascades?

25

Page 26: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Out-of-the-box Elegance

26

Page 27: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Cascades and Qt

•  Mature C++ application framework •  Good APIs •  Signals and Slots •  Many help classes •  QML •  QtGui Cascades

27

Cascades

Page 28: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Creating UIs

•  Creating UIs in C++ is a lot of fun, but there are easier and faster ways to describe UI.

•  QML •  declarative language to describe trees of Qt objects with

properties (typically user interface) •  Looks like JSON

•  Embed JavaScript as signal handlers •  A different view of the same object model that C++ offers

•  Easily mixed with C++ •  Preview your QML UI in Cascades Builder 28

Page 29: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Why Cascades?

•  For Qt Developers…. •  Cascades replaces Qt Quick, Qt GUI •  Cascades Builder replaces Qt Creator •  Slightly different QML syntax

•  So, why Cascades??? •  Cascades UI rendering NOT on the main thread •  BlackBerry10 Look and Feel •  Advanced placement management of components

29

Page 30: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Cascades UI Framework

•  Rich collection of in-built controls •  Some 30+ fully customizable UI controls •  Action Bar

•  Navigation – Tabs & Back •  View specific actions

•  Context Menu •  Item specific actions

30

Page 31: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Hello World in Cascades

import bb.cascades 1.0 Page { content: Label { text: "Hello World" } }

31

Page 32: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Hello World in Qt

Page* root = new Page; Label* label = Label::create() .text("Hello World"); root->setContent(label); Application::instance()->setScene(root);

32

Page 33: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Cascades IDE

33

Component library (Drag and drop to QML)

QML design view

QML tree view, QML properties view

QML editor with syntax highlighting/ code completion

Page 34: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Links

�  BlackBerry Cascades �  developer.blackberry.com/cascades

�  Blackberry Open Source �  blackberry.github.com/cascades/samples.html

34

Page 35: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

BlackBerry WebWorks

HTML5

Page 36: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

BlackBerry10 & HTML5

�  Unparalleled Standards Support

�  Incredible Performance

36

Page 37: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

HTML5 and WebWorks

�  Port your existing Webs to BlackBerry WebWorks

•  HTML5, CSS3, JavaScript

•  Leading in mobile browser benchmarks

•  Allows for cross-platform web development

•  Broadest portability, Native Look&Feel (BBUI.js), any IDE

37

Page 38: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

WebWorks for BB10

•  The SDK has been re-written for BlackBerry 10 –  No longer based on Java or Adobe AIR –  It is now based on JavaScript with a C/C++ back end –  The packaging process uses node.js

38

Page 39: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Why HTML5 and WebWorks?

Decision guidance �  Utilize your existing Web experience

�  Re-use lots of cross platform code �  Extend with BlackBerry® WebWorks™ platform

to securely access native level functionality �  Provides the best of both worlds

�  Rich hardware accelerated UI �  BB10 apps built with BlackBerry® WebWorks™ behave

like native apps

39

Page 40: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

BlackBerry Web Platform

§  Driven by strong Web standards support §  Powered by WebKit §  HTML5 and CSS3 §  Flash 11 and WebGL §  WebWorks and Cordova

40

Page 41: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

What can you do?

•  Geolocation •  Offline mode •  Storage •  Audio / Video •  2D Graphics •  Advanced forms •  Invoke •  Web Workers •  Notifications 41

Page 42: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

How do I get there?

42

Web  Assets   WebWorks  Tools   BlackBerry  Applica8ons  

Page 43: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Custom WebWorks API

•  Build your own APIs –  Access native layer functionality –  More powerful than just HTML5

–  E.g. NFC, Clipboard, Barcode, Analytics

•  JavaScript interface for platform code –  BlackBerry OS = Java

–  Tablet OS = AIR –  BlackBerry 10 = C/C++

43

Page 44: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

HTML5 Emulator - Ripple

•  A multi-platform mobile emulator for testing –  Chrome Extension –  Render Web content similar to a web browser –  Emulate device-specific APIs and capabilities –  Web inspector debugging & profiling –  Package and sign BlackBerry applications

•  Supported APIs: –  WebWorks, WebWorks for Tablet OS –  WebWorks for BlackBerry 10 –  PhoneGap

44

Page 45: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Ripple Extension

45

Page 46: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Web Platform Extras

§  AliceJS library §  CSS3 hardware acceleration

§  WebGL §  3D Graphics, OpenGL ES 2.0

§  Community frameworks

46

Page 47: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

bbui.js

•  Designed for use with BlackBerry WebWorks •  A web framework that provides a BlackBerry Look

and Feel •  Framework goals

•  Follows BlackBerry 10 UI guidelines •  Efficient screen management •  Focused on performance and memory optimization •  Open source and collaborative •  Community driven, not officially from BlackBerry

47

Page 48: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

bbui.js - Cases

48

Page 49: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Links

�  SDK + Simulators �  http://developer.blackberry.com/html5

�  GitHub �  https://github.com/blackberry/BB10-WebWorks-Samples

49

Page 50: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Android Runtime and Packager

Page 51: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

BlackBerry Runtime for Android™

�  Enable Android software stack running on the BlackBerry 10, including �  Application framework �  Dalvik Virtual machine �  Graphics and media �  Structured data storage, e.g. SQLite®

�  Device access, e.g. GPS, accelerometer, compass, etc. �  Run at full speed directly on the OS kernel

�  Optimized performance; NOT virtualized �  Tightly integrated with the underlying OS

�  Currently based on Android 2.3.3 (aka Gingerbread) 51

Page 52: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Target Developers

•  Android App Developer •  Only here because it is another avenue to sell their application •  Heard that BlackBerry had an Android Runtime and thought they

would check it out

•  BlackBerry Java Developer •  Decided to invest in Android Java to hit both BlackBerry and

Android devices •  Their Java App does not use many/any BlackBerry APIs •  Frustrated that we do not support Java runtime on BlackBerry

anymore 52

Page 53: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Compatibility and Limitations

�  About 65-70% of all Android apps are compatible today �  Not all Android APIs are supported

•  Hardware and OS limitations

�  Currently major unsupported features include: •  Bluetooth •  Google Maps (workarounds available) •  NFC •  Native Android Code

�  Android Apps are limited to the personal perimeter �  Full compatibility list: developer.blackberry.com/android/apisupport/ 53

Page 54: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Porting Existing Apps

�  4 Tool options to use •  Online Conversion Tool – quickest way to get app converted •  Eclipse Plug-in – For most Android developers •  Command-line Tools – For advanced developers •  Graphical AID – very easy to use

For more information: http://developer.blackberry.com/android/tool/

54

Page 55: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Success stories

55

Page 56: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Links

�  Where to start �  http://developer.blackberry.com/android

56

Page 57: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Adobe AIR

Page 58: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Developing with Adobe AIR

�  Easily  adapt  and  deploy  exis8ng  content  �  Na2ve  BlackBerry®  PlayBook™  tablet  and  BlackBerry  10  

component  set  look  and  feel  �  Can  create  hybrid  apps  �  Access  to  na8ve  (C/C++)API’s  with  Adobe®  AIR®  Na8ve  

Extensions  (ANE)  �  Lots  of  great  community  support  �  Lots  of  open-­‐source  frameworks  

58

Page 59: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Tools and getting started

�  Flash Builder 4.6 and 4.7 Powerflasher FDT (Eclipse based) �  Adobe AIR SDK with Adobe ActionScript and Adobe Flex

APIs create an engaging user experience �  unique UI components and predefined skins �  listeners for events that are specific to BlackBerry devices

�  access the features that are unique to mobile devices �  Accelerometer �  Geolocation

�  you can create AIR Native Extensions (ANE) 59

Page 60: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

BlackBerry 10 UI

�  QNXSkins.ane stores the assets for the skins �  Device deployed ANE �  Correctly sized assets are stored on the device �  Reduces application file size

60

Page 61: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Support

�  Currently, Adobe AIR 3.1 is supported �  Adobe AIR 3.4 and Stage 3D will be supported soon

61

Page 62: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Links

�  SDK + Simulators �  http://developer.blackberry.com/air

�  GitHub �  https://github.com/blackberry/Samples-for-AIR

62

Page 63: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

Q&A

Page 64: Developing for BlackBerry 10 – Tools and SDKs by Luca Filigheddu

THANK YOU Luca Filigheddu – Developer Evangelist Developer Relations EMEA – BlackBerry @filos