Volume 29 Number 1
Visual Studio 2013 : Introducing Visual Studio Online
Ed Blankenship | January 2014
Note: This article is no longer current. Visual Studio Online is now called Visual Studio Team Services and has evolved significantly. Please see https://www.visualstudio.com/team-services/ for more information.
Whether you’re part of a team or you’re a team of one, with Visual Studio Online you can easily plan, create, construct, build, test, and monitor seriously demanding applications, from anywhere. You don’t need a large infrastructure team, and you don’t need to touch a single server. As someone who has performed hundreds of Team Foundation Server (TFS) installations and upgrades as a consultant, I love how the drudgery of that kind of routine maintenance is now a thing of the past. Visual Studio Online is updated with the newest features automatically and continuously, so you can focus on what you need to do most: construct your applications!
I’m often asked, “Isn’t Visual Studio Online just TFS in the cloud?” The answer is yes and no.
TFS was introduced eight years ago, and began the move to a cloud-hosted application lifecycle management (ALM) service in 2012 with the launch of Team Foundation Service. There has been great adoption from day one, with individual development teams starting up and even midsize companies choosing to leave their on-premises infrastructure behind. The big deal is this: every few weeks, new features appear to your team as the TFS product group wraps them up in their internal development iterations. Account holders can find out what’s new by watching the Features Timeline at bit.ly/17DV8Yl or by following social media like VSOnline on Twitter (twitter.com/vsonline).
So, yes, Visual Studio Online is the next evolution of TFS and Team Foundation Service, bringing you the fundamentals of ALM in the cloud. And no, it’s not exactly the same thing.
As Microsoft transforms to a devices and services company, many of you have asked, “What does this mean to me as a developer?” With Visual Studio Online, Microsoft now has a platform of services you can take advantage of whether you’re moonlighting on your own personal projects or working on larger systems with your team. I’ll explore a few of those services.
ALM and Beyond
Being cloud-based enables Visual Studio Online to deliver some high-powered experiences:
Build in the cloud. No servers, no overhead—great. Your code starts from a clean server image every time the build executes. Those dependencies and machine configurations you didn’t even know about causing headaches down the road? Gone. You still have full access to your build drops because they’re also stored in your source repository in Visual Studio Online. Need a more complex setup? Consider a hybrid solution—save your precious on-premises resources for those highly customized workflows or infrastructure and use Visual Studio Online for basics such as continuous integration.
Load test in the cloud. It’s hard for individuals, startups and even larger teams to do proper performance and load testing because the setup and resources are so expensive and time-consuming. How can you justify the expense when you don’t know whether the application you’ve built will catch on? Instead of launching and hoping, now you have access to full-featured load testing as a service that runs on Microsoft infrastructure, which always has the latest version of the load-testing software. You aren’t limited to those retired machines you scrounged from the supply room or stuck figuring out what you need to install and configure—you can set up and scale your tests in whatever way you need to make your run realistic. Whether you’re adding 100 virtual users or you need to crank it up to get ready for the holiday season, the load-testing service can handle what you need, when you need it.
Real-time, 360-degree application monitoring. You don’t have a full-time service center monitoring the status and health of your production systems? With Visual Studio Online, now you do. Visual Studio Online Application Insights collects rich operational, performance and customer usage information from your applications—whether they run on-premises, in Windows Azure, at third-party cloud providers, or in a hybrid manner across all three. More than just keeping the lights on, you can also proactively monitor usage to help you decide which killer feature to build next. The service also takes advantage of application meta-information that can help when you’re investigating live issues such as build and deployment information, which lets you get back to your solution and source code in any of your environments (including production). It already knows because it’s in the same data store with the rest of your ALM information, which saves you time.
Bring your own IDE, or get a lightweight code editor in your browser. Visual Studio Online makes it easy for you to update your code any way, anytime, anywhere. You have Visual Studio, of course, and now you can use a true Git repository for seamless connection to Eclipse, Xcode, and many other IDEs for your cross-platform development projects. Otherwise, keep it simple: update on the fly, from any modern browser, with the new, lightweight Visual Studio Online code editor, code-named “Monaco.” This code editor is complementary with your use of Visual Studio on your desktop.
Just like you, Microsoft is committed to delivering continuous value, with significant new releases to Visual Studio Online every three weeks. If you have a great idea for a feature, you can even cast your own vote on UserVoice. So what are you waiting for? Head over to visualstudio.com and get started. It’s free for the first five users and an included benefit for MSDN subscriptions, and there are introductory discounts for pay-as-you-go services and additional Visual Studio Online user plans for your other team members. You don’t have to worry about additional storage, transactions, bandwidth, compute cycles and so on because they’re included in the user plans and pay-as-you-go services.
From Zero to Hero: Set up Your Project for Success
Want to see how Visual Studio Online can help you deliver the next killer app? The following scenario will guide you through an example initial iteration with Visual Studio Online. If you’ve used TFS or Team Foundation Service, some of this will look familiar.
Here’s the scenario: You’re the lead developer on a small team with limited resources but a great idea for an application. You need to get started quickly, but you expect the app to be around for a while so you want to put your project on a path to continued success. You don’t want to waste any time setting up infrastructure or deployment pipelines or test harnesses. You just want to build your application and get it into your customers’ hands as soon as possible.
It’s quick, easy and painless to get started. Go to visualstudio.com, find the “Get started for free” link in the upper-right, fill out the form and … you’re done.
Once you have an account, you need a place where you and your team can work. In Visual Studio Online, the top-level container is a Team Project, so your first step is to create one of those. You need to make two important decisions at this point:
- Which kind of source control repository to use, and
- Which process template would be best for tracking your work items.
The choice for source control is between distributed version control with Git and the traditional version control that you’re familiar with in TFS. For example, suppose your team is currently writing a Windows Phone 8 app and its back-end services, but plans eventually to port the mobile app to iPhone and Android devices. Knowing you’re going to have to work across multiple platforms and with different IDEs, you choose to go with Git for your source control repository. For more about the choice between Team Foundation Version Control (TFVC) and Git, check out the Channel 9 video at bit.ly/16XPcUK.
The process template is what defines your workflow: what your work items are called, what states they go through as you work on them and other metadata. You can choose between three templates: Scrum, Agile and Capability Maturity Model Integration (CMMI). If your team is doing CMMI or a more formal process, you should probably go with that template. If you’re an agile team, or you don’t have a particular process, choose between the Agile and Scrum templates. The biggest difference between the two is how they handle bugs and what name they use for backlog items. The Agile template treats bugs as tasks, while the Scrum template displays them on your backlog along with other backlog items. If you aren’t sure, stick with the Scrum template—it’s the default for a reason. Choosing the Scrum template doesn’t mean you have to do Scrum; it simply means you’ll see Scrum terminology used for work item types. Scrum refers to requirements as Product Backlog Items (PBIs) and the Agile template refers to them as User Stories. Learn more about working with team projects and the key differences between the process templates at bit.ly/Vh0azl.
Once you have your account and your team project, it’s time to add your team members. To add them, make sure you have their Microsoft accounts (formerly Live IDs), browse to your project homepage (myawesometeam.visualstudio.com) and follow the flow shown in Figure 1.
Figure 1 Adding Team Members
If you want to fine-tune permissions and other administrative details, use the settings gear icon at the top.
Get on Track: Set up Your First Iteration
With the administrative details complete, it’s time to get to work. You’ve chosen the Scrum template, but your team (all five of you) is not completely sold on the need to adopt formal Scrum. You know you want to work in iterations, delivering functioning code as fast as possible and incorporating feedback from your customers into the next iteration. You also want to keep track of what work is currently in progress and what work is coming up, and have a way to prioritize that work.
Before getting started with work items, I’ll take a quick look at some of the details. Choosing the Scrum template means you’ll be working primarily with features, PBIs, bugs and tasks (there are other work item types, but most of them help you behind the scenes). Figure 2 outlines the relationships between these work item types, which are maintained with work item links.
Figure 2 Work Item Relationships
Generally, a feature represents an amount of work that will span iterations (these are sometimes referred to as epics), PBIs are units of customer value that can be completed in a single iteration, and tasks are units of work that can be completed in a couple of days. Using them this way lets you scope your project view to whatever level of granularity makes sense at the time, whether at the portfolio level or down to the details. There’s a lot more to work items than what I discuss here, and I encourage you to check out the relevant articles on MSDN for more information.
One final note on working with work items: just because a field is there doesn’t mean you have to use it. Use the fields that make sense for your team and ignore those that do not. My advice from helping many teams in the past is to keep things as simple as possible.
It’s time to start filling the backlog, so click the Work tab on the project page. This will bring up your product backlog.
The menu on the left lets you scope your view to the appropriate level of granularity, and you can add items to that level from the list on the right. Reorder your PBIs vertically to prioritize your backlog.
Now that you have some work in the Product Backlog, it’s time to start thinking about your first iteration. Your team wants to move fast, so it decides to deliver iterations in one week, with the goal of going to production every Tuesday. The first thing to do is give your iteration some dates. You can accomplish this in the settings menu or, if your view is scoped to a particular iteration, in the “Set Dates” link.
After your iteration has dates assigned to it, you can start assigning PBIs from your backlog into your iteration by dragging them from the right and dropping them on the appropriate iteration on the left. Once the PBIs are in an iteration you can break them into individual tasks for your team members, as shown in Figure 3.
Figure 3 Iteration Planning
This is just the tip of the iceberg regarding what you can do with the agile planning tools. As your team grows and your needs become more complex, you can add things like capacity planning, forecasting and test-plan management. For now, this is as much complexity as you need, so start completing PBIs.
As you burn through items in your backlog, you need to keep track of your work in progress. Your team wants to get a better feel for the status of the current iteration, so during your next daily standup meeting you pull up the iteration task board.
This gives you a good view into the status of each PBI and helps keep your daily standup meeting on track. The iteration task board is drag-and-drop and touch-enabled, so you can quickly make updates during the meeting to keep the board (and your work item states and team assignments) up to date.
The iteration task board is great for tracking work, but to get a feel for the flow of value through your team you need a board scoped to the PBI or feature level. Switch over to the Kanban board, which is accessible from the product backlog.
From here, you can set work-in-progress limits for each column, track the flow of work, and check out your team’s cumulative flow diagram. You want the Kanban board to reflect your team’s workflow, so click the Customize columns button and make the appropriate changes. Change the name of the columns and add new ones if you like. The nice thing is that each team can customize the columns to suit its own needs without affecting other teams.
Now, suppose you’ve landed your first investor! Unfortunately, this company is not the silent type, and to keep the money flowing it wants weekly status updates on value delivered and the quality of the product. That seems like a lot of overhead. Fortunately, you know about work item charting, shown in Figure 4, which lets you quickly and easily produce the reports you need.
Figure 4 Work Item Charts
Ten minutes later, your investor is happy and you can get back to making your customers happy. You can even pin the work item charts you’ve created to the team’s dashboard.
Delivering Value: Building Your Application
You know how to code. You also know that keeping quality up to snuff is of paramount importance to your customers. Unfortunately, you and your team are so full of new ideas that sometimes it’s easy to race on to the next notion, without fully fleshing out the current one.
Your code base doesn’t always compile successfully. After a quick retrospective, your team decides it needs to start using automated builds, either by using a continuous integration (CI) build or even putting a gated check-in in place to keep bad code out of the repository. You don’t have the infrastructure or the time to set up your own on-premises build server. That’s where the Visual Studio Online cloud build service comes to the rescue.
From Team Explorer in your Visual Studio IDE, select the build page and then New Build Definition. Give the new definition a name, select your trigger and walk through the rest of the wizard. Don’t forget to save your build definition when you’re done.
Just because it’s a CI build (or any other trigger type) doesn’t mean you can’t kick it off manually whenever you need a build off-schedule. Of course, you could kick it off from Team Explorer, but where’s the fun in that? Pull up your friendly browser and head to the Build tab on your project page. Select your build from the list on the left and click Queue Build.
After you have a CI build set up and underway, jump over to your team room to view the results and share the good news with your team. For more information on builds, check out bit.ly/158otoM.
Load Testing on Demand
Your user base is growing rapidly, but users are reporting a lot of lag on your site. You’re unable to pin down the source of the lag, so you want to create some realistic performance and load tests to help uncover the slow spots. You begin by recording some Web performance tests with Visual Studio Ultimate. Each test represents a typical way a user would interact with your site, which is called a synthetic transaction.
You then combine the performance tests to simulate a typical load on the system. Later on, you plan to create some other scenarios, but for now, you just want to stick to the normal happy-path scenario.
Once you’ve balanced your performance tests into a load test, you set the load test to run on Visual Studio Online by opening the test settings file and choosing Visual Studio Online. You can then watch as the data rolls in, as shown in Figure 5.
Figure 5 Viewing Load-Test Results
Yes, you did just do that in less than an hour. For a more detailed walk-through, see bit.ly/18hIcCm.
Monitor and Continuously Learn: Collect Telemetry Data
Your application and its supporting Windows Azure sites and services are live. Users seem to be downloading it. People seem to be browsing the site and the client app is hitting the services back end. Something, at least, appears to be happening. You’re just not quite sure what …
You need to start collecting telemetry data across your entire application. Not just the Web pages, server performance and Windows Phone 8 app, and not just on your Windows Azure data tier. You need a complete view across the entire end-to-end UX flow. Meet the new Application Insights service on Visual Studio Online.
To get started with the Application Insights service, go to the homepage of your Visual Studio Online account and click on the Application Insights tile. You need to register your application with your invitation code because the service is currently in limited preview. Once that’s done, you can set up a simple test to ping a URL (the New Single URL Test) and watch the data start flowing. This is an example of a basic ping test, but you can also leverage the synthetic transactions you created as Web performance tests for your load tests earlier. You can then monitor your application with basic ping tests or synthetic transactions from multiple datacenters from around the world.
You can also configure the Microsoft Monitoring Agent to report application performance-monitoring data to the Application Insights service. This will provide an even better look at how your application’s services are behaving with each of its dependencies, including databases and other services.
For most sites and connected apps, nothing is more important than uptime. Your application is no different and, unfortunately, you’ve been blindsided by some customer reports that your service was down even though you thought it was up. You need live, constant availability monitoring so you’re the first to know if a test fails or your site goes down. That’s exactly what Application Insights can give you.
Knowing whether your site is available is great. Knowing exactly what line of code or stored procedure is slowing it down is better. Being able to jump directly to that line of code in your IDE from your performance-monitoring service is, well, downright amazing. Application Insights discovers dependencies, shows you when you’ve made new deployments and aggregates all of the performance information to give you the top 10 slowest parts of your application.
Now that you have performance monitoring from Application Insights, you’ve drastically driven down your mean time to repair service and your mean time to restore service.
When you first went to market with your application, you had a solid understanding of what your application was going to do and how your customers were going to interact with it. Now your customers’ needs are evolving and your application needs to evolve with them. You have many hypotheses about how to improve the customer experience, but what you need is the telemetry data and meta-telemetry data to prove your assumptions and hypotheses. With the inclusion of usage monitoring in Application Insights, you get the multidimensional data that will guide your future investments in your application, as shown in Figure 6.
Figure 6 Application Insights Dashboard
As your team works more and more with Application Insights, you begin to realize you’ve gone through a paradigm shift in the way you build software. No longer are those insights an afterthought; you’ve made this process a full member of your application lifecycle, drastically influencing how your team thinks about the application. You can even use the SDK to start reporting custom business metrics that can be tracked on your dashboards, or to send custom developer trace events.
Application Insights has created a connection between your developers and the way customers use your application. Questions of how the user is going to interact with the application, how a new change is going to impact performance and how to maintain the near-perfect availability of the application are discussed throughout the entire lifecycle.
So there you have it: a quick introduction to the newest member of the Visual Studio family. Visual Studio Online is a cloud-based platform of tools and services that helps you plan, deploy and manage your application. It evolved from TFS and Team Foundation Service, bringing the Microsoft ALM platform to the cloud and strengthening it with new services like Application Insights and an online IDE. And it’s just the beginning. Even if you’re using TFS on-premises, you can take advantage of Visual Studio Online services like load testing and Application Insights as you need them. The Visual Studio Online team is committed to continuously delivering value, with significant updates every few weeks.
Ed Blankenship is product manager for Visual Studio Online and Visual Studio ALM at Microsoft. Before joining Microsoft, he was voted Microsoft MVP of the Year (Visual Studio ALM, Team Foundation Server) for 2010 and was a Microsoft MVP for five years. He’s the lead author of two books on Team Foundation Server, including “Professional Team Foundation Server 2012” (Wrox, 2013).
Thanks to the following technical experts for reviewing this article: Andrew Clear and Cheryl Hammond (ALM consultants with Northwest Cadence)
Andrew Clear and Cheryl Hammond are ALM Consultants with Northwest Cadence. They have written numerous papers and presentations on Visual Studio ALM, co-created an enterprise agility training series, and consulted for large and small clients in North America, Europe, and Asia.