Gestión del código fuente con Visual Studio Team System 2008

Page 1

3/13/2011 10:09 PM

Gesti贸n del c贸digo fuente con Visual Studio Team System 2008

Jes煤s Jim茅nez

Software Development Consultant ilitia technologies weblog: www.teamsystem.es e-mail: jesus@ilitia.com

2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

PDF created with pdfFactory trial version www.pdffactory.com

1


3/13/2011 10:09 PM

Agenda Gestión de la configuración Qué es y qué implica Organización en Team Foundation Server

Branch & Merge Definiciones y conceptos

Escenarios Distintos tipos de escenarios: Por versión, característica, equipos, integración

Estrategias Como afrontar los escenarios: Versión única, multiple multiple,, multiples equipos / caracteristicas Baseless merge Recomendaciones y Antipatrones

2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

PDF created with pdfFactory trial version www.pdffactory.com

2

2


3/13/2011 10:09 PM

Gesti贸n de la configuraci贸n

3

2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

PDF created with pdfFactory trial version www.pdffactory.com

3


3/13/2011 10:09 PM

Gestión de la configuración

¿Qué es?

Disciplina que maneja como el software es modificado y construido Ayuda a controlar el ciclo de vida del desarrollo de software (SDLC) Implica conceptos como: Gestión de recursos Versionado de recursos Modelos de trabajo colaborativo Gestión del historial Gestión de compilaciones y versiones Desarrollo paralelo 4

2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

PDF created with pdfFactory trial version www.pdffactory.com

4


3/13/2011 10:09 PM

Gesti贸n de la configuraci贸n

Gesti贸n de recursos

Centralizaci贸n, surgen los repositorios

5

2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

PDF created with pdfFactory trial version www.pdffactory.com

5


3/13/2011 10:09 PM

Gesti贸n de la configuraci贸n

Versionado de recursos

Almacenar diferentes versiones de un fichero

6

2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

PDF created with pdfFactory trial version www.pdffactory.com

6


3/13/2011 10:09 PM

Gesti贸n de la configuraci贸n

Modelos de trabajo colaborativo

Copy--Modify Copy Modify--Merge / Lock Lock--Modify Modify--Unlock

v1

v1

v2 7

2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

PDF created with pdfFactory trial version www.pdffactory.com

7


3/13/2011 10:09 PM

Gestión de la configuración

Gestión del historial

Cuantas veces se ha modificado un fichero Acceso a versiones especificas Recuperar versiones anteriores

v1

v2

v3

v4

….

vn

8

2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

PDF created with pdfFactory trial version www.pdffactory.com

8


3/13/2011 10:09 PM

Gestión de la configuración

Gestión de compilaciones y versiones

Resultados Reportes de compilaciones Output de la compilación Accesible Patrones de nombrado / archivado Fecha de compilación Nombre de compilación Numero de compilación ese día

9

2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

PDF created with pdfFactory trial version www.pdffactory.com

9


3/13/2011 10:09 PM

Gesti贸n de la configuraci贸n

Desarrollo paralelo

Evolucionar un fichero de formas diferentes Distintos motivos Posibilidad de unir los ficheros en el futuro

v1--branch v1

v1

time line

v2

10

2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

PDF created with pdfFactory trial version www.pdffactory.com

10


3/13/2011 10:09 PM

Hands On Code Code::

Gesti贸n de la configuraci贸n

11

2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

PDF created with pdfFactory trial version www.pdffactory.com

11


3/13/2011 10:09 PM

Organización en Team Foundation Server

Niveles de organización

Team Project Un Team Project Múltiples Team Projects

Estructura de Branches Development Main Production

Estructura de Directorios Código fuente Paquete de instalación Documentación Pruebas

2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

PDF created with pdfFactory trial version www.pdffactory.com

12

12


3/13/2011 10:09 PM

Organizaci贸n en Team Foundation Server

Estructura a nivel de Source Control

13

2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

PDF created with pdfFactory trial version www.pdffactory.com

13


3/13/2011 10:09 PM

Organización en Team Foundation Server

Shared Code / Lib / Unit Tests

Código compartido entre Team Projects ¿Un Team Project para código compartido? Localización compartida (Client (Client Side) Side) Branching (Server Side Side) )

