platform abstractionseparate ui and logic

25
@johanlindfors

Upload: julia-allen

Post on 17-Jan-2018

223 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Platform abstractionSeparate UI and logic

@johanlindfors

Page 2: Platform abstractionSeparate UI and logic
Page 3: Platform abstractionSeparate UI and logic

MediaBank and FinanceMap and navigationGamingPhoto editing

Page 4: Platform abstractionSeparate UI and logic

Successful architecture ofWindows Store applicationsJohan LindforsCoderox

Page 5: Platform abstractionSeparate UI and logic

This is a strictly internal approach

Page 6: Platform abstractionSeparate UI and logic

Simplify development and maintenance

Share code and UI

Separate UI from application logic

Abstract platform specifics

Page 7: Platform abstractionSeparate UI and logic

Simplify development and maintenanceGOAL

Share code and UI MISSION

Separate UI from application logicTACTIC

Abstract platform specificsOBSTACLE

Page 8: Platform abstractionSeparate UI and logic

Simplify maintenance GOAL

Share code and UI MISSION

Separate UI from application logicTACTIC

Abstract platform specificsOBSTACLE

Page 9: Platform abstractionSeparate UI and logic

Platform abstractionSeparate UI and logicShare code

Page 10: Platform abstractionSeparate UI and logic

Platform abstractionSeparate UI and logicShare code

Page 11: Platform abstractionSeparate UI and logic

Share code (and UI)Portable Class Libraries

”Add as link”

UI refactoring

Page 12: Platform abstractionSeparate UI and logic

Platform abstractionSeparate UI and logicShare code

Page 13: Platform abstractionSeparate UI and logic

Platform abstractionSeparate UI and logicShare code

Page 14: Platform abstractionSeparate UI and logic

UI

Application Logic

General architectural approach

Page 15: Platform abstractionSeparate UI and logic

View

ViewModel

Model

Databinds

References

Model-View-ViewModel (MVVM)

Page 16: Platform abstractionSeparate UI and logic

View

ViewModel

Model

Platform specific

Portable/Common

Page 17: Platform abstractionSeparate UI and logic

MVVMExisting or BYOF

ViewModel-View communication

ViewModel-* communication

Page 18: Platform abstractionSeparate UI and logic

Platform abstractionSeparate UI and logicShare code

Page 19: Platform abstractionSeparate UI and logic

Platform abstractionSeparate UI and logicShare code

Page 20: Platform abstractionSeparate UI and logic

Platform abstractionsSingleton vs ”Dependency Injection”

Windows Runtime Components (only v8)

Action<T> vs async/await

Page 21: Platform abstractionSeparate UI and logic

Action<T> vs async/awaitCreate wrapper

TaskCompletionSource

Exceptions

Nuget: install-package Microsoft.Bcl.Async -pre

Page 22: Platform abstractionSeparate UI and logic

Platform abstractionSeparate UI and logicShare code

Page 23: Platform abstractionSeparate UI and logic

@johanlindfors

Page 25: Platform abstractionSeparate UI and logic