SlideShare a Scribd company logo
API ARCHITECTURE FOR MOBILE
APPS
ROD HEMPHILL
MELBOURNE APP DEVELOPMENT
PROBLEM STATEMENT
• Management Advantage Pty Ltd provides administration and other solutions
for aged care facilities in Australia.
• There core system is an Entity Framework desktop Aged Care administration
system.
• They had an existing API built for their staff mobile app and needed to:
• provide an API to a new mobile app to support family members of clients, and
• an API to support third parties to provide other solutions such as catering and
maintenance.
• How do you do this?
THE CORE SYSTEM
• An extensive solution providing:
• client administration,
• ACFI appraisals,
• Medicare claims,
• client care,
• client assessments,
• care planning,
• progress management,
• graphical charting,
• client, management and healthcare professional communications,
• facilities maintenance,
• compliance audits,
• employee management,
• police checks,
• courses and certificate management,
• invoicing,
• banking
….. It’s big and comprehensive.
• Entity Framework .Net system using Forms, SQL Server with about 1500 tables.
STAFF APP
• Intended for client support staff to provide the following services:
• Record chart information (e.g. blood glucose level, heart rate etc)
• Provide staff with client personal information (e.g. life story, family details)
• Evacuation Aid
• ACFI reporting
• Activity events management (e.g. Bingo attendance)
• Xamarin Forms, Android and iPhone, oAuth session based authentication.
• Uses the camera.
• 60 pages, 3 graphic charts using telerix.
• Sqlite database with 117 tables.
• Designed to work offline hence keeps a copy of large amounts of operational data.
One medium sized client has 27,800 records stored locally and kept in sync.
FAMILY APP
• For family members of clients to communciate with health care professions, see
what their parents activities, provide feedback and maintenance request.
• Xamarin Forms, 17 pages.
• Social media and standard session based oAuth authetication.
• Push notifications, camera support.
• Sqlite with 20 tables, and a small volume of data.
• Firebase Deep Linking onboarding.
API FOR THIRD PARTY ACCESS
• Generic API for third party access to data.
• Uses: Catering services, facilities maintenance.
• Issued encrypted security key access.
• Continually growing.
DIFFERING REQUIREMENTS
Staff App Family App 3rd Party Access
Speed of transfer ✔ ✔
Volume of data optimisation ✔
Data synchronisation (always in sync) ✔ ✔
Simplistic flat data formats ✔
Ever evolving functionality ✔
New interfaces ✔
Require stable interfaces ✔
Maintainability ✔ ✔ ✔
API DESIGN CONSIDERATIONS
1. Maintainability, extensibility, expandability.
2. Security
3. Version control.
4. Data volume optimisation.
5. Speed performance.
1. MAINTAINABILITY
Single or many API’s?
• Originally one for apps and one for 3rd party API.
• Now a single API.
• The architecture is complex, but the real maintenance is the functional changes.
REST
• Inherently flexible.
• Supports flat and hierarchic data.
• Internal systems can compromise flexibility for redundant data.
• You will need to pass parameters to handle complexity. We use “App-Name”.
2. SECURITY
Differing options:
• Flat private key.
• Hashed private / public key. (Used for high security currency transations).
• Username/Password session based.
• Username/Password initiated oAuth, with sessions.
Management Advantage Chose:
• Flat private key for 3rd party
• Username/Password initiated oAuth with sessions.
• Use Https.
3. VERSION CONTROL
Servers architecture:
1. Central server per client.
2. Centralised, single version, multi-
tenanted cloud based system.
Problem:
• You don’t have any control when the user
downloads an app.
• The app version could be behind or
ahead of your API.
• Your API could be ahead or behind your
app.
• i.e. your API needs to allow for App
versions that haven’t been written yet.
3. VERSION CONTROL - IMPLEMENTATION
• Learnings:
• Don’t store app versions as strings. Use the inbuilt C# Version class.
• Pass the version of each system in the Request and Response headers.
(e.g. “X-API-VER” and “X-APP-VER”)
• Remember that the App will not know the API version when it first starts a session.
• Default to REST and Json wherever possible. Very forgiving.
• You will need to hard code ‘if tests’ for version numbers in both the API and App.
Ensure you use the [Obsolete] attribute with the version number where possible.
• Where not possible make sure you throw out debug messages when the ‘if tests’ should be
cleaned up.
• Have auto-updating database version control in your apps.
Naming our connection string as “/V1/xxxx” had little value. We use “/API/xxxx”.
4. DATA VOLUME OPTIMISATION
• App needs to separate business logic from data transfer:
• Models support full business logic. (e.g. Client, Address, HCP)
• DTO’s optimised for data transfer. (e.g. ClientDto, AddressDto, HCPDto)
• Optimise Json with “DefaultValueHandling” – don’t transmit nulls.
• LastChangeDate.
https://manad.com.au/api/client?lastChangeDate=20180715T13:10:31.102
• We use a generic process.
Only use server side UTC dates. Never app device dates.
• Server should always send the “RunDate” – don’t rely on record LastUpdatedTimestamp.
4. DATA VOLUME OPTIMISATION (CONT)
• For complex data structures, don’t resend data if already sent.
We created a “DtoSession” class.
ClientDto (recursive structure)
• AddressDto Address
• AddressDto MailingAddress
• List<HCPDto> HCPs
• AddressDto Address
• List<ClientDto> ClientContacts
• AddressDto Address
• (etc)
5. SPEED PERFORMANCE
Considerations:
• Http overhead: A call per record type? One call and fully cascade data?
• Decision came down to what we could run on background threads:
• Initial startup you need data before show a page.
• Ongoing you can show last data and update with ObservableCollections.
• Do you have the Apache “KeepAlive” option?
• Reduced data has marginal effect on transmission performance:
• (802.11b should get at least 100 Mbytes per second)
• Real impact on speed is:
• Optimising your server enquiries.
• Optimising your app processing.
• Minimising the data usually reduces the app processing time.
• ... But may not reduce the server processing time.
5. SPEED PERFORMANCE (CONT)
• We use NewtonSoft JSON which is fully functional:
• Supports streaming for http content.
• Allows us performance tuning options through scheme definitions and direct coding (if required in
the future).
• Compression or not?
• Overhead to compress and decompress outweigh benefits?
• Our research (not tested) said https you get better performance overall.
• We had to do https anyway, but we did not turn on http compression.
QUESTIONS / DISCUSSION
ROD HEMPHILL - MELBOURNE APP DEVELOPMENT

