Extending Visual Studio 2005 Team System
Technical Case Study
Published: December 27, 2005
The Microsoft Managed Solutions IT groups implementation and deployment of its
internal development methodology illustrates how the extensibility features in Microsoft
Visual Studio 2005 Team System give any organization the ability to customize and
implement its own specific internal software development life-cycle processes.
|
Situation
|
Solution
|
Benefits
|
Products & Technologies
|
|
The Microsoft IT group Software Development Life Cycle methodology processes required
the use of external applications and tools to track task duration and other metrics.
This resulted in poor team member compliance, inaccurate data, and untimely reporting
of project metrics.
|
Microsoft Managed Solutions IT used Visual Studio 2005 Team System. VSTS is a rich
and extensible platform for creating and customizing Software Development Life Cycle
tools and methodology processes.
|
- Methodology processes and data metrics requirements are incorporated in the
Visual Studio IDE.
- Team compliance and the accuracy of recording task duration have greatly improved.
- Real-time central repository from which timely and accurate project metrics
can be reported with confidence to stakeholders.
- Process integration improves project collaboration and visibility among all
members of the software team.
|
- Visual Studio 2005 Team System
- Visual Studio 2005
- Microsoft SQL Server 2005 with Microsoft SQL Server 2005 Reporting Services
- Microsoft Windows Server 2003 with Microsoft Internet Information Services
(IIS) 6.0 and Microsoft Windows SharePoint Services
|
Like most organizations, the Microsoft Managed Solutions IT group inside Microsoft
Information Technology (Microsoft IT) has its own Software Development Life Cycle
methods and processes. This arrangement makes adopting an off-the-shelf, "one-size-fits-all"
solution impractical and eventually obsolete. Microsoft Managed Solutions IT needed
to incorporate its particular methodology processes into Visual Studio to better
track developer time and reporting resources.
The solution that the Microsoft Managed Solutions IT group implemented may help
other enterprise organizations incorporate their Software Development Life Cycle
methodology into Visual Studio to provide a completely integrated development environment.
This case study is intended for Chief Information Officers, Project Managers, Development
Managers, Senior Software Developers, and Technical Decision Makers who need to
incorporate their Software Development Life Cycle methodology into the Visual Studio
integrated development environment (IDE).
Situation
The Microsoft Managed Solutions IT group consists of 25 team members who develop
support tools and applications for external customer Desktop computers. The team
used the Team Software Process(SM) methodology and the Personal Software
Process(SM) methodology to facilitate Software Development Life Cycle
processes and workflow in their various development projects. This methodology required
team members to record the time that they spent on each assigned task. Because the
methodology processes were not integrated in the development environment, each team
member used Microsoft Excel® 2000 worksheets to capture the time that they spent
on their allocated tasks. Team members saw this separate process as tedious and
time consuming. Therefore, team members frequently forgot to record their time.
As a result, when the Project Manager later consolidated the various Excel worksheets
to report on the status of the project, the task duration data was sometimes incomplete
and inaccurate.
Note Team Software Process (TSP) and Personal Software Process (PSP)
are service marks of the Software Engineering Institute and are used with permission.
Additionally, team members encountered the following problems by using the Excel
worksheet solution:
-
Individual Excel worksheets did not provide for a central repository from which
team members could collaborate and communicate project status.
-
The Excel worksheet solution did not scale well for larger projects that had many
tasks or many team members.
-
Because the Excel worksheet lacked input controls, inputting duration values into
the Excel worksheet was prone to error.
When the Microsoft Managed Solutions IT group sought a solution that would promote
process efficiency, automation, continuous improvement, and tangible business benefits,
the group confronted the following IT challenges:
-
How to integrate their existing process tools directly into the development environment.
-
How to incorporate an easily adaptable approach to follow these processes as part
of the development life cycle.
-
How to give developers a more convenient way to track and record task duration data.
-
How to provide a central repository to store task duration data and to report the
results in a timely and collaborative way.
Solution
To incorporate the Microsoft Managed Solutions IT group's methodology process requirements
into Visual Studio, VSTS was deployed and extended. The Microsoft Managed Solutions
IT group extended the VSTS development environment by using both of the following
methods:
-
By using the VSTS extensibility features for work item type, the Microsoft Managed
Solutions IT group extended work item types to include information that was necessary
for their methodology processes.
-
By using the Microsoft Visual Studio Software Development Kit (SDK), the Microsoft
Managed Solutions IT group created a Visual Studio add-in to automate how task duration
data was recorded in the Visual Studio IDE.
Note The Visual Studio SDK contains the Team System Partner Extensibility
Kit for Visual Studio. This kit includes documentation and tools for customizing,
extending, and integrating with VSTS.
VSTS architecture
VSTS was built with integration in mind. Therefore, the common data schemas, the
extensible object model, and the authentication mechanisms in VSTS gave the Microsoft
Managed Solutions IT group the platform that it needed. The VSTS architecture is
based on a tiered solution that consists of the following components:
-
Data tier. The data tier uses Microsoft SQL Server™ 2005. SQL Server provides
a storage repository for VSTS and provides a reporting foundation by using SQL Server
2005 Reporting Services.
-
Application tier. The application tier uses Team Foundation Server. Team
Foundation Server provides for an application tier that connects to the data tier
and exposes Web services to a client tier. The application tier is running on Microsoft
Internet Information Services (IIS) 6.0 with Microsoft Windows® SharePoint®
Services installed.
-
Client tier. The client tier uses the Team Explorer Visual Studio add-in
to access the application tier. Additionally, add-ins are provided for Excel 2003
and Microsoft Office Project Professional 2003.
Team Foundation Server
The Team Foundation Server application tier is central to VSTS. You can customize
the following items in the Team Foundation Server application tier:
-
Work items
-
Work item instances
-
Reports
-
Security
-
Project portal
-
Documents and templates
-
Source control settings
-
Process guidance content
Methodology process templates reside on the Team Foundation Server and are applied
to a team project when the project is created. Over the project's lifetime, the
project will adhere to the rules, constraints, and milestones of the methodology
that is chosen.
"VSTS lets me track all tasks and be more predictable about the success of our projects
without implementing too many external tools and processes to support our SDLC."
Leena Porwal
The Microsoft Managed Solutions IT implementation
To incorporate the Microsoft Managed Solutions IT group methodology process into
VSTS, the Microsoft Managed Solutions IT group first modified the default process
template Extensible Markup Language (XML) documents. Then, after importing the new
process template XML documents into Team Foundation Server, any new projects that
were created with the new template would adhere to the new methodology process.
Step 1: Process template modifications
The Microsoft Solutions Framework process guidance provides a disciplined approach
to technology projects based on proven methodologies. This process guidance is incorporated
into process templates to provide a blueprint that new projects follow. Therefore,
by modifying an existing process template, the Microsoft Managed Solutions IT group
leveraged existing guidelines and proven practices that already existed in the process
template. VSTS includes two process templates:
-
MSF for Agile Software Development. This process template is for projects
with short life cycles and result-oriented teams.
-
MSF for CMMI® Process Improvement. This process template is for projects
with longer life cycles and for projects that require a record of decisions that
have been made.
The Microsoft Managed Solutions IT group used the MSF for Agile Software Development
process template as a starting point to incorporate their methodology. After the
group downloaded the process template in Process Template Manager, the group modified
the following four process template XML documents:
-
ProcessTemplate.xml. This XML document contains the name and description
elements. The following XML document fragment illustrates the changes that are made
to the name and description elements to define a new process template:
Note: Some of the following code snippet have been displayed in multiple
lines only for better readability. These should be entered in a single line.
<?xml version="1.0" encoding="utf-8" ?>
<ProcessTemplate>
<metadata>
<name>PSP Methodology</name>
<description>Use this process template for projects that
are based on the PSP methodology</description>
-
Bug.xml. This XML document contains the work item type to resolve a bug and
to verify its resolution. The Microsoft Managed Solutions IT group modified this
work item type to include the fields that are required for the Team Software Process.
For example, the following fields relate to the Personal Software Process and were
added to the bug work item type definition:
-
Bug Date: The date of the bug.
-
Bug Type: A list of bug types.
-
Bug Assembly: The assembly from which the bug was reported.
-
Bug Inject Phase: The phase in which the bug was injected.
-
Bug Removal Phase: The phase in which the bug was removed.
-
Bug Fix Time: The total time that was required to fix the bug.
-
Bug Fix Reference: A reference for the bug.
-
Bug Description: The description of the bug.
The following XML document fragment illustrates the type definition of the Bug Type
field element that was added to the Bug.xml document:
Note: Some of the following code snippet have been displayed in multiple
lines only for better readability. These should be entered in a single line.
<FIELD name="Bug Type" refname="Microsoft.VSTS.Common.BugType"
type="String" reportable="dimension">
<HELPTEXT>The type of the Bug</HELPTEXT>
<ALLOWEDVALUES>
<LISTITEM value="10"/>
<LISTITEM value="20"/>
<LISTITEM value="60"/>
<LISTITEM value="80"/>
</ALLOWEDVALUES>
</FIELD>
-
Task.xml. This XML document includes information to track a task through
the methodology life cycle. The Microsoft Managed Solutions IT group modified this
work item type to include the following fields, which relate to the Personal Software
Process:
-
Delta1: The total elapsed time for a task.
-
Interruption1: The total interruption time for a task.
-
Code Size: The number of lines of code.
-
Phase: The current phase of the task.
-
Start Date: The date when work started on the task.
The following XML document fragment illustrates the type definition of a Code Size
field element that was added to the Task.xml document:
Note: Some of the following code snippet have been displayed in multiple
lines only for better readability. These should be entered in a single line.
<FIELD name="Code Size"
refname="Microsoft.VSTS.Common.CodeSize" type="Integer"
reportable="measure" formula="sum">
<HELPTEXT>The actual lines of codes</HELPTEXT>
</FIELD>
-
WssTasks.xml. This XML document needs to include the methodology process
documents to make them available on the SharePoint project Web site.
Note In each field definition above, the Microsoft Managed Solutions
IT group defined the "reportable" attribute as either dimension or measure. By defining
the attribute for the new fields, Team Foundation Server can then capture the data
in the field in the data warehouse for reporting purposes.
After the Microsoft Managed Solutions IT group modified the process template XML
documents, they used Process Template Manager to upload the process template back
into Team Foundation Server. Now when a new project is created in VSTS, the new
methodology process template can be selected, and the project's task and bug work
items will contain the new fields. Figure 1 shows how some of the new Personal Software
Process fields that were defined in the Task.xml process template document are displayed
to the team members when they open a task work item.
.gif)
Figure 1. Partial display of some of the new task fields in VSTS
See full-sized image
Step 2: Visual Studio automation add-in
With the new process template in place, the Microsoft Managed Solutions IT group
now needed to automate how to record the task duration data for each task. To do
this, the Microsoft Managed Solutions IT group created a Visual Studio add-in that
performed the following tasks:
-
Track the delta time that is spent on a work item task by using stopwatch functionality.
-
Track the interruption time on work item tasks.
-
Calculate the line of code by selecting the code file.
-
Save the delta time, the interruption time, and the line of code to the work item
database.
-
Allow team members to export task data and bug data to an Excel worksheet.
The Visual Studio add-in used the work item tracking object model to communicate
with Team Foundation Server. Figure 2 illustrates the communication process and
flow in the object model.
.gif)
Figure 2. Communication process for the work item tracking object model.
See full-sized image
Work item tracking object model
The work item tracking object model provides a public interface for work item tracking
components in VSTS. The object model communicates with the work item tracking Web
services on the application tier. Then the application tier communicates with the
SQL Server database on the data tier.
The WorkItemStore managed class encapsulates the root node of the work item
object model. WorkItemStore is one of several application programming interfaces
(APIs) that Team Foundation Server exposes through the TeamFoundationServer
class. One instance of WorkItemStore exists for every TeamFoundationServer
instance. The WorkItemStore class covers all the work items, fields, and
stored queries that are defined for that instance of Team Foundation Server.
At a high level, developers can use the WorkItemStore class to get instances
of work items. Work items contain information such as field values, links, and attachments.
Developers can view and edit the value for each field in the collection. Users can
also use the WorkItemStore class to get information about the context of
work items, such as team projects and work item types.
The following sample code illustrates how easy it was for the Microsoft Managed
Solutions IT group to interact with Team Foundation Server by using the work item
tracking object model:
Note: Some of the following code snippet have been displayed in multiple
lines only for better readability. These should be entered in a single line.
using Microsoft.TeamFoundation.Client;
using Microsoft.TeamFoundation.WorkItemTracking.Client;
using Microsoft.TeamFoundation.Server;
...
// Get WorkItemStore from TeamFoundationServer.
TeamFoundationServer tfs
=TeamFoundationServerFactory.GetServer("TeamFoundationServerName"
);
WorkItemStore store = (WorkItemStore)
tfs.GetService(typeof(WorkItemStore));
// Get the work item by the ID or by the URL from WorkItemStore.
WorkItem wibyId = store.GetWorkItem(id);
WorkItem wibyURL = store.GetWorkItem(url);
Team members can now access the completed Visual Studio add-in by clicking PSP Tool
on the Tools menu in Visual Studio. Figure 3 displays the completed PSP Tool:
.gif)
Figure 3. Visual Studio PSP Tool add-in
See full-sized image
Benefits
By using Visual Studio Team Foundation Server to implement their internal methodology,
the Microsoft Managed Solutions IT group received the following key benefits:
-
Standardization of activities. The Microsoft Managed Solutions IT group Team
Software Process methodology and the Personal Software Process methodology can be
implemented across Microsoft IT groups in a standardized way. These systems are
highly-integrated and can address the inconsistencies and the bottlenecks in the
current system.
-
Easily adaptable. Methodology processes are now part of the Visual Studio
IDE. Therefore, the developers can more easily track their tasks and bugs. Process
compliance becomes more automated and adaptable.
-
Central repository. Process data is stored centrally for all the projects
in the work item tracking database. Users no longer have to collect and maintain
data in separate Excel worksheets. Because the data is centrally available, reporting
functionality can be built on the work item store. This central repository simplifies
how projects are tracked and managed and how decision-making is managed for the
project stakeholders.
-
Data accuracy and consistency. Because project data is stored in a central
repository and because developers instantly update the data, project data is accurate
and consistent.
Additionally, the Microsoft Managed Solutions IT group received the following benefits
by incorporating the customized process methodology into the PSP Tool:
-
Task tracking made easy. The PSP Tool has built-in stopwatch functionality
for time tracking. Developers can more easily track the time that they spend on
their tasks while they continue to work on their code in the Visual Studio IDE.
This functionality eliminates the need to track time in a separate process.
-
Readily available data. The PSP Tool has export functionality. Users can
export Team Software Process task data and bug data to an Excel worksheet. This
data is specific to the user and the project.
Conclusion
The Microsoft Managed Solutions IT group leveraged the customizable and extensible
VSTS platform to improve the results of its existing organizational processes and
frameworks. Because VSTS is integrated into the Visual Studio 2005 IDE, VSTS reduces
the complexity of process integration and project collaboration while at the same
time increasing visibility among all members of the Microsoft Managed Solutions
IT group. The fully customizable and extensible object model in VSTS gives development
teams a platform where they can build custom tools for any of their development
process needs.
For more information
For more information about VSTS, refer to the Visual Studio 2005 Team System Web
site at http://msdn.microsoft.com/en-us/aa740411.aspx.
For more information about SQL Server 2005, refer to the SQL Server 2005 Web site
at http://msdn.microsoft.com/en-us/sqlserver/default.aspx.
For more information about Windows SharePoint Services, refer to the SharePoint
Web site at
http://www.microsoft.com/WindowsServer2003/technologies/sharepoint.
For more information about the TSP/PSP development methodology, refer to
http://www.sei.cmu.edu/tsp.
Note Carnegie Mellon University and the Software Engineering Institute
do not directly or indirectly endorse the work of Microsoft as described in this
technical case study.
For more information about Microsoft products or services, call the Microsoft Sales
Information Center at (800) 426-9400. In Canada, call the Microsoft Canada information
Centre at (800) 563-9048. Outside the 50 United States and Canada, please contact
your local Microsoft subsidiary. To access information via the World Wide Web, go
to:
http://www.microsoft.com
http://www.microsoft.com/itshowcase
http://www.microsoft.com/technet/itshowcase
For any questions, comments, or suggestions on this document, or to obtain additional
information about Microsoft IT Showcase, please send e-mail to:
showcase@microsoft.com