Librerías compartidas entre Team Projects ¿Un Team Project para librerías compartidas? Localización compartida (Cliente Side Side) ) Branching (Server Side Side) )

Pruebas unitarias Se almacenan fuera de la carpeta Code Code,, aunque luego formen parte de la solución 14

2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

PDF created with pdfFactory trial version www.pdffactory.com

14


3/13/2011 10:09 PM

Organizaci贸n en Team Foundation Server Estructura de la carpeta Code

15

2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

PDF created with pdfFactory trial version www.pdffactory.com

15


3/13/2011 10:09 PM

Hands On Code Code::

Organizaci贸n en Team Foundation Server

16

2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

PDF created with pdfFactory trial version www.pdffactory.com

16


3/13/2011 10:09 PM

Branch

¿Qué es?

Permite el desarrollo paralelo Aislamiento Individual Colaborativo

Relación padre/hijo entre branches Branch en un punto conocido Fecha Changeset Ultima versión

Requiere un espacio adicional pequeño Misma forma de trabajo en TFVC

2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

PDF created with pdfFactory trial version www.pdffactory.com

17

17


3/13/2011 10:09 PM

Merge

¿Qué es?

Integración de cambios entre branches Cambios en ficheros, cambios de nombre , ficheros añadidos, ficheros eliminados

Proceso bidireccional Forward Integration (De padre a hijo) Reverse Integration (De hijo a padre)

Herramienta de resolución de conflictos Genera un changeset changeset,, como el check check--in Posibilidad de rollback Baseless Merge 18

2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

PDF created with pdfFactory trial version www.pdffactory.com

18


3/13/2011 10:09 PM

Escenarios

Principales escenarios

Por versión Mantener aislamiento entre versiones Permite seguir el desarrollo mientras se prueba No tiene porque ser una versión del producto

Por característica Características experimentales Evita inestabilidad

Por equipos Equipos distribuidos geográficamente Aísla de cambios

Integración 19

2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

PDF created with pdfFactory trial version www.pdffactory.com

19


3/13/2011 10:09 PM

Estrategias

Antes de empezar

¿Realmente necesito crear un branch? branch? No es bueno hacer overover-branching Branches Vs. Labels

Determinar cual es nuestro escenario Versión única Múltiples versiones Múltiples características Múltiples equipos

La estrategia elegida marcará todo el proceso Existen una gran cantidad de estrategias 20

2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

PDF created with pdfFactory trial version www.pdffactory.com

20


3/13/2011 10:09 PM

Estrategias

Versi贸n 煤nica

$/Product $/ Product//Dev $/Product $/ Product//Main $/Product $/ Product//Production $/Product $/ Product//Safekeeping/ Safekeeping/Release 1.0

21

2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

PDF created with pdfFactory trial version www.pdffactory.com

21


3/13/2011 10:09 PM

Hands On Code Code::

Versión Única

22

2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

PDF created with pdfFactory trial version www.pdffactory.com

22


3/13/2011 10:09 PM

Estrategias

Múltiples versiones

$/Product $/ Product//Dev

$/Product $/ Product//Main $/Product $/ Product//Production • Release 1.0 • Release 2.0

$/Product $/ Product//Safekeeping • Release 1.0 • Release 2.0

23

2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

PDF created with pdfFactory trial version www.pdffactory.com

23


3/13/2011 10:09 PM

Hands On Code Code::

MĂşltiples Versiones

24

2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

PDF created with pdfFactory trial version www.pdffactory.com

24


3/13/2011 10:09 PM

Estrategias

Múltiples características / equipos $/Product $/ Product//Dev • FeatureBranch1 • FeatureBranch2

$/Product $/ Product//Main $/Product $/ Product//Production • Release 1.0 • Release 2.0

$/Product $/ Product//Safekeeping • Release 1.0 • Release 2.0

25

2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

PDF created with pdfFactory trial version www.pdffactory.com

25


3/13/2011 10:09 PM

Hands On Code Code::

MĂşltiples caracteristicas / equipos

26

2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

PDF created with pdfFactory trial version www.pdffactory.com

26


3/13/2011 10:09 PM

Estrategias

Modelo de promoción bidireccional $/Product $/ Product//Dev • FeatureBranch1 • FeatureBranch2