More Related Content

What's hot (18)

PPTX
SharePoint Saturday Silicon Valley - Upgrading from SharePoint 2010 to 2013
Shereen Qumsieh
 
PPTX
Middleware monitoring with Applications Manager
ManageEngine, Zoho Corporation
 
PPTX
Hanover Wireless Update Manager
GordonMcKendry2
 
PPTX
Winter16 release overview of Salesforce
Santosh Kumar - Patna
 
DOC
JohnMcAnespieResume2015
John McAnespie
 
PDF
Solution Manager 7.2 SAP Monitoring - Part 3 - Managed System Configuration
Linh Nguyen
 
PPTX
Mainframe VUG Presentation April 2016
Serena Software
 
PPTX
Ladies Be Architects - Integration - Multi-Org, Security, JSON, Backup & Restore
gemziebeth
 
PDF
(ATS4-PLAT03) Balancing Security with access for Development
BIOVIA
 
PDF
[UC4] Version and Automate Everything
Perforce
 
PDF
S/4HANA Installation Quickstart Guide and Monitoring S/4HANA
Linh Nguyen
 
PDF
Pune meetup 16 feb 2019
Santosh Ojha
 
PPTX
Advanced Motion Control: Using the New 1500TF Processor and Siemens LAxis Lib...
DMC, Inc.
 
PPTX
SAP License Audit Process
AuditBot SAP Security Audit
 
