Slide 1

Slide 1 text

Refactoring avec Guava

Slide 2

Slide 2 text

Guava Présentation de la librairie 1

Slide 3

Slide 3 text

* www.xebia.fr | http://blog.xebia.fr | http://techtrends.xebia.fr Telephone : 33 (0)1 53 89 99 99 | email : [email protected] | 156 bd Haussmann - 75008 Paris | Guava Java 1.6+ Expressivité Nombre de lignes Collections Fonctionnel Cache de 2nd niveau

Slide 4

Slide 4 text

* www.xebia.fr | http://blog.xebia.fr | http://techtrends.xebia.fr Telephone : 33 (0)1 53 89 99 99 | email : [email protected] | 156 bd Haussmann - 75008 Paris | Guava Collections Approche fonctionnelle Transform Filter Immuabilité Nouvelles structures de données MultiMap MultiSet FluentIterable

Slide 5

Slide 5 text

* | DSL fonctionnel Function Predicate www.xebia.fr | http://blog.xebia.fr | http://techtrends.xebia.fr Telephone : 33 (0)1 53 89 99 99 | email : [email protected] | 156 bd Haussmann - 75008 Paris

Slide 6

Slide 6 text

* | Exemple Liste de tous les éléments pairs d’une liste multiplié par 2 public class IsPair implements Predicate { public boolean apply(Integer elt) { return elt%2 == 0; } } public class By2 implements Function { public Integer apply(Integer elt) { return elt*2; } } www.xebia.fr | http://blog.xebia.fr | http://techtrends.xebia.fr Telephone : 33 (0)1 53 89 99 99 | email : [email protected] | 156 bd Haussmann - 75008 Paris

Slide 7

Slide 7 text

* | Exemple Liste de tous les éléments pairs d’une liste multiplié par 2 final Predicate IS_PAIR = new IsPair(); final Function BY_2 = new By2(); Integer[] ints = {1, 2, 3, 4}; FluentIterable.from(ints) .filter(IS_PAIR) .transform(BY_2) .toImmutableList(); => {4,8} www.xebia.fr | http://blog.xebia.fr | http://techtrends.xebia.fr Telephone : 33 (0)1 53 89 99 99 | email : [email protected] | 156 bd Haussmann - 75008 Paris

Slide 8

Slide 8 text

Contexte Explication du problème 2

Slide 9

Slide 9 text

* | Problématique Récursivité en SQL Mise à jour courante d’une requête complexe Volumétrie modérée www.xebia.fr | http://blog.xebia.fr | http://techtrends.xebia.fr Telephone : 33 (0)1 53 89 99 99 | email : [email protected] | 156 bd Haussmann - 75008 Paris

Slide 10

Slide 10 text

* | Contexte Blotter : liste de produits Visibilité variable avec règles complexes www.xebia.fr | http://blog.xebia.fr | http://techtrends.xebia.fr Telephone : 33 (0)1 53 89 99 99 | email : [email protected] | 156 bd Haussmann - 75008 Paris

Slide 11

Slide 11 text

* | Organisation www.xebia.fr | http://blog.xebia.fr | http://techtrends.xebia.fr Telephone : 33 (0)1 53 89 99 99 | email : [email protected] | 156 bd Haussmann - 75008 Paris

Slide 12

Slide 12 text

* | Équipes et participants www.xebia.fr | http://blog.xebia.fr | http://techtrends.xebia.fr Telephone : 33 (0)1 53 89 99 99 | email : [email protected] | 156 bd Haussmann - 75008 Paris

Slide 13

Slide 13 text

Hands-on Votre solution... 3

Slide 14

Slide 14 text

* | Hands-on http://jlrigau.github.io/refactoring-with-guava/ www.xebia.fr | http://blog.xebia.fr | http://techtrends.xebia.fr Telephone : 33 (0)1 53 89 99 99 | email : [email protected] | 156 bd Haussmann - 75008 Paris

Slide 15

Slide 15 text

* | Étape 1 Task Helper www.xebia.fr | http://blog.xebia.fr | http://techtrends.xebia.fr Telephone : 33 (0)1 53 89 99 99 | email : [email protected] | 156 bd Haussmann - 75008 Paris

Slide 16

Slide 16 text

* | Étape 2 Blotter Service www.xebia.fr | http://blog.xebia.fr | http://techtrends.xebia.fr Telephone : 33 (0)1 53 89 99 99 | email : [email protected] | 156 bd Haussmann - 75008 Paris

Slide 17

Slide 17 text

* | Étape 2 Blotter Service www.xebia.fr | http://blog.xebia.fr | http://techtrends.xebia.fr Telephone : 33 (0)1 53 89 99 99 | email : [email protected] | 156 bd Haussmann - 75008 Paris

Slide 18

Slide 18 text

YOU FOR watching THANK Merci!