Page 1
Architectural Considerations For Complex Mobile And Web Applications
Vivek Jain Application Developer Twitter: @vivekjain10
Feb 2015, Pune
Page 2
• Implementation Strategy
• Keeping Client-side Light
2
Page 3
Implementation Strategy
3
Page 10
Product or Channel
6
Page 11
Product or Channel
6
Page 12
Product or Channel
6
Page 13
Product or Channel
6
Page 14
Ultimate Goal
7
Use
r Exp
erie
nce
Line of deployment
Awesome apps
Page 15
Ultimate Goal
7
Use
r Exp
erie
nce
Line of deployment
Awesome apps
Page 16
The Laser Strategy
8
Use
r Exp
erie
nce
Line of deployment
Awesome apps
Page 17
The Laser Strategy
8
Use
r Exp
erie
nce
Line of deployment
Awesome apps
Page 18
The Laser Strategy
8
Use
r Exp
erie
nce
Line of deployment
Awesome apps
Page 19
The Laser Strategy
8
Use
r Exp
erie
nce
Line of deployment
Awesome apps
Page 20
The Cover-your-bases Strategy
9
Use
r Exp
erie
nce
Line of deployment
Awesome apps
Page 21
The Cover-your-bases Strategy
9
Use
r Exp
erie
nce
Line of deployment
Awesome apps
Page 22
The Cover-your-bases Strategy
10
Use
r Exp
erie
nce
Line of deployment
Awesome apps
Page 24
11
Native Web
Native Vs Web
Page 25
11
Affordability
Native Web
Native Vs Web
Page 26
11
Affordability
User Experience
Native Web
Native Vs Web
Page 27
11
Affordability
User Experience
Native Web
PhoneGapXamarin
Calatrava
Hybrid
Titanium
Native Vs Web
Page 28
Keeping Client-side Light
12
Page 29
13
Client-side Logic
Page 30
13
"name": { "first": "Amitabh", "last": "Bachchan"}
Client-side Logic
Page 31
13
"name": { "first": "Amitabh", "last": "Bachchan"}
fullName = "#{name.first} #{name.last}"
Client-side Logic
Page 32
14
Change in Requirement
Page 33
14
"name": { "first": "Amitabh", "middle": "Harivansh", "last": "Bachchan"}
Change in Requirement
Page 34
14
"name": { "first": "Amitabh", "middle": "Harivansh", "last": "Bachchan"}
fullName = "#{name.first} #{name.middle} #{name.last}"
Change in Requirement
Page 36
15
"name": { "first": "Amitabh", "middle": "Harivansh", "last": “Bachchan", "full": “Amitabh Harivansh Bachchan"}
Light Client
Page 37
15
"name": { "first": "Amitabh", "middle": "Harivansh", "last": “Bachchan", "full": “Amitabh Harivansh Bachchan"}
fullName = name.full
Light Client
Page 39
Benefits
• Less duplication of code
16
Page 40
Benefits
• Less duplication of code
• Easier to fix defects
16
Page 41
Benefits
• Less duplication of code
• Easier to fix defects
• Some changes without app release
16
Page 42
API Best Practices
17
Page 43
Consistent Interface
18
Page 44
Consistent Interface
• Consistent Format
18
Page 45
Consistent Interface
• Consistent Format
• Back-end Systems/Database Agnostic
18
Page 46
Consistent Interface
• Consistent Format
• Back-end Systems/Database Agnostic
• Standard Architecture (REST)
18
Page 47
Aggregate
19
"id": 1234, "type": "savings"
"id": 1234, "balance": 100.23
Page 48
Aggregate
19
"id": 1234, "type": "savings"
"id": 1234, "balance": 100.23
"id": 1234, "type": "savings", "balance": 100.23
Page 49
Optimize
20
"id": 1234, "type": "savings”, “branch_id": 75, “customer_id”: 20757
Page 50
Optimize
20
"id": 1234, "type": "savings”, “branch_id": 75, “customer_id”: 20757
"id": 1234, "type": "savings”, “customer_id”: 20757
Page 51
Expand, then Contract
21
Page 52
Expand, then Contract
21
"name": { "first": "Amitabh", "last": "Bachchan"}
Page 53
Expand, then Contract
21
"name": { "first": "Amitabh", "last": "Bachchan"}
"name": { "first": "Amitabh", "last": "Bachchan", "full": “Amitabh Bachchan"}
Page 54
Expand, then Contract
21
"name": { "first": "Amitabh", "last": "Bachchan"}
"name": { "first": "Amitabh", "last": "Bachchan", "full": “Amitabh Bachchan"}
"name": { "full": “Amitabh Bachchan"}
Page 55
Who owns APIs?
22
Page 56
Poly-skilled teams
23
Page 57
Poly-skilled teams
• Client + Server side skills
23
Page 58
Poly-skilled teams
• Client + Server side skills
• Empowered to make changes in any layer
23
Page 59
Poly-skilled teams
• Client + Server side skills
• Empowered to make changes in any layer
• Ideal for small organizations
23
Page 60
Work with API team
24
Page 61
Work with API team
• Request changes
24
Page 62
Work with API team
• Request changes
• Communication channel with back-end teams
24
Page 63
Work with API team
• Request changes
• Communication channel with back-end teams
• Ideal for mid-size organizations
24
Page 65
Mobile Facade
• Middle-layer seen by apps
25
Page 66
Mobile Facade
• Middle-layer seen by apps
• Minimal logic to support apps (avoid business logic)
25
Page 67
Mobile Facade
• Middle-layer seen by apps
• Minimal logic to support apps (avoid business logic)
• Aggregate and Optimize Response
25
Page 68
Mobile Facade
• Middle-layer seen by apps
• Minimal logic to support apps (avoid business logic)
• Aggregate and Optimize Response
• Ideal for large organizations
25
Page 69
References
• http://martinfowler.com/articles/mobileImplStrategy.html
• http://blog.vivekjain.in/
26
Page 70
Thank You!
@vivekjain10 [email protected]
27