PPTX
External identity
Son Nguyen
 
PPT
Showcase_Intern
Vishwanarayan Sriganesh
 
PPTX
Sahi
Sohail Ahmed
 
PPTX
E business suite r12.2 changes for database administrators
Srinivasa Pavan Marti
 
SharePoint Saturday Silicon Valley - Upgrading from SharePoint 2010 to 2013
Shereen Qumsieh
 
Middleware monitoring with Applications Manager
ManageEngine, Zoho Corporation
 
Hanover Wireless Update Manager
GordonMcKendry2
 
Winter16 release overview of Salesforce
Santosh Kumar - Patna
 
JohnMcAnespieResume2015
John McAnespie
 
Solution Manager 7.2 SAP Monitoring - Part 3 - Managed System Configuration
Linh Nguyen
 
Mainframe VUG Presentation April 2016
Serena Software
 
Ladies Be Architects - Integration - Multi-Org, Security, JSON, Backup & Restore
gemziebeth
 
(ATS4-PLAT03) Balancing Security with access for Development
BIOVIA
 
[UC4] Version and Automate Everything
Perforce
 
S/4HANA Installation Quickstart Guide and Monitoring S/4HANA
Linh Nguyen
 
Pune meetup 16 feb 2019
Santosh Ojha
 
Advanced Motion Control: Using the New 1500TF Processor and Siemens LAxis Lib...
DMC, Inc.
 
SAP License Audit Process
AuditBot SAP Security Audit
 
External identity
Son Nguyen
 
Showcase_Intern
Vishwanarayan Sriganesh
 
E business suite r12.2 changes for database administrators
Srinivasa Pavan Marti
 

Similar to Architectural considerations when building an API (20)

PDF
Mobile apps & Server Apis, the weak link? par Emanuele Pecorari
Olivier DASINI
 
PPTX
Rapid Application Development with MEAN Stack
Avinash Kaza
 
PPT
API Architecture Summit 2014- APIs: A Mobile Developer's Perspective
Niall Roche
 
PDF
Chris Mathias Presents Advanced API Design Considerations at LA CTO Forum
Chris Mathias
 
PDF
Project Presentation - First Spring
Didac Montero
 
PPTX
A great api is hard to find
Dan Diephouse
 
PDF
Designing your API Server for mobile apps
Mugunth Kumar
 
PPTX
Mobile devices and SharePoint
maliksahil
 
PPTX
Mobile Devices and SharePoint - Sahil Malik
SPC Adriatics
 
PPTX
mobile application project for software engineering student
dagimnega44
 
PPTX
First spring
Didac Montero
 
DOC
Amit Kumar Architect with Web and Angular JS
Amit Kumar
 
PPTX
Our practice of designing and implementing REST-service API for existing system
z-tech
 
PDF
Mobilizing your Existing Enterprise Applications
Nick Landry
 
PPTX
Codestrong 2012 breakout session mobile platform and infrastructure
Axway Appcelerator
 
PDF
TU-Charts Project - First Spring
Didac Montero
 
PPTX
Dev days. windows phone development
Volha Banadyseva
 
PPTX
WebAppseqweqweqweqwewqeqweqweReImagined.pptx
FaisalTiftaZany1
 
PPTX
Scaling APIs: Predict, Prepare for, Overcome the Challenges
Apigee | Google Cloud
 
PPT
Incorporating Web Services in Mobile Applications - Web 2.0 San Fran 2009
Aduci
 
Mobile apps & Server Apis, the weak link? par Emanuele Pecorari
Olivier DASINI
 
Rapid Application Development with MEAN Stack
Avinash Kaza
 
API Architecture Summit 2014- APIs: A Mobile Developer's Perspective
Niall Roche
 
Chris Mathias Presents Advanced API Design Considerations at LA CTO Forum
Chris Mathias
 
Project Presentation - First Spring
Didac Montero
 
A great api is hard to find
Dan Diephouse
 
