VS2010: Lifecycle Management
By Tim Anderson
Visual Studio 2010 makes it easier to manage the application lifecycle from design through to deployment.
HardCopy Issue: 52 | Found In: Visual Studio 2010 | Published: 19/05/2011 | Last Revision: 19/05/2011
Visual Studio 2010 is the third major release of Microsoft’s suite of application lifecycle tools. At its heart is Team Foundation Server (TFS), a repository for source code and ‘work items’ such as bug reports, feature requests or performance issues which is integrated with the Visual Studio IDE. A project portal built on SharePoint supports the team, letting you review project status, get reports and interact with team members. TFS also links with Microsoft Office, so for example you can list, analyse and even create TFS work items in Excel. There are also hooks into Microsoft Project.
There is a build system for automating, managing and verifying builds, while process templates offer guidance and documentation for specific development methodologies, the default being Microsoft Solutions Framework for Agile Software Development. New process templates are available for download, including one for Scrum which includes work items to define sprints, impediments and other elements of this popular methodology.
Managing a sprint in the Visual Studio Scrum process.
In addition, there is a comprehensive set of Visual Studio tools for modelling and diagramming, test-driven development, load testing and performance testing. Some of these can be used without installing the full suite: unit testing, for example, comes with all paid-for editions of Visual Studio.
Microsoft has worked hard to simplify TFS installation, which is inherently complex because of dependencies on other products including SharePoint, SQL Server, IIS and System Center. With TFS 2010, a wizard will do most things for you if you are happy to accept one of the two default configurations. You can choose between Basic, which installs only source control, work item tracking and build services and can be used on a client or a server; or Standard Single Server which includes SharePoint for project portals and requires a server operating system.
The appearance of TFS Basic is significant. This can even run on the same machine as Visual Studio, so small teams and lone developers can use features such as source code management without needing a third- party add-on.
A fully-featured Team Foundation Server installation spans multiple servers and incorporates build management and lab management as well as SQL Server reporting and SharePoint team sites, and this type of installation is more complex to build and configure. Fortunately there is extensive documentation, and downloadable Power Tools include a Best Practice Analyzer to identify configuration and security issues.
What's new
Along with simplified deployment, new team features include Lab Management (see page 35), a new Web access feature, IntelliTrace debugging that lets you step backwards through code, and numerous other changes and updates.
Team Web Access was originally developed by devBiz as TeamPlain Web Access. Whereas the Project Portal focuses on non-code elements, such as documentation, reporting and analysis, the Web access site is purely for developers. You can access code with changesets and version history, work items such as bugs and tasks, and reports on builds. It is a slick, fast Web application and useful both internally and externally.
Feature Packs and Team Explorer Everywhere
Since the release of Visual Studio 2010, Microsoft has extended it significantly through feature packs. “Feature Pack releases represent ideas we intend to incorporate into future versions of Visual Studio, but make available early using extensibility,” explains Microsoft’s senior developer vice president S Somasegar in his blog.
There are currently four feature packs, mainly limited to MSDN subscribers. These cover integration between TFS and Project Server, Load Test feature pack which allows unlimited virtual users for load test runs, Lab Management Feature Pack for integrating with a Hyper-V test lab, and Feature Pack 2 which is focused on testing and modelling.
Feature Pack 2 updates the earlier Visualization and Modeling Feature Pack. One of the most interesting features is the ability to generate C# code from UML class diagrams. The conversion process respects classes, interfaces, properties and methods, and converts packages to corresponding namespaces. It is also possible to amend the template which generates the code, or to create new templates which generate different code.
Feature Pack 2 also enhances the Architecture Explorer, which is a tool for visualising source code, so that it supports C and C++ code as well as C# and Visual Basic, and allows you to drag types from the Architecture Explorer to UML class diagrams.
Team Explorer Everywhere is a set of tools which extend access to Team Foundation Server. A plugin for Eclipse, the open source Java tools platform, adds comprehensive support for TFS integrated into Eclipse. You can check-in and check-out code, view history, query and view work items, queue builds and use a Team Explorer. There is also a command-line client written in Java that runs on a number of systems including Mac OSX, Linux, Solaris, IBM AIX and more.
And finally there is a standalone Windows client for Team Foundation Server, called Visual Studio Team Explorer. In combination with Web access via the project portal and Team Web Access, these tools make TFS widely accessible.
IntelliTrace is a new approach to source code debugging that relies on a trace log created as the application runs. The advantage is that you can back-track through application state to examine conditions before the bug occurred, rather than just afterwards. This is often more illuminating and can be a great time-saver. You can use IntelliTrace directly within the Visual Studio IDE, when debugging locally, or examine logs created either by IntelliTrace or by the Test and Lab Manager.
By default IntelliTrace does not log call information, which minimises performance impact but makes it less useful. Activate full IntelliTrace logs by enabling IntelliTrace events and call information in Visual Studio options. When you hit a breakpoint, you can step back as well as forward through code, examining previous values of variables. Another benefit is the IntelliTrace Events view, which gives a user-friendly view of application events such as button clicks.
Modelling
Visual Studio has taken a variety of approaches to modelling and architecture over the years, some of which failed to achieve wide adoption and were dropped in subsequent versions. Unlike some previous efforts, Visual Studio 2010 does not attempt to re-invent modelling but rather to provide strong modelling tools based on the UML standard, as well as integrating a model-driven approach into tools throughout the IDE. Workflow projects, for example, are a natural fit with model-driven development and Visual Studio provides the necessary tools. The diagramming tools benefit from the new WPF-based IDE.
In Visual Studio 2010 you can create Modeling Projects that contain diagrams. UML support is a big theme and diagrams based on UML 2.1.2 include Activity, Component, Class, Sequence and Use Case. A new diagram type called a Layer Diagram lets you describe the logical architecture of an application, with each layer representing a logical group.
Diagrams are also used to better understand existing code. You can generate a dependency graph showing the relationships and organisation of a project, or drag code elements from the new Architecture Explorer onto an existing graph diagram.
Build management
Visual Studio 2010 includes a build management system with hooks into other parts of the suite. Configuration involves a build controller to manage builds, and one or more build agents to carry them out. In small setups this can all be on one machine, or more normally on separate servers. The build system can be linked to check-in, so you can do continuous integration with a build on every code check-in.
New in this edition is Gated Check-in, where code is only fully checked-in if it builds successfully. You can also define a process including automated tests, code analysis and workspace cleaning. If Lab Management is enabled, the build process integrates with lab environments for automated virtual deployment and testing.