mobile application architecture
TRANSCRIPT
![Page 1: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/1.jpg)
Is there such a thing as architecture design for mobile applications?
Christos Matskas
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
![Page 2: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/2.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
New Era
![Page 3: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/3.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
HelloI’m Christos
christosmatskas cmatskas https://cmatskas.com
![Page 4: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/4.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
![Page 5: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/5.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
![Page 6: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/6.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Side Projects
![Page 7: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/7.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
![Page 8: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/8.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
architectureˈɑːkɪtɛktʃə/noun: architecture1.the art or practice of designing and constructing buildings."schools of architecture and design“
• the style in which a building is designed and constructed, especially with regard to a specific period, place, or culture.plural noun: architectures"Georgian architecture" 2. the complex or carefully designed structure of something."the chemical architecture of the human brain"• the conceptual structure and logical organization of a computer or computer-based system.
![Page 9: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/9.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
What is Software Architecture?
![Page 10: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/10.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Refactoring?
![Page 11: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/11.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Refactoring?
![Page 12: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/12.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Big Ball Of Mud ™
![Page 13: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/13.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
![Page 14: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/14.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Confident?
![Page 15: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/15.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Why does it matter?
• Quality• Performance• Maintainability
![Page 16: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/16.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Refactoring
![Page 17: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/17.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Speed
![Page 18: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/18.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Cost
![Page 19: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/19.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Mob App Development Platforms
3 MADPs for building apps:• Native• Web• Hybrid
![Page 20: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/20.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Native DropBox
![Page 21: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/21.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Hybrid
Uber
![Page 22: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/22.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Mobile Web
Google Maps
![Page 23: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/23.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Native Apps - Assessment
Pros• Best performance• Fast, fluid UI • Full access to the platform's capabilities• Monetization – App StoreCons• High cost of development• Updates require full deployment on each platform
![Page 24: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/24.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Hybrid Apps - Assessment
Pros• Good performance but not as good as hybrid• Fast development cycle as it's easy to create cross platform
apps• Allows monetization as they can be deployed in the app storeCons• Occasionally connected Internet access is required• Updates require deployment on each platform• Mostly full compatibility through the use of plugins (not
100%)
![Page 25: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/25.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Web Apps - AssessmentPros• Good performance - it's a web page• Very fast development cycle• Consistent UI across all platforms• Easy to deployCons• Very hard to monetize - no app store option• Requires internet access• Web browsers may have different behaviour and performance• No access to the underlying hardware issues
![Page 26: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/26.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Development Tools
Native• xCode, Android Studio, Eclipse, Visual Studio etc
Native & Hybrid• Ionic, AppBuilder, Cordova, Silver, FuseTools,
Xamarin Studio etc
Platform agnostic tools• Sublime, Visual Studio Code, Web Developer tools
![Page 27: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/27.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Architecture principles
Sound familiar?
• Meet best practices• Minimize costs• Minimize maintenance requirements• Usability• Extensibility
![Page 28: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/28.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Separation of Concerns
![Page 29: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/29.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Single Responsibility
![Page 30: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/30.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Principle of Least Knoweldge
![Page 31: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/31.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Don’t Repeat Yourself
![Page 32: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/32.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
No Bid Design Upfront (BDUF)
![Page 33: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/33.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Composition over Inheritance
![Page 34: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/34.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Suggestions
• Logical layers• No mixing of components in same layer• Strict vs relaxed layering• Abstraction for loose coupling• Don’t overload component functionality• Consistency of data formats• Abstract Cross-cutting code• Consistent naming conventions• Exception handling standards
![Page 35: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/35.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Composition over Inheritance
![Page 36: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/36.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Composition over Inheritance
![Page 37: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/37.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Composition over Inheritance
![Page 38: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/38.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Mobile Architecture Design
![Page 39: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/39.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Authentication & Authorization• Occasionally connected scenarios • 3rd party authentication services• Authentication and authorization over a
virtual private network (VPN) • Security Model Differences
![Page 40: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/40.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Caching
• Caching unnecessary data• Cached data in occasionally connected scenarios • Inappropriate cache locations and formats • Caching sensitive data in unencrypted form • Failing to choose an appropriate caching
technology• Failing to implement caching alltogether
![Page 41: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/41.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Communications• Failing to protect sensitive data over the air (HTTPS anyone?)• Failing to secure web service communication• Failing to secure communication over a VPN • Performance impact of communication security on limited-bandwidth
connections (https compression)• Not managing limited-bandwidth connections efficiently • Not managing connections to multiple network services efficiently • Not designing to work with intermittent connectivity • Not considering connection costs or allowing users to manage
connections WiFi / 3-4G• Not designing to minimize power usage when running on battery power
(this relates to managing background tasks efficiently)• Failing to use the appropriate communication protocol
![Page 42: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/42.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Configuration Management• Failing to restore configuration state after a reset. • Failing to consider configuration management synchronization
over the air (e.g. Windows has roaming settings)• Failing to consider configuration management synchronization
with the host PC (is the application truly x-plat?)• Choosing an inappropriate format for configuration information
(using a local db file when you could be using a simple json file to store the settings)
• Failing to protect sensitive configuration information (encrypting sensitive data is of major importance)
• Failing to consider the platform differences when using configuration settings
![Page 43: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/43.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Data Access
• Data-access mechanisms that work with intermittent connectivity
• Database access performance (especially if the data is large)
• Navigating through large datasets when not required • Failing to consider appropriate replication technologies
and techniques • Failing to consider access to device database services• Failing to consider different authentication mechanisms• Failing to consider data integrity and consistency
![Page 44: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/44.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Hardware - Devices
• Failing to consider device heterogeneity, such as screen size, CPU power and RAM
• Not presenting user-friendly error messages consistent with the platform
• Failure to consider the processing power of the device
![Page 45: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/45.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Exception Management
• Not recovering application state after an exception • Revealing sensitive information to the end user • Not logging sufficient details about the exception • Using exceptions to control application flow
![Page 46: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/46.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Logging
• Not considering remote logging instead of logging on the device (plenty of 3rd party services)
• Not considering how to access device logs • Not considering resource constraints when logging
(connectivity, service down etc)• Failing to protect sensitive information in the log files
(common error both in desktop/web and mobile apps)
• Not considering logging for monitoring user engagement and proactive bug fixing
![Page 47: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/47.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Synchronization
• Failing to secure synchronization when communicating
• Failing to manage synchronization options over the air (wifi, 4g, both)
• Failing to manage synchronization interruptions • Failing to handle synchronization conflicts • Failing to consider merge replication where
appropriate • Failing to consider 3rd party services for managing
data synchronization
![Page 48: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/48.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Testing
• Failing to implement comprehensive tests• Failing to appreciate debugging costs when
choosing to support multiple device types • Failing to design with debugging in mind; for
example, using emulators instead of the actual devices
• Failing to debug in all connection scenarios • Failing to consider automated testing frameworks
and associated costs
![Page 49: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/49.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
UI/UX
• Not considering the restricted UI form factor • Not considering the single window environment • Not considering that only one application can be running • Not designing a touch-screen or stylus-driven UI for
usability • Not including support for multiple screen sizes and
orientations • Not managing device reset and resume • Not considering the limited API and reduced range of UI
controls compared to the desktop
![Page 50: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/50.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Security
• Failure to understand the exact security requirements
• Failure to adequately secure persisted application data
• Failure to secure all communications with 3rd party services
• Failure to capture and log what constitutes unusual or suspicious activity on a device
• Failure to protect against reverse engineering
![Page 51: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/51.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
![Page 52: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/52.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
![Page 53: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/53.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
![Page 54: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/54.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
![Page 55: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/55.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
![Page 56: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/56.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
![Page 57: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/57.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
![Page 58: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/58.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Mobile Application?
![Page 59: Mobile application architecture](https://reader033.vdocuments.site/reader033/viewer/2022050614/5888a4ba1a28ab264b8b67d1/html5/thumbnails/59.jpg)
Join the conversation on Twitter:@SoftArchConf #SoftwareArchitect2015
Architecture Design?