extreme programming e php

27
 Sviluppo agile ed extreme programming

Upload: francesco-trucchia

Post on 02-Nov-2014

1.922 views

Category:

Technology


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Extreme Programming e PHP

   

Sviluppo agile ed extreme programming

Page 2: Extreme Programming e PHP

   

Sviluppo agile ed XP

● Francesco Trucchia● ideato srl● www.ideato.it● Sviluppo applicazioni 

web 2.0

● Jacopo Romei● www.sviluppoagile.it● Coaching agile e 

consulenze

Page 3: Extreme Programming e PHP

   

Extreme programming

● Metodologia conforme al Manifesto Agile● Pratiche antiche raccolte e consolidate, 

all'estremo● Vedremo solo due pratiche

Page 4: Extreme Programming e PHP

   

Agenda

● Planning– User story– Planning game– Release planning– Iteration planning

● Test automatici– Da user story a test 

funzionale– Unit test– Refactoring– Regression test

Page 5: Extreme Programming e PHP

   

User story

● Cosa è?– feature vs. meccanismo

● Forma– ternaria (quaternaria opzionalmente...)– concisa– linguaggio naturale e trasversale

● per sviluppatori e per manager

Page 6: Extreme Programming e PHP

   

Un esempio

● Come utente registrato● voglio inserire una ricetta● perché gli altri utenti possano leggerla

Page 7: Extreme Programming e PHP

   

Scriviamo delle user story

Immaginiamo un social network per scambiare, condividere e trovare ricette gastronomiche via 

web.

Page 8: Extreme Programming e PHP

   

Note alla scrittura

● Story splitting (per i temi è dovuto, prima o poi)● Story merging

Page 9: Extreme Programming e PHP

   

Planning game

● Cos'è?– Pratica per razionalizzare la stima

● della criticità● delle scadenze

Page 10: Extreme Programming e PHP

   

Planning game

● Come si gioca?– Partecipanti– Carte– Giocata segreta– 0, 1, 2, 3, 5, 8, 13, 20, 40, 100

Page 11: Extreme Programming e PHP

   

Planning game

● Come si stima?– Intuito vs. analisi

● Legge di Pareto o criterio del 20­80– Ma non è superficiale?

● Strumenti di controllo

Page 12: Extreme Programming e PHP

   

Planning game

Giocate con le vostre user story.

Page 13: Extreme Programming e PHP

   

Release planning● Cos'è?

– Un piano dei lavori su grana grossa● Priorità

– Business value (Kano, analisi di mercato, etc etc)– Costo– Conoscenza del dominio e del processo– Rischio– Ordinamento a grana fine (1 vs. 1)

Page 14: Extreme Programming e PHP

   

Release planning

Page 15: Extreme Programming e PHP

   

Release planning

Assegnate le priorità alle vostre storie.

Page 16: Extreme Programming e PHP

   

Release planning

● Stimare la data di rilascio– Project velocity

● Cambia, sempre.● Stima intuitiva● Analogia (stesso team, progetto diverso?)● Ultima iterazione (ultime 3?)

Page 17: Extreme Programming e PHP

   

Iteration planning

● Cos'è?– Un piano dei lavori su grana fine

● 1­2­4 settimane– Più frequente per maggior feedback– Meno frequente per minore overhead

– Basato sui task, calcolato in ore (o giorni ideali, o pomodori)

– Non torno al vecchio metodo?

Page 18: Extreme Programming e PHP

   

Iteration planning

● Selezione delle storie– Pesco user story dal release planning fino a coprire 

l'effort disponibile (in minuti?)● Scrivere i test: 20● Scrivere la form: 20● Scrivere la validazione: 25● Scrivere la business logic: 20

– I test non sono un accessorio, come vedremo

Page 19: Extreme Programming e PHP

   

Iteration planning

Pianifichiamo la nostra iterazione di 180'

Page 20: Extreme Programming e PHP

   

Implementare le user story

● Basiamoci sulla user story d'esempio● Passiamo al codice● Preparate

– coppie di sviluppatori– symfony– un IDE di fiducia– LAMP

Page 21: Extreme Programming e PHP

   

Fine primo tempo

Domande sul planning?

Page 22: Extreme Programming e PHP

   

Step by step

● mkdir noucou● cd noucou● symfony generate:project noucou● symfony generate:app fe● symfony generate:module fe ricetta

Page 23: Extreme Programming e PHP

   

Step by step

● symfony test:all (fail)● symfony test:functional fe ricettaActions (fail)

Page 24: Extreme Programming e PHP

   

Step by step[scrittura test <h1>Nouvelle cousine 2.0 (Beta)</h1>]

[correzione in actions e in template]

symfony test:functional fe ricettaActions (verde!)

[scrittura test della list]

symfony test:functional fe ricettaActions (rosso!)

[modifca schema.yml]

[modifica database.yml]

symfony propel:build­all

[implementazione della list]

symfony test:functional fe ricettaActions (verde!)

[scrittura test della form]

Page 25: Extreme Programming e PHP

   

Step by step[scrittura test della form]

symfony test:functional fe ricettaActions (rosso!)

[implementazion della form]

symfony test:functional fe ricettaActions (verde!)

mv apps/fe/modules/ricetta apps/fe/modules/ricetta.backup

symfony propel:generate­module ­­with­show fe ricetta Ricetta

symfony test:functional fe ricettaActions (rosso!)

[refactorig del codice]

symfony test:functional fe ricettaActions (verde!)

[scrittura test update ricetta]

[creazione del file fixtures]

[modifica del test per caricare le fixture]

symfony test:functional fe ricettaActions (verde!)

[scrittura test validazione ricetta]

symfony test:functional fe ricettaActions (verde!)

Page 26: Extreme Programming e PHP

   

Fine secondo tempo

Domande sul TDD?

Page 27: Extreme Programming e PHP

   

Sviluppo agile ed XP

● Francesco Trucchia● ideato srl● www.ideato.it● Sviluppo applicazioni 

web 2.0

● Jacopo Romei● www.sviluppoagile.it● Coaching agile e 

consulenze