Meeting C++ 2013
UI Prototyping and
Development Across Multiple
Devices with C++
Meeting C++ 2013
First off, what is a device?
Anything with a CPU, memory, and RTOS (embedded device)
AND with display, and input (mobile devices)
AND An app ready operating system (iOS/Android/Windows/etc.)
Meeting C++ 2013
It’s all about the Client
Meeting C++ 2013
Meeting C++ 2013
When will Tablets surpass Notebooks?
10
Meeting C++ 2013
Apps for every device
http://www.smartinsights.com/mobile-marketing/mobile-marketing-analytics/mobile-marketing-statistics/
Meeting C++ 2013
2013+
Meeting C++ 2013
So is C++
Meeting C++ 2013
C++ is perfect for these apps…
C++ is a cross-platform language
There are C++ compilers for every single (relevant) device out there
C++ is particularly well suited for embedded devices
Meeting C++ 2013
Native is Key for Client Device UX
15
Servers Client Devices
Code Safety & Protection is Paramount Ability to Scale Performance via HW Web UX typically network bound
UX Performance is Paramount Fixed/Deployed HW Profiles UX typically HW bound
Meeting C++ 2013
Why isn’t C++ used on all devices then?
Some developers view it as too complicated
Although there is a language and library standard there are a lot of differences in that level of
support across platforms
There is no standard User Interface controls specification
Meeting C++ 2013
C++ is being used in a hybrid way
Developers with a C++ source code base keep app logic in C++
For presentation layer, use provided APIs in provided language
Objective-C / Cocoa Java / Dalvik
Meeting C++ 2013
Presentation Layer
Presentation Layer
Typical Application Architecture
Business Layer
Business Layer
Data Access Layer
Meeting C++ 2013
Current multi-device C++ strategy
C++ Source Code
C++ Source Code
iOS
iOS AndroidAndroid BlackBerry
10
BlackBerry
Meeting C++ 2013
Current multi-device C++ strategy
C++ Source Code
C++ Source Code
iOS
iOS AndroidAndroid BlackBerry
10
BlackBerry
10 WinRTWinRT
Presentation Layer
Meeting C++ 2013
Current multi-device C++ strategy
C++ Source Code
C++ Source Code
iOS
iOS AndroidAndroid BlackBerry
10
BlackBerry
10 WinRTWinRT
Meeting C++ 2013
The Traditional Approach for Targeting Multiple Devices
Meeting C++ 2013
Current multi-device C++ strategy
C++ Source Code
C++ Source Code
iOS
iOS AndroidAndroid BlackBerry
10
BlackBerry
10 WinRTWinRT
Meeting C++ 2013
Current multi-device C++ strategy
C++ Source Code
C++ Source Code
iOS
iOS AndroidAndroid BlackBerry
10
BlackBerry
10 WinRTWinRT
Meeting C++ 2013
25
The C++Builder Native Multi-Device Approach
Meeting C++ 2013
UI Design and Visual
Prototyping
Meeting C++ 2013
Meeting C++ 2013
Visual Designer
Provides a design surface for the layout of UI controls
Allows modification of design time properties Creates event handlers for common events Displays live or prototype data in designer
Meeting C++ 2013
Meeting C++ 2013
Application Frameworks
C + + ( O W L ) Windows Encapsulation Inheritance Multiple-Inheritance v-tables Fields Pure-code generation Delphi/C++ (FM) Windows Encapsulation Delegation Method Pointers (closures) Properties Text file formStreaming-system RTTI
Meeting C++ 2013
Modern Language Features
Property-Method-Event
Automatic Reference Counting Interfaces
Attributes
Generics/Collections
Anonymous Methods (Lambda functions/closures) Rich RTTI (introspection/reflection)
Meeting C++ 2013
RTTI and PME extensions
__classid__delphirtti __closure __property __published
Meeting C++ 2013
Meeting C++ 2013
Native CPU/GPU Application Platform
Compile C++ natively to Windows, Mac, and iOS *
Application, database, and animation are CPU powered All UI, graphics, and effects are GPU powered
Meeting C++ 2013
HD Forms
High performance GPU powered scalable vector UIs, Bitmapped Controls, and Native Conrols Mutliple resolutions on any device
Hundreds of visual UI components GPU based style engine to control UI look and feel HUDs with transparencies and transition effects
Meeting C++ 2013
3D Forms
GPU powered 3D forms
Hardware based lighting, textures, and animation 3D Forms can contain HD UI elements and effects
Meeting C++ 2013
Effects and Animation
50+ Photoshop-like GPU effects
Simultaneous multiple effects without performance hit Path based animation for all HD and 3D UI and graphics
Meeting C++ 2013
Applications that Connect Everywhere
High-speed connectivity to popular databases
Multi-tier applications Clients on multiple computers and devices
Connect to the world of data, services,
Meeting C++ 2013
Application Prototyping
• Design and prototype your application using sample data from the TPrototypeBindSource
component
• Add a ClientDataSet component to your form and load your actual data
• Simply select all of your bindings and change the data source to use your real data in your
Meeting C++ 2013
FireMonkey on Android and iOS
“Native” and Custom Styles True Native Apps
Meeting C++ 2013
Cross compilation and Packaging
App Sources
App Sources
FM Framework
FM Framework
Cocoa SDK
Cocoa SDK Native Developer KitNative Developer Kit
.app in IPA
Meeting C++ 2013
Meeting C++ 2013
Native controls
Message alerts Custom Picker Date Picker Phone Dialer iOS KeyboardsText Editing for TMemo and TEdit
Meeting C++ 2013
Layout Management
Alignment Anchors
Form Family for loading the
correct form depending on the target device when developing different forms for phones vs
Meeting C++ 2013
TImage has been updated with MultiResBitmap property 1x and 2x options are shown by default
Easily add your own resolutions, i.e. 1.5x, 3x etc.
46
Meeting C++ 2013
Gestures
S w i p e T a p P i n c h & Z o o m T a p & H o l d D o u b l e -T a pMeeting C++ 2013
Media Library Actions
•Accessing the Camera App
•Accessing the Camera Roll
•Sharing content i.e. photos via Message
(SMS), Mail, Facebook, Twitter etc.
•Slide Transitions for Tabs
Meeting C++ 2013
Sensor Components
Location Sensor (GPS)
Motion Sensort (Accelerometer)
Orientation Sensor (Gyroscope)
Meeting C++ 2013
Camera
Provides access to camera sensors: activate flash
get sensor position etc. access front/back camera take pictures/video
Meeting C++ 2013
Location Service / GPS Sensor
•Get location of your iOS device using latitude and longitude
•Use Reverse Geocoding to convert location data to a readable address
•Works across Win/Mac/iOS
•Can be used with the WebBrowser component to display a location on the map
Meeting C++ 2013
Mobile Services
Notification Center ... and more
Meeting C++ 2013
Client Devices MBaaS
Enterprise Backend DataSnap MEAP N-tier
Meeting C++ 2013
Review of objections
C++ is too complicated
Too many differences between platforms for C++ support
Meeting C++ 2013
Embarcadero’s Approach
C++ is too complicated C++11
Visual Design/Prototyping
Automatic Reference Counting Common User Interface
Meeting C++ 2013
Embarcadero’s Approach
Too many differences between platforms for C++ support
Common toolchain (CLANG/LLVM)
Common STL (Dinkumware) across platforms Same development environment and process for targeting all platforms
Meeting C++ 2013
Embarcadero’s Approach
Too many differences between platforms for C++ support
Common toolchain (CLANG/LLVM)
Common STL (Dinkumware) across platforms Same development environment and process for targeting all platforms
Meeting C++ 2013
Embarcadero’s Approach
No common User Interfaces FM
Styled and Native Controls
Common layout management OS specific look and feel