wearables + azure development

79

Upload: andri-yadi

Post on 15-Jul-2015

400 views

Category:

Technology


1 download

TRANSCRIPT

Please tweet photos or post to Instagram with hashtag #GlobalAzure #GlobalAzureBandung

All collected photos: http://bit.ly/globalazurebandung

Powered by http://jepret.in

SPONSORED BY

ORGANISED BY

Education

AZURE DEVELOPERI N D O N E S I A

SUPPORTED BY

Andri Yadi@andri_yadi | a at dycode dot com

http://andriyadi.me

CEO of

7 years in a row

The first & largest iOS & OSX developer community in Indonesia

ID-Objective-CPresident

Wearables + Azure Development

Assumed, most of you are all coders!

Disclaimer

Remember this?

Smart Watches

Smart Wristbands

Smart Glasses

Wearable cameras

Virtual Reality

holographic computing

Smart CLOTHES

Smart Hats

Pet GPS Tracker

???

Simply put, wearable is..

Putting computer on your face, arm, neck, foot, shirt…

Wearable (obviously), invisible* Targeted (limited) capabilities Have (limited) computing unit (Mostly) not standalone Programmable, yay!

What they have in common

Common development Challenges

Fragmentation Limited capabilitySuch as: no direct internet connectivity Limited APINew technology, most APIs are in development Too much relies on “host” machine

Market

$12 billion by 2018 78% annual growth rate

http://www.statista.com/statistics/259372/wearable-device-market-value/http://sproutsocial.com/insights/wearables-technology-social-media/

http://www.statista.com/chart/3370/wearable-device-forecast/

42% prefer Smart watch/band

3 MILLION SALESin 2 weeks

estimated

so, today I only talk about developing for smartwatch -

Apple Watch

Disclaimer

Intro to WatchKit Backend service with AzureConnecting watch app to Azure backend

for 50 mins, we’ ll cover…

Apple WatchDevelopment stuffs

Let’s start with…

Apple Watch

What is Apple Watch app?

iOS app extension running on iOS + set of UIs running on Watch

Apple Watch App cannot run standalone

without iPhone

iPad is not supported yet!

http://developer.apple.com/ios

iOS 8.2

we need…

WatchKit

WatchKit App

Storyboard

Resources

iOS App

WatchKit Extension

Code

ResourcesBluetooth

So, you can’t develop for Apple Watch without

learning iOS development

Required StuffsRequired Stuffs

iOSin form of Xcode

Latest

Xcode iOS & Watch Simulator iOS Developer Library

iOS

Optional Stuffs

Actual devices

WatchKit development stuffs

[Obj-C]

Objective-C Swift

Should know

or

Not Taylor Swift..

Note, I’m a fan :)

Model-View-Controller design pattern

Model View

Controller

Should understand

CoreFoundation Extensions WatchKitUIKit

Foundation

PushNotification

Few iOS frameworks you should know

Handoff

AccelerateAccounts

AddressBook

AddressBookUI

AdSupport

AssetsLibrary

AudioToolbox

AudioUnit

AVFoundation

AVKitCFNetwork

CloudKit

CoreAudio

CoreAudioKit

CoreBluetooth

CoreData

CoreFoundation

CoreGraphics

CoreImage

CoreLocation

CoreMedia

CoreMIDI

CoreMotion

CoreTelephony

CoreTextCoreVideo

EventKitEventKitUI

ExternalAccessory

Foundation

GameController

GameKit

GLKit

GSS

HealthKit

HomeKit

iAd

ImageIO

IOKit

JavaScriptCore

LocalAuthentication

MapKit

MediaAccessibility

MediaPlayer

MediaToolbox

MessageUI

Metal

MobileCoreServices

MultipeerConnectivity

NetworkExtension

NewsstandKit

NotificationCenter

OpenAL

OpenGLES

PassKit

Photos

PhotosUI

PushKit

QuartzCore

QuickLook

SafariServices

SceneKit

Security

Social

SpriteKit

StoreKit

SystemConfiguration

Twitter

