blablacar - going native - erwan robin

36
Going NATIVE

Upload: cocoaheads-france

Post on 15-Jul-2015

3.690 views

Category:

Software


2 download

TRANSCRIPT

Page 1: Blablacar - Going native - Erwan Robin

Going NATIVE

Page 2: Blablacar - Going native - Erwan Robin

A fast growing community

Page 3: Blablacar - Going native - Erwan Robin

A global phenomenon

Page 4: Blablacar - Going native - Erwan Robin

Historique  Mobile

Première  version  en  2009  en  webview  

Page 5: Blablacar - Going native - Erwan Robin

First apps

Natif

Webview

Natif

Page 6: Blablacar - Going native - Erwan Robin

Avantages

Une  seule  base  de  code  !!

Mise  à  jour  sans  nouvelles  soumissions  !!

Le  web  est  le  coeur  de  métier  de  BlaBlaCar    

Page 7: Blablacar - Going native - Erwan Robin

Quelques  screenshots

Page 8: Blablacar - Going native - Erwan Robin

Tout  le  monde  adore  !

Page 9: Blablacar - Going native - Erwan Robin

…  en  2010  !

Page 10: Blablacar - Going native - Erwan Robin

Mais maintenant …

Page 11: Blablacar - Going native - Erwan Robin

Page 12: Blablacar - Going native - Erwan Robin

État des apps en 2013 …

It does the job… but it can be better !

//Flat Design & iOS 7

Page 13: Blablacar - Going native - Erwan Robin

Technologies dépassée

Refonte totale du site principal ! …

sur lequel se basent les apps mobiles

Page 14: Blablacar - Going native - Erwan Robin

V3 : Symfony + ElasticSearch

Page 15: Blablacar - Going native - Erwan Robin

Conclusion

- we need a FULL redesign -

Page 16: Blablacar - Going native - Erwan Robin

Why Native ?

Page 17: Blablacar - Going native - Erwan Robin

Why Native ?

- UI plus adaptée - Meilleures performances - API demandée par les partenaires - Accès aux fonctions avancées du device - Gestion d’un mode offline

Page 18: Blablacar - Going native - Erwan Robin

Archi!

Full-native OAuth2 + REST

Page 19: Blablacar - Going native - Erwan Robin

Quelques  screenshots

Page 20: Blablacar - Going native - Erwan Robin

Problématique

On souhaite garder la flexibilité d’un site web (traductions) !L’app existante dispose de beaucoup de fonctionnalités

On veut déployer le plus vite possible

Page 21: Blablacar - Going native - Erwan Robin

BBLocalization !

- Fichiers JSON - Clés "significatives" : écran.vue.element.trad - Traductions chargées au démarrage -> dict - Récupération des nouvelles trads à chaque lancement - Interface web simplifiée :

http://openl10n.io

#define  BBLocalizedString(key,  comment)    [BBLocalization  localizedStringForKey:key  comment:comment]

Page 22: Blablacar - Going native - Erwan Robin

Gestion des traductions

Mise à jour des trads sans re-soumission !Dev + Prod

S3

Page 23: Blablacar - Going native - Erwan Robin

BBLocalization : avantages

- Possibilité de dissocier la langue de l’app et du device - Correction des lacunes de NSLocalizable : - Gestion des pluriels - Ordre des paramètres - Gestion de configs dev / prod - Même format Android / iOS

Page 24: Blablacar - Going native - Erwan Robin

Soft Launch

Spécificités @BlaBlaCar : Feature spread between countries : - Booking - Non-Booking

Nouveaux pays régulièrement

=> Rollout Progressif par config

Page 25: Blablacar - Going native - Erwan Robin

Soft Launch-(void) loadAppWithOptions:(NSDictionary *)launchOptions { [self loadVersionOnce]; BOOL isV3 = [[BBDATA configuration] isV3]; UIViewController *rootVC = nil; if (isV3) {

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Storyboard" bundle:nil]; rootVC = [storyboard instantiateInitialViewController]; UINavigationController *nvc = (UINavigationController *)rootVC; } else { rootVC = [[BlaBlaCarViewController alloc] initWithNibName:@"BlaBlaCarViewController" bundle:nil]; if([self needsCleaning]){ [self cleanEverything:rootVC]; } [self managePush:(BlaBlaCarViewController*)rootVC withOptions: launchOptions]; }

[self.window setRootViewController:rootVC];

}

Page 26: Blablacar - Going native - Erwan Robin

Roadmap

21/03 09/04 16/04 21/04

Easter

Prod Non booking

April

23/04 30/04

March May June

16/06 30/06 07/07

Continue developing booking & improve non-booking

Internal release

Beta Non booking

Beta Booking

Prod Booking

Internal release

July

Page 27: Blablacar - Going native - Erwan Robin

Et  pour  la  France  ?  

Le  plus  gros  pays

=  Utilisateurs  les  plus  exigeants

+  Système  de  réservation  +  Paiement  en  ligne

=>  Rollout  progressif  par  tirage  au  sort

+  maitrise  de  la  charge  serveur

Page 28: Blablacar - Going native - Erwan Robin

BBRolloutManager

-(BOOL) canOpenV3 { if (BBDATA.configuration.isV3) { // Bypass : [self recordV3Rollout]; return YES; }

return [self checkRollOut]; } !!-(BOOL) checkRollOut { if ([[NSUserDefaults standardUserDefaults] boolForKey:ROLLOUT_VERIFIED] ) { return YES; } [self rollOutTreatment]; return NO; }

Page 29: Blablacar - Going native - Erwan Robin

BBRolloutManager

-(void) rollOutTreatment { NSNumber *rollOutValue = [[NSUserDefaults standardUserDefaults] objectForKey:ROLLOUT_VALUE]; if (!rollOutValue) { int random = 1 + arc4random()%100; //1+random(0..99) rollOutValue = [NSNumber numberWithInt:random]; [[NSUserDefaults standardUserDefaults] setValue:rollOutValue forKey: ROLLOUT_VALUE]; } // […] DownLoadFile if (!error) { [self completeRolloutForRandomValue:rollOutValue]; } } !!!!

Page 30: Blablacar - Going native - Erwan Robin

BBRolloutManager

-(void) recordV3Rollout { [[NSUserDefaults standardUserDefaults] setBool:YES forKey:ROLLOUT_VERIFIED ]; [[NSUserDefaults standardUserDefaults] synchronize]; } !!- (void) completeRolloutForRandomValue:(NSNumber *)value { NSDictionary *dict = [self getDictionaryFrom:[self getRollOutFilePath]]; if (value and dict) { NSNumber *number = [dict objectForKey:ROLLOUT_VALUE]; if ([value intValue]<=[number intValue]) { [self recordV3Rollout]; }

}

}

Page 31: Blablacar - Going native - Erwan Robin

Rollout

Page 32: Blablacar - Going native - Erwan Robin

Résultats

Page 33: Blablacar - Going native - Erwan Robin

Résultats

Page 34: Blablacar - Going native - Erwan Robin

FeedBacks

Système  de  tirage  au  sort  pour  les  «  anciens  »  Nouvelle  version  automatique  pour  les  nouveaux

Beaucoup  de  maj  sans  nouveautés  pour  les  non-­‐élus

Ne  pas  annoncer  le  switch  trop  tôt  :  crée  de  l’attente

Page 35: Blablacar - Going native - Erwan Robin

We’re hiring!

-­‐>  Android  Developer  ;-­‐)  -­‐>  Product  Manager

Page 36: Blablacar - Going native - Erwan Robin

Erwann ROBIN iOS Developer @Diwann

Thanks!