moosecon - @KLAJLI & @ARDIRI




             Native Application (C/C++)
             development on BlackBerry 10
             Aaron Ardiri
             AARDIRI@blackberry.com
                                       twitter: @ARDIRI
             Kamel Lajili
             KLAJILI@blackberry.com
                                       twitter: @KLAJILI




         SO, WHAT IS



                                      EXACTLY?



BlackBerry                                                 1
moosecon - @KLAJLI & @ARDIRI




        BlackBerry 10

             •  cinematic experience
             •  multi-tasking as second nature
             •  content is king
             •  fluid workflow
             •  moments of charm

         http://developer.blackberry.com/ui




         BLACKBERRY 10
         DEMO




BlackBerry                                       2
moosecon - @KLAJLI & @ARDIRI




         APPLICATION
         DEVELOPMENT
         AND TOOLCHAINS




        BlackBerry 10




             C++/Qt     C/C++      HTML5 BlackBerry®    ActionScript     Java
        Cascades      Native SDK    WebWorks™          Adobe®   AIR®   Android™
                                                                       Runtime




BlackBerry                                                                        3
moosecon - @KLAJLI & @ARDIRI




        BlackBerry 10
        SDK Platform Support




         THE QNX
         NEUTRINO RTOS




BlackBerry                     4
moosecon - @KLAJLI & @ARDIRI




        Operating Systems
        Monolithic Architecture                                                             !""#                     !""#
             !"#$%&'()*#+,#*-()-*-./+
                                                                                               $%"&'#           -*.,#
                                                                                               ()*+,)#          /0/',1#
             •  0&1#*+2&3+0&$.+45#$+(6(-*()*#+.&1(/+

               7  8-'1&9$:;+<-'"=:;+>'13&-1?+                                     !""#              95%5.*':*8##               !""#
                                                                                         3,'45)6#      ;<#       2)*+,)#
                                                                                          /'786#
             •  45+@&'.(-'$+.3#0#'1&"$+(0&"'.+&2++
                2"'@%&'(*-./+9-.A+"'3#$.3-@.#1+BCD+E3-6-*#F#$++                                      9&.=1,(*7#
                                                                                                       /'786#
             •  (+2("*.+-'+&'#+45+@&0E&'#'.+@('+1(0(F#++
                ('/+&.A#3;+*#(1-'F+.&+$/$.#0G9-1#+@&33"E%&'+                               !""#                      !""#

               7  $/$.#0+3#*-()-*-./+-$+($+F&&1+($+/&"3+9&3$.+13-6#3+1#6#*&E#3+

               7  3#)&&.+-$+&'*/+3#@&6#3/+E&$$-)*#+




        Operating Systems
        MicroKernel Architecture                                                            !""#                     !""#
             H-$$-&'+B3-%@(*+,#*-()-*-./+
                                                                                               $%"&'#           -*.,#
                                                                                               ()*+,)#          /0/',1#
             •  0-@3&I#3'#*+0-'-0-J#$+#=#@"%&'+9-.A++
                "'3#$.3-@.#1+KI#3'#*L+BCD+E3-6-*#F#$+                                                    H-@3&G+
                                                                                  !""#                                         !""#
                                                                                         3,'45)6#        I#3'#*++    2)*+,)#
             •  (**+E3&@#$$#$+3"'+-'+-$&*(.#1+E3&@#$$+$E(@#+                              /'786#
               7  -'@*"1#$+13-6#3$;+M*#+$/$.#0$;+$.(@I$+
                                                                                                     9&.=1,(*7#
               7  (**+!NO+E3&@#$$#$+(3#+K(EE*-@(%&'$L+                                                 /'786#

             •  2("*.$+(3#+@&'.(-'#1+$&+.A(.+.A#/+&'*/++                                   !""#                      !""#
                (P#@.+.A#+2("*./+@&0E&'#'.+
               7  2(-*#1+@&0E&'#'.$+@('+)#+1/'(0-@(**/+3#@&6#3#1+
                  9A-*#+.A#+$/$.#0+@&'%'"#$+.&+&E#3(.#+




BlackBerry                                                                                                                            5
moosecon - @KLAJLI & @ARDIRI




        Operating Systems
        Kernel Sizes (Lines of Code)
             •  0-@3&I#3'#*+A($+.A#+$0(**#$.+(0&"'.+
                                                                         Millions of lines of kernel code
                &2+@&1#+9-.A+BCD+E3-6-*#F#$+
                                                               WinCE           3.9
             •  @&1#+-$+0&3#+#($-*/+3#6-#9#1++
                                                       Linux (Generic)                         14
                ('1+$@3"%'-J#1+1"#+.&+-.$+$-J#+
                                                       Linux (Android)                    12
             •  )"FF/+)#A(6-&3+-$+2&"'1+('1+
                                                                   XP
                #*-0-'(.#1+)#2&3#+E3&1"@.+3#(@A#$+                                                          40+

                @&'$"0#3$Q+A('1$+                                QNX     0.1

             •  3-$I+&2+$/$.#0+2(-*"3#+-$+*&9+




        Operating Systems
        Kernel Architecture Comparisons




BlackBerry                                                                                                        6
moosecon - @KLAJLI & @ARDIRI




        QNX: Proof of Stability
        Mission Critical Reliability



             3&8.,7)#     ?7),:5&/,#       E7/,)#H0,#<&)A,)0#    D),8*/*5%#      9*%*%A#@5%')5.#    @7%7(7)1#
             >,78'5)/#     @5%')5.#                               9*..*%A#                            B*/*5%#




             ?7.17)'#    @7%8,)#G:,)7"0#       ?*%(1*../#       95'5)#@5%')5.#       DE@F/#        D)58,//#@5%')5.#
              CB!@#




         BB10 APPLICATION
         GUIDELINES




BlackBerry                                                                                                            7
moosecon - @KLAJLI & @ARDIRI




        Application Guidelines

         application lifecycle
                                  Start

                                                                •  respond correctly
                                                                    to lifecycle events
                  Normal                         Hidden
                  (Active)                       (Inactive)

                                                                •  failure to do so can:
                             Thumbnail                            •    drain battery
                             (Active/Inactive)
                                                                  •    interfere with other apps

                                      Exit




        Application Guidelines

         applications can integrate with the operating system and
         other core applications by using:
             •    BBM Framework,
             •    Share Framework,
             •    PIM APIs,
             •    Universal Search,                           Integrated      Social     Beautiful
             •    Push Service,
             •    Payment Service,
             •    Advertisement Service
             •    Balance




BlackBerry                                                                                           8
moosecon - @KLAJLI & @ARDIRI




        Application Guidelines

         applications can use the Invocation Framework to minimize
         “reinventing the wheel” and improve the user’s flow:

             •    cards and content viewers
             •    launching core and 3rd party Apps
             •    registering URIs and MIME types




        Bound Invocation


                  I want Dr. Doc to
                    open this .doc
                         file.
                                                                          I can
                                                                        open .doc
                                                                          files




                                                              Dr. Doc
                                       Invocation Framework




BlackBerry                                                                          9
moosecon - @KLAJLI & @ARDIRI




        Unbound Invocation

                                                                  I can
                                                                open .doc
                   I need to open                                 files
                   this .doc file.
                      Anyone?

                                                                  I can
                                                                open .doc
                                                                  files




                                         Invocation Framework     I can
                                                                open .png
                                                                  files




        Cards

         !  embeds a screen from target
             !    instead of launching the full app
         !  no App Grid presence
         !  supports peeking
             !    a leap ahead of the competition
             !    BlackBerry 10 Flow at its best!
         !  invoked in the same way!




BlackBerry                                                                  10
moosecon - @KLAJLI & @ARDIRI




        Card Styles

         !  Three styles
             !    Composer
             !    Previewer
             !    Picker


         !  Determines
             !    Peek behavior
             !    Transition style




        Application Packaging
                                              •  cannot directly access files of
                            Sandbox              other applications
                                              •  use the development mode to
                                     data        see your application sandbox
                                      logs    •  only place user visible files
                                                 (across device) in shared area
                                      tmp

                                      app       Application Installation

                                     shared          User Shared




BlackBerry                                                                         11
moosecon - @KLAJLI & @ARDIRI




         Application need to request resource access in the bar-
           descriptor.xml file




        Application Signing

                       BAR



                   Request         Half Signed    Sign with
                   RIM Signature                  Developer Certificate
                                       BAR


                                                        Signed
                                                         BAR




BlackBerry                                                                12
moosecon - @KLAJLI & @ARDIRI




        BlackBerry 10 Foundations
        Platform APIs & Core Packages
                                  Android                      Native                    Web                       AIR
                                   Player                     Runtime                   Runtime                  Runtime

         Application                                        BBM™                                                               Application
         Infrastructure     Payment         Advertising                  Push Data      Notification   Phone                   Platform
                                                            Service

                           Invocation          Share       Calendar       Contacts       Messages      Tasks               …


                          Configuration      Cascades       Search         Config         Balance

                                                           Backup /
                            Lifecycle         Utilities                     i18n        Instrument n     …
                                                           Restore

         System Service                                                 Authenticatio
                           Navigator         Installer     Launcher                      Multimedia    SQLite          NFC
                                                                             n
                            Window
                                              WebKit       Protocols      Network          DRM         Crypto              …
                            Manager

         OS                 Memory           Process        Power                                      Device
                                                                            IPC         File System                        …
                          Management        Management    Management                                   Drivers




         NATIVE SDK




BlackBerry                                                                                                                                   13
moosecon - @KLAJLI & @ARDIRI




        Native SDK
        OSS & Developer Experience




        Native SDK
        Hello World
        #include <stdio.h>!
        #include <stdlib.h>!

        int !
        main(int argc, char **argv)!
        {!
           fprintf(stdout, “Hello World!n”);!
           return EXIT_SUCCESS;!
        }!




BlackBerry                                       14
moosecon - @KLAJLI & @ARDIRI




        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!
           }!
        }!




BlackBerry                                                              15
moosecon - @KLAJLI & @ARDIRI




        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
        Open Industry Standards




BlackBerry                                                              16
moosecon - @KLAJLI & @ARDIRI




        Native SDK
        Open Source Support




         CASCADES SDK




BlackBerry                     17
moosecon - @KLAJLI & @ARDIRI




        Cascades SDK
        OSS & Developer Experience




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




BlackBerry                                  18
moosecon - @KLAJLI & @ARDIRI




         BLACKBERRY 10
         CASCADES DEMO




        Cascades SDK
        Hello World
        import bb.cascades 1.0

        Page
        {
               content: Label
               {
                   text: "Hello World"
               }
        }




BlackBerry                               19
moosecon - @KLAJLI & @ARDIRI




        Cascades SDK
        Hello World

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




                               60 FPS!




BlackBerry                                         20
moosecon - @KLAJLI & @ARDIRI




             App logic                                                 UI in separate thread
                                                                 28°
                                                                                Cascades




                    Photos by rumpleteaser and whologwy Flickr




        Scene Graph

                                                                         Root
                                                                       Container


                                                                                                     RotationZ
                                                                                    Hello World
                                                                                                     Scale
                                                                                                     Opacity


                                                                                   Container


                                                                                            Text: “Hello World”




BlackBerry                                                                                                        21
moosecon - @KLAJLI & @ARDIRI




        R6#'.$+


         Qt uses signals & slots paradigm

         Cascades events are mapped to Qt signals




        S('1*-'F+T&"@A+R6#'.$+-'+!H<+

               Container
               {
                  onTouch:
                  {
                    if (event.isDown()) {
                      scaleX = 2; scaleY = 2; rotationZ = 45;
                    }
                    else if (event.isUp()){
                      scaleX = 1; scaleY = 1; rotationZ = 0;
                    }
                  }
               }+




BlackBerry                                                      22
moosecon - @KLAJLI & @ARDIRI




        S('1*-'F+T&"@A+R6#'.$+-'+BUU+


             QObject::connect(bubble,SIGNAL          touched(bb::cascades::TouchEvent *t)
                (touch(bb::cascades::TouchEvent*))   {
              this,SLOT                                  if (t->isDown()) {
                (touched(bb::cascades::TouchEvent*))       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




BlackBerry                                                                                  23
moosecon - @KLAJLI & @ARDIRI




        >'-0(%&'$+


         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




BlackBerry                                              24
moosecon - @KLAJLI & @ARDIRI




        B"$.&0+B&'.3&*$

                               SpeedGauge

                                 Container
                                DockLayout




                               RotationZ (-0)   RotationZ (-40)
                                TranslationY    TranslationY
                                (30)            (30)




        Custom list items




BlackBerry                                                        25
moosecon - @KLAJLI & @ARDIRI




        Data Binding


                  SQL



                  XML



                 JSON



                 Anything




        StackLayout & DockLayout




BlackBerry                         26
moosecon - @KLAJLI & @ARDIRI




        Pages, Panes and Navigation




        UI Guidelines



             developer.blackberry.com/ui




BlackBerry                                 27
moosecon - @KLAJLI & @ARDIRI




             Thank You
             Aaron Ardiri
             AARDIRI@blackberry.com
                                      twitter: @ARDIRI
             Kamel Lajili
             KLAJILI@blackberry.com
                                      twitter: @KLAJILI




BlackBerry                                                28

Moosecon native apps_blackberry_10-optimized

  • 1.
    moosecon - @KLAJLI& @ARDIRI Native Application (C/C++) development on BlackBerry 10 Aaron Ardiri AARDIRI@blackberry.com twitter: @ARDIRI Kamel Lajili KLAJILI@blackberry.com twitter: @KLAJILI SO, WHAT IS EXACTLY? BlackBerry 1
  • 2.
    moosecon - @KLAJLI& @ARDIRI BlackBerry 10 •  cinematic experience •  multi-tasking as second nature •  content is king •  fluid workflow •  moments of charm http://developer.blackberry.com/ui BLACKBERRY 10 DEMO BlackBerry 2
  • 3.
    moosecon - @KLAJLI& @ARDIRI APPLICATION DEVELOPMENT AND TOOLCHAINS BlackBerry 10 C++/Qt C/C++ HTML5 BlackBerry® ActionScript Java Cascades Native SDK WebWorks™ Adobe® AIR® Android™ Runtime BlackBerry 3
  • 4.
    moosecon - @KLAJLI& @ARDIRI BlackBerry 10 SDK Platform Support THE QNX NEUTRINO RTOS BlackBerry 4
  • 5.
    moosecon - @KLAJLI& @ARDIRI Operating Systems Monolithic Architecture !""# !""# !"#$%&'()*#+,#*-()-*-./+ $%"&'# -*.,# ()*+,)# /0/',1# •  0&1#*+2&3+0&$.+45#$+(6(-*()*#+.&1(/+ 7  8-'1&9$:;+<-'"=:;+>'13&-1?+ !""# 95%5.*':*8## !""# 3,'45)6# ;<# 2)*+,)# /'786# •  45+@&'.(-'$+.3#0#'1&"$+(0&"'.+&2++ 2"'@%&'(*-./+9-.A+"'3#$.3-@.#1+BCD+E3-6-*#F#$++ 9&.=1,(*7# /'786# •  (+2("*.+-'+&'#+45+@&0E&'#'.+@('+1(0(F#++ ('/+&.A#3;+*#(1-'F+.&+$/$.#0G9-1#+@&33"E%&'+ !""# !""# 7  $/$.#0+3#*-()-*-./+-$+($+F&&1+($+/&"3+9&3$.+13-6#3+1#6#*&E#3+ 7  3#)&&.+-$+&'*/+3#@&6#3/+E&$$-)*#+ Operating Systems MicroKernel Architecture !""# !""# H-$$-&'+B3-%@(*+,#*-()-*-./+ $%"&'# -*.,# ()*+,)# /0/',1# •  0-@3&I#3'#*+0-'-0-J#$+#=#@"%&'+9-.A++ "'3#$.3-@.#1+KI#3'#*L+BCD+E3-6-*#F#$+ H-@3&G+ !""# !""# 3,'45)6# I#3'#*++ 2)*+,)# •  (**+E3&@#$$#$+3"'+-'+-$&*(.#1+E3&@#$$+$E(@#+ /'786# 7  -'@*"1#$+13-6#3$;+M*#+$/$.#0$;+$.(@I$+ 9&.=1,(*7# 7  (**+!NO+E3&@#$$#$+(3#+K(EE*-@(%&'$L+ /'786# •  2("*.$+(3#+@&'.(-'#1+$&+.A(.+.A#/+&'*/++ !""# !""# (P#@.+.A#+2("*./+@&0E&'#'.+ 7  2(-*#1+@&0E&'#'.$+@('+)#+1/'(0-@(**/+3#@&6#3#1+ 9A-*#+.A#+$/$.#0+@&'%'"#$+.&+&E#3(.#+ BlackBerry 5
  • 6.
    moosecon - @KLAJLI& @ARDIRI Operating Systems Kernel Sizes (Lines of Code) •  0-@3&I#3'#*+A($+.A#+$0(**#$.+(0&"'.+ Millions of lines of kernel code &2+@&1#+9-.A+BCD+E3-6-*#F#$+ WinCE 3.9 •  @&1#+-$+0&3#+#($-*/+3#6-#9#1++ Linux (Generic) 14 ('1+$@3"%'-J#1+1"#+.&+-.$+$-J#+ Linux (Android) 12 •  )"FF/+)#A(6-&3+-$+2&"'1+('1+ XP #*-0-'(.#1+)#2&3#+E3&1"@.+3#(@A#$+ 40+ @&'$"0#3$Q+A('1$+ QNX 0.1 •  3-$I+&2+$/$.#0+2(-*"3#+-$+*&9+ Operating Systems Kernel Architecture Comparisons BlackBerry 6
  • 7.
    moosecon - @KLAJLI& @ARDIRI QNX: Proof of Stability Mission Critical Reliability 3&8.,7)# ?7),:5&/,# E7/,)#H0,#<&)A,)0# D),8*/*5%# 9*%*%A#@5%')5.# @7%7(7)1# >,78'5)/# @5%')5.# 9*..*%A# B*/*5%# ?7.17)'# @7%8,)#G:,)7"0# ?*%(1*../# 95'5)#@5%')5.# DE@F/# D)58,//#@5%')5.# CB!@# BB10 APPLICATION GUIDELINES BlackBerry 7
  • 8.
    moosecon - @KLAJLI& @ARDIRI Application Guidelines application lifecycle Start •  respond correctly to lifecycle events Normal Hidden (Active) (Inactive) •  failure to do so can: Thumbnail •  drain battery (Active/Inactive) •  interfere with other apps Exit Application Guidelines applications can integrate with the operating system and other core applications by using: •  BBM Framework, •  Share Framework, •  PIM APIs, •  Universal Search, Integrated Social Beautiful •  Push Service, •  Payment Service, •  Advertisement Service •  Balance BlackBerry 8
  • 9.
    moosecon - @KLAJLI& @ARDIRI Application Guidelines applications can use the Invocation Framework to minimize “reinventing the wheel” and improve the user’s flow: •  cards and content viewers •  launching core and 3rd party Apps •  registering URIs and MIME types Bound Invocation I want Dr. Doc to open this .doc file. I can open .doc files Dr. Doc Invocation Framework BlackBerry 9
  • 10.
    moosecon - @KLAJLI& @ARDIRI Unbound Invocation I can open .doc I need to open files this .doc file. Anyone? I can open .doc files Invocation Framework I can open .png files Cards !  embeds a screen from target !  instead of launching the full app !  no App Grid presence !  supports peeking !  a leap ahead of the competition !  BlackBerry 10 Flow at its best! !  invoked in the same way! BlackBerry 10
  • 11.
    moosecon - @KLAJLI& @ARDIRI Card Styles !  Three styles !  Composer !  Previewer !  Picker !  Determines !  Peek behavior !  Transition style Application Packaging •  cannot directly access files of Sandbox other applications •  use the development mode to data see your application sandbox logs •  only place user visible files (across device) in shared area tmp app Application Installation shared User Shared BlackBerry 11
  • 12.
    moosecon - @KLAJLI& @ARDIRI Application need to request resource access in the bar- descriptor.xml file Application Signing BAR Request Half Signed Sign with RIM Signature Developer Certificate BAR Signed BAR BlackBerry 12
  • 13.
    moosecon - @KLAJLI& @ARDIRI BlackBerry 10 Foundations Platform APIs & Core Packages Android Native Web AIR Player Runtime Runtime Runtime Application BBM™ Application Infrastructure Payment Advertising Push Data Notification Phone Platform Service Invocation Share Calendar Contacts Messages Tasks … Configuration Cascades Search Config Balance Backup / Lifecycle Utilities i18n Instrument n … Restore System Service Authenticatio Navigator Installer Launcher Multimedia SQLite NFC n Window WebKit Protocols Network DRM Crypto … Manager OS Memory Process Power Device IPC File System … Management Management Management Drivers NATIVE SDK BlackBerry 13
  • 14.
    moosecon - @KLAJLI& @ARDIRI Native SDK OSS & Developer Experience Native SDK Hello World #include <stdio.h>! #include <stdlib.h>! int ! main(int argc, char **argv)! {! fprintf(stdout, “Hello World!n”);! return EXIT_SUCCESS;! }! BlackBerry 14
  • 15.
    moosecon - @KLAJLI& @ARDIRI 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! }! }! BlackBerry 15
  • 16.
    moosecon - @KLAJLI& @ARDIRI 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 Open Industry Standards BlackBerry 16
  • 17.
    moosecon - @KLAJLI& @ARDIRI Native SDK Open Source Support CASCADES SDK BlackBerry 17
  • 18.
    moosecon - @KLAJLI& @ARDIRI Cascades SDK OSS & Developer Experience Mature C++ application framework Good APIs Signals and Slots Many help classes QML QtGui Cascades BlackBerry 18
  • 19.
    moosecon - @KLAJLI& @ARDIRI BLACKBERRY 10 CASCADES DEMO Cascades SDK Hello World import bb.cascades 1.0 Page { content: Label { text: "Hello World" } } BlackBerry 19
  • 20.
    moosecon - @KLAJLI& @ARDIRI Cascades SDK Hello World Page* root = new Page; Label* label = Label::create() .text("Hello World"); root->setContent(label); Application::instance()->setScene(root); 60 FPS! BlackBerry 20
  • 21.
    moosecon - @KLAJLI& @ARDIRI App logic UI in separate thread 28° Cascades Photos by rumpleteaser and whologwy Flickr Scene Graph Root Container RotationZ Hello World Scale Opacity Container Text: “Hello World” BlackBerry 21
  • 22.
    moosecon - @KLAJLI& @ARDIRI R6#'.$+ Qt uses signals & slots paradigm Cascades events are mapped to Qt signals S('1*-'F+T&"@A+R6#'.$+-'+!H<+ Container { onTouch: { if (event.isDown()) { scaleX = 2; scaleY = 2; rotationZ = 45; } else if (event.isUp()){ scaleX = 1; scaleY = 1; rotationZ = 0; } } }+ BlackBerry 22
  • 23.
    moosecon - @KLAJLI& @ARDIRI S('1*-'F+T&"@A+R6#'.$+-'+BUU+ QObject::connect(bubble,SIGNAL touched(bb::cascades::TouchEvent *t) (touch(bb::cascades::TouchEvent*)) { this,SLOT if (t->isDown()) { (touched(bb::cascades::TouchEvent*)) 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 BlackBerry 23
  • 24.
    moosecon - @KLAJLI& @ARDIRI >'-0(%&'$+ 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 BlackBerry 24
  • 25.
    moosecon - @KLAJLI& @ARDIRI B"$.&0+B&'.3&*$ SpeedGauge Container DockLayout RotationZ (-0) RotationZ (-40) TranslationY TranslationY (30) (30) Custom list items BlackBerry 25
  • 26.
    moosecon - @KLAJLI& @ARDIRI Data Binding SQL XML JSON Anything StackLayout & DockLayout BlackBerry 26
  • 27.
    moosecon - @KLAJLI& @ARDIRI Pages, Panes and Navigation UI Guidelines developer.blackberry.com/ui BlackBerry 27
  • 28.
    moosecon - @KLAJLI& @ARDIRI Thank You Aaron Ardiri AARDIRI@blackberry.com twitter: @ARDIRI Kamel Lajili KLAJILI@blackberry.com twitter: @KLAJILI BlackBerry 28