UIKitVideoToolbox

WebKit

Backend with Microsoft Azure

Clie

nt la

yer

(on-

prem

ises

)

Tablet PhoneGames consolePC

On-premises databaseBrowserOffice Add-in

On-premises service

ADMultifactor Authentication

Acc

ess

Cont

rol

Laye

r In

tegr

atio

n

laye

r

Service Bus CDNBizTalk Services

Traffic Manager

Virtual Networks Express Route

App

licat

ion

laye

r

API Mgmt Web AppsCloud ServicesVMMobile Apps Media Services

Notification Hubs Scheduler Automation

Dat

a La

yer

Storage Blobs Tables Queues DataMachine Learning HD Insight

Backup and RecoverySQL Database Caching StorSimple

API Apps

Logic Apps

Microsoft Azure Services

So, what’s the options?

Deploy your backend code on a Virtual Machine

Deploy your backend code on a Cloud Service

Create App Service instance, e.g. using Mobile App type

API APPSEasily build and consume APIs in

the cloud

WEB APPSWeb apps that scale with your

business

LOGIC APPSAutomate business process

across SaaS and on-premises

MOBILE APPSBuild Mobile apps for any device

Azure App Service

Storage

Authentication

Logic

Push

Scheduler

Azure App Service - Mobile App

Try App Service: https://tryappservice.azure.com

Free

No Signup or Account Required

60

+

as easy as…

adding WindowsAzureMobileServices.framework

to your project

App Service Mobile app with ios

Demo

WatchKit + Azure App Service?

???Internet

WatchKit App

Storyboard

Resources

iOS App

WatchKit Extension

Code

Resources

Internet

Bluetooth

Azure App Service

iOS App

WatchKit Extension

Code

Resources

Internet

Bluetooth

Azure App Service

application(application: UIApplication, handleWatchKitExtensionRequest userInfo: [NSObject : AnyObject]?, reply: (([NSObject : AnyObject]!)

WKInterfaceController.openParentApplication() Internet

Azure App Service or any backend

service

[“action": “loadTasks"]

[“data": task dictionary array,

“error”: “error string”]

WatchKit Extension & iOS app communication

WatchKit Extension iOS App

Calling “openParentApplication” on WatchKit extension side will be handled by “handleWatchKitExtensionRequest” on iOS app side.

WatchKit Extension & iOS app communication - loading tasks

WKInterfaceController.openParentApplication(["action": "loadTasks"], reply: { (replyInfo, error) -> Void in if error != nil { //do something about error } let replyDict = replyInfo as [NSObject : AnyObject] if let errorMsg = replyDict["error"] as? String { if !errorMsg.isEmpty { //do something about error return } } self.records = replyDict["data"] as! [Dictionary<String, AnyObject>] self.configureTable() //reload table })

func application(application: UIApplication, handleWatchKitExtensionRequest userInfo: [NSObject : AnyObject]?, reply: (([NSObject : AnyObject]!) -> Void)!) {

if let userInfo = userInfo { if let action = userInfo["action"] as? String { if action == "loadTasks" { println("userInfo: \(userInfo)") //do load tasks from Azure loadTasks (reply) } else if action == "completeTask" { if let data = userInfo["data"] as? Dictionary<String, AnyObject> { //update data to Azure completeTask(data, reply: reply) } } } } }

WatchKit Extension side - InterfaceController.swift iOS app side - AppDelegate.swift

What about Android Wear?

Not that different!

WatchKit app Accessing Azure Demo

What Next?

Slide + Source code: http://andriyadi.me

Get started with AzureVisit azure.com

Free trial! worth $200 Or create temporary service: https://trywebsites.azurewebsites.net

https://github.com/Azure-Readiness/DevCamp

https://developer.apple.com/watchkit/

Deep dive training?http://edu.dycode.co.id | [email protected]

+ + [Obj-C]

+

Education

a leading mobile & web apps developer, an educator, an early

adopter, an award-winning company

DyCode www.dycode.com

office at dycode dot com | @dycode

Thanks