Tenho andado a explorar o Team Foundation Server, que é algo diferente do antigo Sourcesafe da Microsoft.
Além de mais evoluída esta ferramenta introduz (quer dizer… já não é nova, a novidade é mesmo entre o SourceSafe e o TFS…) alguns conceitos novos, e formas de funcionamento diferentes (muito).
Completo este pequeno artigo, com algumas imagens minhas e eventualmente alguns comentários também, e textos da WikiPedia. Não pretendo aprofundar muito, dado que defendo que a aprendizagem deve partir de cada um…. mas aborda-se aqui os conceitos que julgo importantes, e marcos da diferença entre os dois sistemas.
Team Foundation Server (commonly abbreviated to TFS)
is a Microsoft product offering source control, data collection, reporting, and project tracking, and is intended for collaborative software development projects. It is available either as stand-alone software, or as the server side back end platform for Visual Studio Team System (VSTS).
Team Foundation Server works in a three-tier architecture: the client tier, the application tier and the data tier. The client tier is used for creating and managing projects and accessing the items that are stored and managed for a project. TFS does not include any user interface for this tier, rather it exposes web services which client applications can use to integrate TFS functionality with themselves. These web services are used by applications like Visual Studio Team System to use TFS as data storage back end or dedicated TFS management applications like the included Team Foundation Client. The web services are in theapplication layer. The application layer also includes a web portal and a document repository facilitated by Windows SharePoint Services. The web portal, called the Team Project Portal, acts as the central point of communication for projects managed by TFS. The document repository is used for both project items and the revisions tracked, as well as for aggregated data and generated reports. The data layer, essentially an SQL Server 2005 Standard Edition installation, provides the persistent data storage services for the document repository. The data tier and application tier can exist on different physical or virtual servers as well, provided they are running Windows Server 2003 or better. The data tier is not exposed to the client tier, only the application tier is.
Podemos desde já através da suite VS contemplar bastantes diferenças nos produtos. Dado que a suite 2010 é visualmente bastante diferente da 2008 poderá ocasionar uma agradável lufada de ar fresco á vista…. ou simplesmente dar a ideia de uma cara lavada no Visual Studio. Não obstante tal, o que se quer aqui analizar é mesmo a integração com o Team Foundation Server.
Além do interface do Visual Studio, existe um frontendweb onde se podem fazer ainda várias operações… ora ao que li, pode ser integrado com SharePoint e Sql Server. Na minha versão foi instalado no modo básico, ligado a um Sql Express. Não deixam de ser no entanto interessantes as possibilidades.
Explorando um pouco o interface no Visual Studio, especialmente para quem apenas está habituado ao Check Out & Check In verificam-se a existÊncia de novos conceitos. Vamos então ver um pouco deles com a ajuda da nossa bela Wikipedia.
Source control e o mecanismo de repositório de informação.
Team Foundation Server provides a source control repository, called Team Foundation Version Control (TFVC). Unlike Microsoft’s previous source control offering, Visual SourceSafe (VSS), which relied on a file-based storage mechanism, Team Foundation source control stores all code, as well as a record of all changes and current check-outs in a SQL Server database.
Shelving / Unshelving
It supports features such as multiple simultaneous check-outs, conflict resolution, shelving and unshelving (shelving is a way to save a set of pending changes without committing them to source control, while still making them available to other users), branching and merging, and the ability to set security levels on any level of a source tree, alongside the most visible features of document versioning, locking, rollback, and atomic commits. The source control mechanism integrates with Team System’s work items as well; when a check-in (termed “changeset”) occurs, a developer can choose to have his code associated with one or more specific work items, to indicate that the check-in works towards solving specific issues. TFS administrators can enforce check-in policies that require Code Analysis requirements to have passed, as well as to enforce the association of check-ins with work items, or update the state of associated work items (like flagging a bug as “fixed” when checking in code that has the bug fixed). Individual versions of files can be assigned labels, and all files with the same label forms a release group. Unlike VSS, TFS source control repository does not support linking to an item from multiple places in the source folder structure, nor does it allow an item to be “pinned” (allow different references to the same file from different directories to point to different versions in a way that cannot be further edited).
Branching & Merging
TFVC supports branching at entire source code level as well as individual files and directory levels, with each branch being maintained individually. Multiple branches can be merged together, with the built in conflict resolution algorithm merging the changes between two branches of the same file where it can automatically reconcile the differences or flagging them for manual inspection if it cannot. Merge can be performed at “changeset” level as well, instead of the branch level. A successful merge is automatically checked out in the source control repository.
TFVC is not limited to source code only, but using the Windows SharePoint Services infrastructure it is built on, it provides a version-controlled library for other documents in the project as well, including project plans, requirements and feature analysis documents among others. All documents in the source controlled repository can be linked with any work item, and access to them can be controlled by defining access policies.
Outros links interessantes:
Team Foundation Server Concepts on MSDN
Team Foundation Server 2010 Key Concepts
Understanding the Check-out and Check-in Concepts in Source Control Systems