Visual Studio 2010: Enabling ALM
Visual Studio 2010 seriously raised the bar for application lifecycle management. From test and debug to team-based collaboration and project management, here's an in-depth look at the improved tooling.
When Visual Studio 2005 Team System debuted five years ago, it promised collaboration for remote project teams through role-based architect, developer and test editions of the IDE, all integrated with a build server and source-control system. Companies understood the premise behind integrated team development tools, but many were slow to adopt them.
With the release of Visual Studio 2010 Ultimate and Team Foundation Server (TFS) 2010 this spring, Microsoft has made great strides in improving its suite of products designed to streamline the end-to-end process of developing and maintaining software.
"The whole goal with Visual Studio 2010 and Team Foundation Server 2010 now is to enable even better integration and communication between all the different team members that make up a project, because a project is not just made up of developers. You've got the testers, the business analysts [and] the architects, and by using these two tools in conjunction, you get an even better synergy," says Mickey Gousset, senior technical developer at Infront Consulting Group.
ALM for the Masses
With 2010, Microsoft changed the licensing of TFS -- the source control and build system that anchors its application lifecycle management (ALM) suite -- which was rebranded Visual Studio 2010 Ultimate to simplify the number of SKUs. TFS 2010 requires Windows Server 2008 with IIS and SQL Server 2008.
"We focus on one end of the spectrum on our large enterprise customers where we offer a rich set of features, integration with other source code integration, back-end management tools, portfolio [tools and more], but our biggest vision at Microsoft is to bring the benefits of ALM to all developers," says Sean McBreen, senior director for Visual Studio and MSDN product management at Microsoft. "In this release we did a lot of things to help bring ALM to the masses. We reduced the price, we included TFS in all of our MSDN subscriptions and we've really focused on simplifying the experience as well."
Early on, those moves seem to be paying off. "It used to be reasonably hard to get, very expensive and reasonably hard to deploy as well," says Ben Day, a Visual Studio ALM MVP and head of Benjamin Day Consulting Inc. "Now that they've made the deployment a lot easier, the licensing is $500 retail and TFS comes with just about every MSDN license that's out there. So Microsoft is trying to make it so that no one has an excuse to go to Subversion or Git or any of those other free open source version control systems.
Since that has changed, I personally see a lot more people who are interested in moving to TFS off of Visual SourceSafe."
"TFS is ultimately going to replace Visual SourceSafe," agrees Gousset. "The fact is, TFS can be used whether you've got one person or whether you've got a shop of 3,000 or 30,000 people."
For those getting started with TFS, it's easy to get overwhelmed, Gousset says. He recommends using the well-integrated version control features first, before moving onto features such as work item tracking or reporting.
TFS supports integrated ALM, which is the standard practice in enterprise environments. However, some open source developers are moving toward distributed version control systems (DVCS) such as Git and Mercurial. Microsoft acknowledged that trend in late January when it added support for Mercurial on CodePlex, and indicated that it would support migration from TFS to DVCS.
Since 2005, TFS could follow whatever development process you wanted it to; it shipped with the Microsoft Solution Framework (MSF) CMMI and Agile, and you could create customized process templates. In 2010, a certified process template menu option was added that links to an online gallery for third-party templates.
Microsoft is also making a big push to focus on Agile development in TFS 2010. "The MSF/Agile process template was updated to be slightly more Scrum-like, and TFS 2010 comes with several different [Excel] project workbooks that tie into the work-item-tracking system to allow you to easily do burn downs and allocate resources and have visual graphs that show you where resources are over allocated," explains Gousset, coauthor of "Professional Application Lifecycle Management with Visual Studio 2010" (Wrox, 2010). (For more on Agile and Scrum in TFS 2010, see "TFS 2010 Reframes Scrum," p. 18.)
Jeff Levinson, ALM technical lead at Northwest Cadence Corp., calls the Agile workbooks "nice tools" that sit on the biggest change: work-item hierarchies, work-item relationships and the ability to report on those relationships. "Today it's just flat links between work items," Levinson says.
This new functionality addresses a major pain point in both Agile and Waterfall development. "Now all of a sudden you can port over a Microsoft Project schedule into TFS and vice versa, and it will maintain your entire [work breakdown structure] as well as doing the rollups in Project, which is something that was really painful in 2008," recalls Levinson. "If you lost your project schedule, you were in real trouble, and you had to recreate it all from scratch."
Improving the hair-pulling installation of TFS 2010 is another key area that Microsoft addressed. The process, says Gousset, is broken into discrete install- and wizard-driven configuration phases. "I've been able to stand up a whole TFS after I've got the basic components installed -- like SQL Server -- in less than 30 minutes. It's a much, much better process," he explains.
Before getting started, Gousset recommends downloading the latest installation information from MSDN, which includes a step-by-step installation guide to TFS and the pre-reqs, and reading through it a few times before doing an install.
With 2010, TFS users also have a lot more configuration options. "You can now finally load balance," says Gousset. "They've also made some changes internally on how things are stored in the database as far as your team projects and other items. They did this from a management perspective to make it easier to manage and administer your Team Foundation Server."
The new Basic TFS configuration available with Visual Studio 2010 Professional and an MSDN Premium subscription can be installed on client operating systems, Windows 7 and Windows Vista, for the first time. TFS 2010 also supports 64-bit servers.
TFS 2005 and 2008 required either Windows SharePoint Services or SharePoint Server to support a portal for documents and other files related to your team project. In 2010, it's still an option, but no longer a requirement. "Before, you had to have a portal to even create a Team Project," says Gousset. "Now if you don't want to deal with a whole SharePoint site you don't have to."
One compelling reason to use SharePoint 2010 with Microsoft ALM is the new dashboard capabilities based on the integration of SharePoint and Excel services, observes Levinson. "From a project manager's perspective and a stakeholder's perspective, people want to know what's going on," he says.
Another change with TFS 2010 is that you get an automatic TFS Client Access License (CAL) if you have Visual Studio with an MSDN subscription. "That's handy," says Gousset, "because TFS ultimately does come down to having a Client Access License to access it."
Client access is available through various SKUs, but the definitive toolset is Visual Studio 2010 Ultimate. It rolls up all of the architect, developer and most of the test advances into a single IDE.
The 2005 and 2008 versions of the Architect tooling left a lot to be desired, according to some developers. Visual Studio 2010 Ultimate integrates commonly used Unified Modeling Language (UML) 2.0 modeling diagrams -- class, sequence and use case -- formerly only available in Microsoft Visio.
"In 2010, they've really given us something we can work with," says Day. "I use something called a layer diagram; you can group sections of your code like DLLs into various layers and set rules between the layers. At compile time you can validate your code against your layer diagram. When I did that, I could see that a lot of my junior developers were not adhering to my design."
Another new feature is Architect Explorer: "Every developer has been in this situation, where you're given some code that you didn't write and you're told, 'Here, you need to understand the code and maintain it,'" says Gousset. "Usually the first thing you do is you start opening up all the different project files and looking through all the C# and VB code, start trying to map things out on paper, or start drawing diagrams on paper trying to understand how the code works. With the Architect Explorer you can do all that instantly and graphically inside of Visual Studio."
Gousset sees Architect Explorer as having an immediate impact. "You can drill down into a project and then into the individual files and the individual classes and individual methods, and you can select different classes, projects or methods and have them displayed for you in what is called a dependency diagram."
After the release of Visual Studio 2008, Microsoft decided to combine the database and developer tools, allowing free licensing of either edition for a limited time to current users. In Visual Studio 2010, several new features and enhancements are designed to help developers write and maintain quality code.
The new historical debugger, now called IntelliTrace, allows you to see a stack trace of what happened when your application crashed or during the testing process, which eliminates issues such as the "no repro" scenario, according to Microsoft. You can actually flip through the stack trace and see what's happening in the code. This allows developers to drill down and see exactly why the code failed, where the problem was and how to fix it.
Static code analysis was also greatly enhanced in 2010. The program ships with 200-plus static code analysis rules you can use to really analyze your app for anything from globalization all the way down to making sure you're using strings the right way, Gousset says.
"It looks at your code and makes sure that you're doing things around best practices with the .NET Framework. And it can find problems, such as if you're using integer pointers wrong and therefore on a 64-bit system your code is going to fail," he explains. "It can detect all of these things in your application, which makes it find bugs before you actually push this thing out to production -- but these aren't bugs that you're going to find just by hitting F5 or just by running this through a build process."
Reconstructing Team Build
The automated build system in TFS was also completely reworked, so that Team Build is now based on Windows Workflow 4.
"Before, the customization was all in MSBuild, which is an XML format," explains Day. "Now it's rewritten so that it's Windows Workflow-based, which is going to make customization a lot easier."
[Click on image for larger view.]
|Figure 1. A key advance in Team Foundation Server 2010 is the long-awaited hierarchical work items, which enable you to break down tasks into sub-tasks. |
Understanding the build process is a lot easier too, he says. "You can see step-by-step what's happening. XML had this really weird, kind of backward way of doing things so that stuff appeared by magic."
The learning curve on Windows Workflow 4, which was rebuilt in the Microsoft .NET Framework 4, is not really an issue, according to Day. "The designers that they give you are really nice, and you can drag and drop these steps and connect these things together," he says.
Microsoft has also introduced gated check-in, a major productivity boost for teams dealing with continuous integration. "If someone checks in something that doesn't compile or the unit tests don't pass for the application, it's always a big runaround trying to go and fix that," says Day. "With gated check-in, your code doesn't immediately commit to the main source repository, it commits to something called a Shelfset first and an automated build runs against the code that was checked into the Shelfset. If that build runs and passes completely, then it checks your code into the main repository. If it doesn't build completely, it says, 'Hey, this is broken, go fix it' -- and it blocks you from checking in."
Shoring up Test
With 2010, Microsoft has shored up a hole in their ALM offering. "The testing tools that they had were OK," says Levinson. "The Web protocol tests and the load tests were good, but it did not hit the level of functional testing and systems testing that most organizations need."
In 2010, test cases are introduced in what Microsoft deems a "generalist testing" SKU called Visual Studio Test Professional 2010. Test cases allow you to create a new kind of work item for functional testing that goes step-by-step through what you want in a test to make sure that a feature is working. Then, you run it through an external interface called the Manual Test Runner.
"As you run each step, you can mark each step as passing and failing and watch it record what's happening during the testing process," says Gousset. "If a bug is found during the testing process, it records the stats of what's happening. And if you're using TFS on the back-end, all of this gets rolled up into a work item, which you can assign to the developer."
With this release, Microsoft is definitely trying to bring QA people into the fold, says Day, by providing automation options to take some of the pain out of their day-to-day life.
"What's nice with this Test Manager tool is that as QA [people] go through and do it, it will record their mouse clicks and their typing, so that when they get another build in a couple weeks or a couple days, they can do something called Fast Forward testing," says Day. "So they replay their previous typing and mouse clicking against a brand-new version of the application and it does it in 30 seconds instead of five minutes. When they're done they can comment on whether it actually worked or not."
"We made sure that we brought testers into the lifecycle to reduce that frustration," says Microsoft's McBreen. The "rich actionable bug" concept -- new in Visual Studio 2010 Ultimate -- exemplifies this, he says. The advanced testing tools capture information to streamline the workflow between developers and testers, providing real-time debugging tools such as the stack trace, video and script logs, server-side information and historical debugging in IntelliTrace.
TFS on the back-end handles the reporting function so that a team leader can view a project's status. Visual Studio 2010 also introduces a virtual Lab Management server SKU, which at press time was still a release candidate. "With this Lab Management piece, you have the ability using Hyper-V and System Center Virtual Machine Manager to automatically spin up test machines as you need them," says Gousset. "Using Team Build and this lab manager, you can run your build process, spin up a virtual machine, put your application on it and run a bunch of tests against it -- all automatically at night while you're sleeping."
With 2010, Microsoft's "no repro" claims are well-founded, says Levinson. "They've done a really great job between the test case management, the IntelliTrace and the Lab Management all working together. It's just huge in terms of reducing the amount of rework."
[Click on image for larger view.]
|Figure 2. A Layer Diagram shows the layers of physical artifacts and dependencies in a system so that architects can communicate the intended architecture and validate it against code.|
The Microsoft ALM suite is designed to support the end-to-end development and application lifecycle of software. The company has made tremendous advances in this release, but a few areas still need work. Companies that want a requirements tool need to use a third-party product. The same is true for documentation.
"With a lot of companies that I work with, they don't really do requirements," says Day. "If you're doing Agile development, you do just enough requirements gathering to know how to implement the features that have to get done -- you're not necessarily writing gigantic specs."
Deployment is also more of a headache than some people would like. The ability to build .MSI files and installation packages using Team Build is still lacking. "People want to be able to do that, and right now it's not easy to do at all," says Gousset.
Early in the planning cycles, Microsoft considered integrating the Windows Installer XML (WiX) technology into Visual Studio, according to several developers, but it was taken out. WiX is a semi-open source project that Microsoft is heavily involved in; you can integrate it and it works fine, says Day.
People also want better offline access to TFS version control, one of the many sticking points for developers using some of the free version-control systems that are out there, like Subversion and CVS.
"The TFS version control right now does support offline, meaning you can contact it and then bring yourself online to it, but sometimes it can be a pain," says Gousset. "A lot of shops are using Subversion or these other systems like Mercurial, and they start moving to TFS and there's a lot of resistance from the developers because it's a completely different animal," he says. "So even if you don't get your developer buy-in initially, you've got to at least show them some of the extra benefits that TFS is giving them over the system that they're currently using and that goes back to training and education."
Third Time's the Charm
To get the most of the tools you need some training on the technology basics, best practices and a roadmap on where you should be six months from now, advises Gousset. "If you just put this product in and tell your developers to go start using the tools, they're not going to use them. It's definitely worth the investment to get that information from somebody who has been using this product for a long time."
Day advises his customers to get comfortable with Scrum. "It's a mindset that gets the team thinking about how they're going to do their work, and then once they've started to get that mindset, then they can use Team Foundation Server to help stream the actual Scrum process."
While lean software engineering like Agile requires tight turns, Microsoft ALM is also targeted at distributed development teams that may have longer lag times based on the "transparency" that underscores the tooling, says McBreen.
Levinson says a lot of the major improvements in 2010 are about driving quality and embedding quality into the process. "What they've done a pretty good job of is ensuring that everybody has the tools they need to help bake quality into the product instead of doing it as an afterthought, which is what I think a lot of people do now."
Microsoft is in a strong position to make a really big splash in ALM, says Gousset. "It's got everything you need for the application development lifecycle: not just the software development piece, which is where the coders get involved, but everything from pre-design -- where you're just gathering requirements from the business users to figure out what you're actually trying to build -- all the way through maintenance, where all you're doing is tracking the bugs and doing bug fixes and everything in between."
Everyone agrees that "version 3," as is often the case with Microsoft products, may be the driver that unleashes ALM in the .NET market.