Designing your API Server for mobile apps
Mugunth Kumar
 
Mobile devices and SharePoint
maliksahil
 
Mobile Devices and SharePoint - Sahil Malik
SPC Adriatics
 
mobile application project for software engineering student
dagimnega44
 
First spring
Didac Montero
 
Amit Kumar Architect with Web and Angular JS
Amit Kumar
 
Our practice of designing and implementing REST-service API for existing system
z-tech
 
Mobilizing your Existing Enterprise Applications
Nick Landry
 
Codestrong 2012 breakout session mobile platform and infrastructure
Axway Appcelerator
 
TU-Charts Project - First Spring
Didac Montero
 
Dev days. windows phone development
Volha Banadyseva
 
WebAppseqweqweqweqwewqeqweqweReImagined.pptx
FaisalTiftaZany1
 
Scaling APIs: Predict, Prepare for, Overcome the Challenges
Apigee | Google Cloud
 
Incorporating Web Services in Mobile Applications - Web 2.0 San Fran 2009
Aduci
 
Ad

Recently uploaded (20)

PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PPTX
Building a Production-Ready Barts Health Secure Data Environment Tooling, Acc...
Barts Health
 
PDF
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
PDF
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PDF
Complete Network Protection with Real-Time Security
L4RGINDIA
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
Building a Production-Ready Barts Health Secure Data Environment Tooling, Acc...
Barts Health
 
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
Complete Network Protection with Real-Time Security
L4RGINDIA
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Ad

