Top Banner
Feature development: from feature flags to A/B testing Kateryna Trofimenko · Lead iOS developer 1
47

Cocoaheads Meetup / Kateryna Trofimenko / Feature development

Jan 22, 2018

Download

Internet

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

Feature development: from feature flags to A/B

testing

Kateryna Trofimenko · Lead iOS developer1

Page 2: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

2releas

14iOS

49countrie

About

2

Page 3: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

10QA

14iOS

release

About

3

Page 4: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

10QA

2releas

14iOS

2release

About

4

Page 5: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

10QA

2releas 47

languag

14iOS

49countrie

2release

327Musers

About

5

Page 6: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

10QA

2releas

5+applicatio

47languag

14iOS

49countrie

2release

327Musers

About

6

Page 7: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

7

Page 8: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

Feature service

8

Page 9: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

9

Feature Service

Feature Object

Feature Object

Feature Object

Page 10: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

10

Feature Service

Major feature

Remote dev feature

Feature Object

Feature Object

Feature Object

Page 11: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

11

Feature Service

Major feature

Remote dev feature

Dev feature

Feature Object

Feature Object

Feature Object

Page 12: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

Feature objectclass BPFFeature : NSObject, NSCoding {

let key: String

var title: String?

var group: String?

let isOnByDefault: Bool

func isOn() -> Bool { ... }

func toggle() { ... }

}

12

Page 13: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

Feature service in debug

13

Page 14: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

Feature service

Server

14

Page 15: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

Feature service

Server

15

Page 16: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

Feature service

Server

16

Page 17: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

Feature service

Server

✦ Platform type

17

Page 18: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

Feature service

Server

✦ Platform type

✦ Product type …

18

Page 19: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

Feature service

Server

✦ Platform type

✦ Product type …

✦ Product requirements

19

Page 20: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

Feature service

Server

✦ Platform type

✦ Product type …

✦ Product requirements

✦ Client version

20

Page 21: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

Protocol evolution Change of the data format for existing feature

21

Page 22: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

22

Page 23: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

23

Page 24: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

Minor feature

✦ Informs server that client supports certain data format

24

Page 25: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

Minor feature

✦ Informs server that client supports certain data format

✦ Removes client version dependency on the server

✦ Easy to QA old and new version of the client

25

Page 26: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

Chat redesign

26

Page 27: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

Chatto

27

https://github.com/badoo/Chatto

Page 28: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

28

Git flow

dev

feature_1

release_1

integration_1

feature_2

masterintegration_2

Release branch

Pending release

On Live

In Progress

In Review

In QA

In dev

In integration

In master

autodeveloper qa time

2-3 days

1 week

Page 29: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

Dev Feature… and chat redesign

29

Page 30: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

Dev featurefinal class ChattoFeature: NSObject, BPFFeatureSource {

class func feature() -> BPFFeature { let feature = BPFFeature(title: "Chat V2", group: "Chat", key: self.featureKey()) feature.isOnByDefault = false return feature }

class func featureKey() -> String { return "com.badoo.chat.chatto" }

class var enabled: Bool { return BPFGlobals.shared().features().isFeatureEnabled(featureKey: self.featureKey()) }

}

30

Page 31: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

Dev feature- (void)configureFeatures { id<BPFFeaturesService> featureService = [self features]; [featureService loadFeatures:[self classBasedFeatures] withRuntimeSearch:NO]; }

- (NSArray *)classBasedFeatures { NSArray *classes = @[ ...., [ChattoFeature class],....]; NSMutableArray *classBasedFeatures = [NSMutableArray array]; for (Class class in classes) { NSAssert([class conformsToProtocol:@protocol(BPFFeatureSource)], @"Class %@ should conform to BPFFeatureSource protocol", NSStringFromClass(class)); BPFFeature *feature = [(id<BPFFeatureSource>)class feature]; [classBasedFeatures addObject:feature]; } return [classBasedFeatures copy]; }

31

Page 32: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

32

Page 33: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

Remote dev feature… and gradual release

33

Page 34: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

Remote dev feature

34

Page 35: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

Remote dev feature

35

Page 36: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

Remote dev feature

36

Page 37: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

A/B testingTopic Description

37

Page 38: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

A/B testing

38

Page 39: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

A/B testing

39

Page 40: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

A/B testing

40

Page 41: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

Overview

41

Page 42: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

✦ Major feature

Overview

42

Page 43: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

✦ Major feature

✦ Minor feature

Overview

43

Page 44: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

✦ Major feature

✦ Minor feature

✦ Development feature

Overview

44

Page 45: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

✦ Major feature

✦ Minor feature

✦ Development feature

✦ Remote Development feature

Overview

45

Page 46: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

✦ Major feature

✦ Minor feature

✦ Development feature

✦ Remote Development feature

✦ A/B testing

Overview

46

Page 47: Cocoaheads Meetup / Kateryna Trofimenko / Feature development

[email protected]

https://www.linkedin.com/in/ekaterina-trofimenko-b7515128

Thank you!

47