Top Banner
Kaminda Dimunge | SENIOR STAFF ENGINEER ZEBRA TECHNOLOGIES LANKA (PVT) LTD API Design Concepts for Device Programming
22
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: API Design Concepts for Device Programming

Kaminda Dimunge | SENIOR STAFF ENGINEERZEBRA TECHNOLOGIES LANKA (PVT) LTD

API Design Concepts for Device Programming

Page 2: API Design Concepts for Device Programming

Agenda

• Overview• API Types• Qualities of API• Configuration Models• Architecture• Design Considerations

2

Page 3: API Design Concepts for Device Programming
Page 4: API Design Concepts for Device Programming

Analogy of API design

Every car has a steering wheel, brake pedals, and an accelerator. You might find that hazard lights, the trunk release, or radio are slightly different, but it’s rare that an experienced driver can’t figure out how to drive a rental car.

-The authors of APIs: A Strategy Guide (Daniel Jacobson, Greg Brail, Dan Woods)

4

Page 5: API Design Concepts for Device Programming

What is an API?

In computer programming, an application programming interface (API) is a set of routines, protocols, and tools for building software applications. …

-Wikipedia

5

Page 6: API Design Concepts for Device Programming

6

Device Types

Mobile Devices

Control Sys-tems

Home Appli-ances

Public Safety

Healthcare De-vices

Wearable Devices

Automotive Comput-ers

Page 7: API Design Concepts for Device Programming

Consider…

• Contains a display or not• Limited memory and processing

power• Input output• Stand-alone or connected• Communication secured or not• Security, safety compliances required • …

7

Page 8: API Design Concepts for Device Programming

8

What can API do with devices?

• Get something done – Read a barcode

• Listen or monitor – Oil temperature of en-gine

• Watch – Is my dog eating the couch?

• Configure – Room temperature

• …

Page 9: API Design Concepts for Device Programming

API Types

• Classic API – Common local APIs

• Design Time Controls – Like Button control

• Web APIs – Browser plug-ins etc.

• Provisioning and Staging APIs – for mass deployment, device profiling, licensing

• Software Wedge – Zero programming

• …

9

Page 10: API Design Concepts for Device Programming

Internet of Things (IOT)

Page 11: API Design Concepts for Device Programming

Qualities of API

• Learnability-Easy to learn, self descriptive, help, developer guide, wizards, IDE support, add-ons, plug-ins, intellisense, samples

• Usability-Key classes, patterns

• Robustness-Boundary checks, Type verification

• Performance-Actions within duration, memory, processor

• …• Eventually DX, UX

11

Page 12: API Design Concepts for Device Programming

Design Patterns

-Head First Design Patterns By Eric Freeman, Elisabeth Freeman, Bert Bates, Kathy Sierra

12

Page 13: API Design Concepts for Device Programming

Configuration Models

Applications

Device

Device

Applications

Host

Connectivity

13

Page 14: API Design Concepts for Device Programming

Standards

• Unified POS-OLE POS, Java POS, POS for .NET

• Web Services POS-WS-POS

• MagStripe Track Decoding-Master Card, Amex, Loyalty Card

• Barcode Label Types-Dutch Postal, PDF 417, UPC

• NFC, SmartCard, Payment etc.-NFC Type1, NFC Type 2, Memory Cards, CMU/MPU Cards

14

Page 15: API Design Concepts for Device Programming

API Architecture

Connectivity

API Layer

Application

Device

Architecture 1

Service Layer

API Layer

Application

Device

Architecture 2

Application

Host

API Layer

Device

Architecture 1

15

Page 16: API Design Concepts for Device Programming

Tunnelling, Active and Passive

Application 1

Application 3

Application 2 Host

Scanner 1

Scanner 2

Scanner 3

16

Page 17: API Design Concepts for Device Programming

API Security

• Does your API only do what is intended?

• Is it accepting only the data as designed?

• Do you have any hidden APIs for internal with root access?

• Encryption and authentication adequate?

• …17

Page 18: API Design Concepts for Device Programming

Concurrency

18

Page 19: API Design Concepts for Device Programming

Synchronous vs. Asynchronous

• Limitations on synchronization• Avoid misuse• Mitigate delay and block

19

Page 20: API Design Concepts for Device Programming

API Compatibility

• Application development contracted to outside companies

• Changes are costly– Positive test, Negative test, Stress test, Etc.– Deploy into thousands of devices in many

geographically different locations– User training

• Backward compatibility and forward compatibility

20

Page 21: API Design Concepts for Device Programming

Compatibility

21

Page 22: API Design Concepts for Device Programming

Thank You