Slide 1

Slide 1 text

Rakesh Chander - Comviva Technologies NETWORK LAYER ABSTRACTION • Interceptors • Validators • Dependency Injection

Slide 2

Slide 2 text

Rakesh Chander - Comviva Technologies Problem Statement – Common Request / Response operations – Serialization / Deserialization – Bearer Token Management – End to End Encryption – Testable Code

Slide 3

Slide 3 text

Rakesh Chander - Comviva Technologies Unfolding – Common code templates & patterns – Generics – Abstraction – Over-riding behavior – Dependency Injection

Slide 4

Slide 4 text

Rakesh Chander - Comviva Technologies Interceptors ■ Interceptors are a powerful mechanism that can pre-process or post-process a request

Slide 5

Slide 5 text

Rakesh Chander - Comviva Technologies Interceptors (Request Header Definition)

Slide 6

Slide 6 text

Rakesh Chander - Comviva Technologies Interceptors (Request Body Definition)

Slide 7

Slide 7 text

Rakesh Chander - Comviva Technologies Interceptors (Response Body Definition)

Slide 8

Slide 8 text

Rakesh Chander - Comviva Technologies Interceptors (Usage)

Slide 9

Slide 9 text

Rakesh Chander - Comviva Technologies Validators ■ Serialization / Deserialization ■ Fallback Mechanism ■ Common Error Generation ■ Bearer Token Management

Slide 10

Slide 10 text

Rakesh Chander - Comviva Technologies Adoption ■ API call can be declared using structs, its simple ■ Implement Protocols for required Request Type viz GET, POST, PUT, DELETE etc

Slide 11

Slide 11 text

Rakesh Chander - Comviva Technologies Adoption (Overriding defaults)

Slide 12

Slide 12 text

Rakesh Chander - Comviva Technologies Adoption (Execution)

Slide 13

Slide 13 text

Rakesh Chander - Comviva Technologies Conclusion ■ Increased Productivity ■ Lesser error scenarios

Slide 14

Slide 14 text

Rakesh Chander - Comviva Technologies Dependency Injection ■ Multiple Network Clients ■ Unit Tests

Slide 15

Slide 15 text

Rakesh Chander - Comviva Technologies Dependency Injection (Network Client Implementation)

Slide 16

Slide 16 text

Rakesh Chander - Comviva Technologies Dependency Injection (Network Client Mock)

Slide 17

Slide 17 text

Rakesh Chander - Comviva Technologies Summary Scalable, Maintainable, Reusable & Testable Interceptors – Wrappers, Parsers, End to End Encryption Validators – Serialization/ Deserialization, Fallback Response DAO, Token Management

Slide 18

Slide 18 text

Rakesh Chander - Comviva Technologies Try It Out! ■ https://github.com/rakeshchander/RCNetworkClient