$/Product $/ Product//Main $/Product $/ Product//Production • Release 1.0 • Release 2.0

$/Product $/ Product//Safekeeping • Release 1.0 • Release 2.0

27

2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

PDF created with pdfFactory trial version www.pdffactory.com

27


3/13/2011 10:09 PM

Estrategias

Modelo de promoci贸n bidireccional

$/Product $/ Product//Main

$/Product $/ Product//Production/ Production/ Release 1.0

Sin relaci贸n de merge

$/Product $/ Product//Production/ Production/ Release 2.0

28

2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

PDF created with pdfFactory trial version www.pdffactory.com

28


3/13/2011 10:09 PM

Estrategias

Baseless Merge

No existe una l铆nea base de c贸digo Posible desde l铆nea de comando Relaci贸n tras el primer Baseless Merge $/Product $/ Product//Main

$/Product $/ Product//Production/ Production/ Release 1.0

Baseless Merge

$/Product $/ Product//Production/ Production/ Release 2.0 29

2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

PDF created with pdfFactory trial version www.pdffactory.com

29


3/13/2011 10:09 PM

Hands On Code Code::

Baseless Merge

30

2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

PDF created with pdfFactory trial version www.pdffactory.com

30


3/13/2011 10:09 PM

Estrategias

Consideraciones y buenas prácticas

Crea Branches solo cuando lo necesites Haz Merge siempre desde el root del Branch Evita el Branching excesivo No tengas miedo a hacer Merge, Merge, mientras más tarde lo hagas peor será “The later you merge merge,, the higher the pain pain”” ;;--)

Revisa siempre las operaciones, te puedes confundir fácilmente “Measure twice twice,, cut once once”” ;;-) 31

2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

PDF created with pdfFactory trial version www.pdffactory.com

31


3/13/2011 10:09 PM

Estrategias

Antipatrones

Merge Paranoia Merge Mania Big Bang Merge Wrong--Way Merge Wrong Cascading Branches Development Freeze Volatile Branches Temporary Branches 32

2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

PDF created with pdfFactory trial version www.pdffactory.com

32


3/13/2011 10:09 PM

Recursos Visual Studio Team System Guidance [p&p07] http://www.codeplex.com/VSTSGuidance Team Foundation Server Branching Guidance [p&p07] http://www.codeplex.com/BranchingGuidance/ Team Foundation Server 2008 In Action [Manning – Azher08] Branching and Merging Primer [Microsoft - Birmele06] http://msdn.microsoft.com/enhttp://msdn.microsoft.com/en-us/library/aa730834(VS.80).aspx SCM Patterns. Effective Teamwork, Practical Integration [Addison Wiley – Berczuk03] Streamed Lines: Branching Patterns for Parallel Software Development [PLoP [PLoP Conference – Appleton98] www.cmcrossroads.com/bradapp/acme/branching/ 33

2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

PDF created with pdfFactory trial version www.pdffactory.com

33


3/13/2011 10:09 PM

Recursos Informaci贸n General sobre VSTS / TFS En mi blog: www.teamsystem.es (http://www.teamsystem.es (http://www.teamsystem.es) ) MSDN (http://msdn.microsoft.com (http://msdn.microsoft.com) ) Foros de Visual Studio Team System (http://forums.microsoft.com/msdn/default.aspx?ForumGroupID=5&SiteID=1 ) Codeplex (www.codeplex.com www.codeplex.com) )

He utilizado para esta presentaci贸n Team Foundation Server 2008 + SP1 Visual Studio Team System 2008 Developer Edition + SP1 Team Explorer 2008

Herramientas de la comunidad Team Foundation Server Power Tools Team Foundation Server SideKicks

Muchas Gracias !! 34

2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

PDF created with pdfFactory trial version www.pdffactory.com

34


3/13/2011 10:09 PM

Š 2005 Madrid .NET User Group. All rights reserved; reproduction in part or in whole without written permission of the author and the user group is prohibited The work contained in this presentation is shown AS IS without any implied warranty or liability for any damage derived from it use. All the expressions and opions are personal and resposability of the speaker.

2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

PDF created with pdfFactory trial version www.pdffactory.com

35


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.