Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Mobile Applications Architecture - GDG Ternopil...

Royce Mars
December 02, 2017

Mobile Applications Architecture - GDG Ternopil' Architecture Components Meetup

Starting from origins of Architecture as discipline, we review strong reasons why and when to create architecture and when not. Analyzing spectrum of efforts, needed to implement certain level of architecture, we are able to make important early decisions about system architecture and it's evolution.
We come over basic principles of building effective, robust systems and clean code - KISS, YAGNI, DRY, SOLID. We overview Clean Architecture and it's implications for Mobile Apps Development.
Reviewing specifics of Android Apps Development, we come to reasoning about common Mobile Architecture Patterns, such as MVC, MVP, MVVM, VIPER, RIBs and relations between them.
Based on 4 levels of Mobile Architecture Complexity, we'll review main "levels" of technology complexity that might be introduced when implementing popular Mobile Architecture Patterns (such as Layers, Views, Dependency Injection, Coordinator Pattern and Reactive Programming).
We will talk about evolution of Mobile Applications Architecture and variations of architecture implementations and frameworks.
We will touch Google Architecture Guidelines, Architecture Components and MVVM pattern implementation in Architecture Components.
At the end of presentation we'll talk about Project Lifecycle and Agile Architecting. We'll see different stages of Project Lifecycle on example of common Startup evolution, see spectrum of efforts and needed Architecture for different stages of project evolution. We'll talk about Minimal Viable Architecture and advices for Startups architecture from Randy Shoup.

Royce Mars

December 02, 2017
Tweet

More Decks by Royce Mars

Other Decks in Programming

Transcript

  1. #mobarchclub Mobile has it’s Specifics image from https://8thlight.com App-hopping OS

    may kill app at random time App components lifecycle is not under control Components should not depend on each other Can’t rely on data, stored in components
  2. #mobarchclub Common Principles for Mobile -Separation of concerns -Provide solid

    user experience -Keep UI lean and simple -Keep UI free of app logic -Drive UI from model -Use persistent model -Assign clear responsibilities model classes
  3. #mobarchclub Levels of Complexity of Android App Architecture 1. L1

    - Presenter / ViewModel, Layer Separation, Entities 2. Injection 3. Coordinator 4. Reactive Programming (Rx)
  4. #mobarchclub Dependency injection Decouple layers. Pass dependencies to constructor parameters

    Or use injection framework (JSR-330, Dagger, AndroidAnnotations, Juice, etc.)
  5. #mobarchclub Minimum Viable Architecture 1. YAGNI = You aren’t going

    to need it! 2. RT-RJ-RT Use the Right Tool for the Right Job at the Right Time 3. XP - Change incrementally
  6. #mobarchclub Search Phase 1. “No architecture at all” 2. Find

    business model and market fit 3. Acquire first customers 4. Prototype - familiar technology, cobble it together 5. Throw it away later - but not now
  7. #mobarchclub Execution Phase 1. “Just enough” architecture 2. Meet near-term

    customer needs, delight customers 3. Rapid learning and imporovement 4. Team productivity 5. Monolithic architecture 6. Minimal infrastructure 7. NOT about scaling
  8. #mobarchclub Change drives the world “The best code you can

    write now is the code you’ll discard in a couple of years” Martin Fowler
  9. #mobarchclub Monolithic Architecture • Presentation - Web (JS), Android, iOS

    • Application / Backend - Java, PHP, Ruby • Database - Firebase, MySQL, Mongo
  10. #mobarchclub Scaling Phase • Scaling the Team • Scaling the

    Technology • Concurrency and Efficiency
  11. #mobarchclub Scaling is the result of the change “If you

    don’t end up regretting your early technology decisions, you probably over-engineered” Randy Shoup
  12. #mobarchclub Scaling. “Next-Gen” Architecture • Scaling the Technology. Migrations, Concurrency,

    Other languages • Scalable persistence. Break-up monolithic DB, split to functional modules • Identify and eliminate bottlenecks. Increase performance • Re-Design interfaces
  13. #mobarchclub Read About Software Architecture Clean Architecture https://8thlight.com/blog/uncle-bob/2012/08/13/the-clean-architecture.html Architecture, the

    Lost Years by Uncle Bob https://youtu.be/WpkDN78P884 Fernando Cejas - Architecturing Android, Evolution https://fernandocejas.com/2015/07/18/architecting-android-the-evolution/ Minimum Viable Architecture https://www.slideshare.net/RandyShoup/minimum-viable-architecture-good-e nough-is-good-enough-in-a-startup Mobile Architecture Club
  14. #mobarchclub Read About Architectural Frameworks Moxy https://github.com/Arello-Mobile/Moxy Mosby https://github.com/sockeqwe/mosby Android

    MVP Helper https://github.com/Ufkoku/AndroidMVPHelper Clean Architecture https://github.com/android10/Android-CleanArchitecture Reark https://github.com/reark/reark MVP + Dagger2 + Rx https://android.jlelse.eu/mvp-dagger-2-rx-clean-modern-android-app-code- 74f63c9a6f2f Uber RIBs https://github.com/uber/RIBs
  15. #mobarchclub Read About Architecture Components Guide to App Architecture https://developer.android.com/topic/libraries/architecture/guide.html

    Architecture Components https://developer.android.com/topic/libraries/architecture/index.html I/O ‘17 Architecture Components Introduction - https://youtu.be/FrteWKKVyzI Solving the Lifecycle Problem - https://youtu.be/bEKNi1JOrNs Persistence and Offline - https://youtu.be/MfHsPGQ6bgE Architecture Components on GDD Europe - https://youtu.be/Ts-uxYiBEQ8 GDD Europe CodeLabs g.co/codelabs/gdd17 Google Github samples https://github.com/googlesamples/android-architecture-components