Architectural considerations when building an API

  • 1. API ARCHITECTURE FOR MOBILE APPS ROD HEMPHILL MELBOURNE APP DEVELOPMENT
  • 2. PROBLEM STATEMENT • Management Advantage Pty Ltd provides administration and other solutions for aged care facilities in Australia. • There core system is an Entity Framework desktop Aged Care administration system. • They had an existing API built for their staff mobile app and needed to: • provide an API to a new mobile app to support family members of clients, and • an API to support third parties to provide other solutions such as catering and maintenance. • How do you do this?
  • 3. THE CORE SYSTEM • An extensive solution providing: • client administration, • ACFI appraisals, • Medicare claims, • client care, • client assessments, • care planning, • progress management, • graphical charting, • client, management and healthcare professional communications, • facilities maintenance, • compliance audits, • employee management, • police checks, • courses and certificate management, • invoicing, • banking ….. It’s big and comprehensive. • Entity Framework .Net system using Forms, SQL Server with about 1500 tables.
  • 4. STAFF APP • Intended for client support staff to provide the following services: • Record chart information (e.g. blood glucose level, heart rate etc) • Provide staff with client personal information (e.g. life story, family details) • Evacuation Aid • ACFI reporting • Activity events management (e.g. Bingo attendance) • Xamarin Forms, Android and iPhone, oAuth session based authentication. • Uses the camera. • 60 pages, 3 graphic charts using telerix. • Sqlite database with 117 tables. • Designed to work offline hence keeps a copy of large amounts of operational data. One medium sized client has 27,800 records stored locally and kept in sync.
  • 5. FAMILY APP • For family members of clients to communciate with health care professions, see what their parents activities, provide feedback and maintenance request. • Xamarin Forms, 17 pages. • Social media and standard session based oAuth authetication. • Push notifications, camera support. • Sqlite with 20 tables, and a small volume of data. • Firebase Deep Linking onboarding.
  • 6. API FOR THIRD PARTY ACCESS • Generic API for third party access to data. • Uses: Catering services, facilities maintenance. • Issued encrypted security key access. • Continually growing.
  • 7. DIFFERING REQUIREMENTS Staff App Family App 3rd Party Access Speed of transfer ✔ ✔ Volume of data optimisation ✔ Data synchronisation (always in sync) ✔ ✔ Simplistic flat data formats ✔ Ever evolving functionality ✔ New interfaces ✔ Require stable interfaces ✔ Maintainability ✔ ✔ ✔
  • 8. API DESIGN CONSIDERATIONS 1. Maintainability, extensibility, expandability. 2. Security 3. Version control. 4. Data volume optimisation. 5. Speed performance.
  • 9. 1. MAINTAINABILITY Single or many API’s? • Originally one for apps and one for 3rd party API. • Now a single API. • The architecture is complex, but the real maintenance is the functional changes. REST • Inherently flexible. • Supports flat and hierarchic data. • Internal systems can compromise flexibility for redundant data. • You will need to pass parameters to handle complexity. We use “App-Name”.
  • 10. 2. SECURITY Differing options: • Flat private key. • Hashed private / public key. (Used for high security currency transations). • Username/Password session based. • Username/Password initiated oAuth, with sessions. Management Advantage Chose: • Flat private key for 3rd party • Username/Password initiated oAuth with sessions. • Use Https.
  • 11. 3. VERSION CONTROL Servers architecture: 1. Central server per client. 2. Centralised, single version, multi- tenanted cloud based system. Problem: • You don’t have any control when the user downloads an app. • The app version could be behind or ahead of your API. • Your API could be ahead or behind your app. • i.e. your API needs to allow for App versions that haven’t been written yet.
  • 12. 3. VERSION CONTROL - IMPLEMENTATION • Learnings: • Don’t store app versions as strings. Use the inbuilt C# Version class. • Pass the version of each system in the Request and Response headers. (e.g. “X-API-VER” and “X-APP-VER”) • Remember that the App will not know the API version when it first starts a session. • Default to REST and Json wherever possible. Very forgiving. • You will need to hard code ‘if tests’ for version numbers in both the API and App. Ensure you use the [Obsolete] attribute with the version number where possible. • Where not possible make sure you throw out debug messages when the ‘if tests’ should be cleaned up. • Have auto-updating database version control in your apps. Naming our connection string as “/V1/xxxx” had little value. We use “/API/xxxx”.
  • 13. 4. DATA VOLUME OPTIMISATION • App needs to separate business logic from data transfer: • Models support full business logic. (e.g. Client, Address, HCP) • DTO’s optimised for data transfer. (e.g. ClientDto, AddressDto, HCPDto) • Optimise Json with “DefaultValueHandling” – don’t transmit nulls. • LastChangeDate. https://manad.com.au/api/client?lastChangeDate=20180715T13:10:31.102 • We use a generic process. Only use server side UTC dates. Never app device dates. • Server should always send the “RunDate” – don’t rely on record LastUpdatedTimestamp.
  • 14. 4. DATA VOLUME OPTIMISATION (CONT) • For complex data structures, don’t resend data if already sent. We created a “DtoSession” class. ClientDto (recursive structure) • AddressDto Address • AddressDto MailingAddress • List<HCPDto> HCPs • AddressDto Address • List<ClientDto> ClientContacts • AddressDto Address • (etc)
  • 15. 5. SPEED PERFORMANCE Considerations: • Http overhead: A call per record type? One call and fully cascade data? • Decision came down to what we could run on background threads: • Initial startup you need data before show a page. • Ongoing you can show last data and update with ObservableCollections. • Do you have the Apache “KeepAlive” option? • Reduced data has marginal effect on transmission performance: • (802.11b should get at least 100 Mbytes per second) • Real impact on speed is: • Optimising your server enquiries. • Optimising your app processing. • Minimising the data usually reduces the app processing time. • ... But may not reduce the server processing time.
  • 16. 5. SPEED PERFORMANCE (CONT) • We use NewtonSoft JSON which is fully functional: • Supports streaming for http content. • Allows us performance tuning options through scheme definitions and direct coding (if required in the future). • Compression or not? • Overhead to compress and decompress outweigh benefits? • Our research (not tested) said https you get better performance overall. • We had to do https anyway, but we did not turn on http compression.
  • 17. QUESTIONS / DISCUSSION ROD HEMPHILL - MELBOURNE APP DEVELOPMENT