青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

C++ Programmer's Cookbook

{C++ 基礎} {C++ 高級} {C#界面,C++核心算法} {設計模式} {C#基礎}

Microsoft Visual Studio Team Edition for Software Developers

See this in the MSDN Library See This in the MSDN Library

Microsoft Visual Studio Team Edition for Software Developers

A new standard in developer productivity

?

Eric Lee
Microsoft Corporation

January 2005

Summary: Describes the features available in Microsoft Visual Studio Team Edition for Software Developers for improving code quality. (18 printed pages)

Note This content originally appeared in the January 2005 edition of .NET Developer's Journal. It is reproduced here with permission of the publisher.

In 1991, Microsoft released Visual Basic 1.0 and ushered in a new era of developer productivity. Building graphical user interfaces for Windows applications (which was once the domain of a select few) became instantly accessible to a broad range of developers. Over time, Visual Basic was joined by Visual C++, Visual C#, and Visual J# to form the Visual Studio suite. Although the development challenges have changed (from building desktop applications to building applications for the Internet), Visual Studio has remained true to its birthright of maximizing developer productivity.

Today, it is increasingly common, and crucial, to measure developer productivity at the team level, rather than merely at the individual level. Building software for today's global market requires a variety of disciplines working together in teams.

The introduction of Visual Studio Team System extends the promise of productivity, which was introduced in 1991, from the individual developer to these multidiscipline teams. Visual Studio Team System was designed from the ground up to recognize both the needs of the unique disciplines involved in software development today, as well as the need for these unique disciplines to work together. Figure 1 illustrates the various components that make up Visual Studio Team System.

Figure 1. Visual Studio Team System

Visual Studio Team System targets individual disciplines with editions targeted at Architects, Developers, and Testers. Each uses the traditional Visual Studio 2005 as its base. From that base, each edition adds features that reflect their namesake disciplines as well as features to reflect how these disciplines work together.

Tying these disciplines together is Team Foundation Server. Team Foundation Server provides the source-code control, work item tracking, data warehousing, and reporting that allows developers, architects, testers, and project managers to work together efficiently.

The discipline-focused Team editions and Team Foundation Server together form a comprehensive suite of technology. To help understand the best way to use this technology, Process Architecture and Guidance (PAG) content was created to illustrate how Visual Studio Team System can be used to address real-world problems.

Finally, Visual Studio Team System recognizes the importance of being a platform on which partners can build their own technology. Visual Studio Industry Partners (VSIP) has long been a part of traditional Visual Studio offers. Visual Studio Team System continues this tradition; there will be a wide range of extensibility points available in Visual Studio Team System.

This article primarily focuses on Microsoft Visual Studio Team Edition for Software Developers features. However, as we examine each feature, we will take the opportunity to explore other features that are available in Team System.

Working at AdventureWorks

As an example, suppose that we are developers working in a fictional company called "AdventureWorks." Our company sells outdoor sporting goods through its Web site, as shown in Figure 2. Our job is to implement a new feature that will allow our customers to pick up items they have purchased at a physical store, rather than having the items shipped to them.

Figure 2: AdventureWorks Web site

Working on a Team

Deciding on what code to write and communicating that choice to your team can sometimes be a clumsy affair with today's programming environments. Typically, software development teams use their own work item tracking tools; testers and project managers just do the best they can to track the progress of these work items.

The integration of Visual Studio Team Edition for Software Developers with Team Foundation Server is intended to make this workflow more natural, and therefore more productive. Work items are stored in Team Foundation Server and are accessible from a number of clients, including Visual Studio Team Edition for Software Developers. Our project managers have created a schedule and a list of work items, using Microsoft Project and Microsoft Excel, to track this new feature.

These tools are not traditional development tools. However, Visual Studio Team System was designed from the beginning to recognize the different disciplines that are part of software development, as well as the different tools that these disciplines use.

Visual Studio Team System will ship with plug-ins to Microsoft Excel and Microsoft Project that allow these tools to use Team Foundation Server to create, modify, or delete work items. Figure 3 illustrates how you can use Microsoft Excel to import work items that are actually stored in Team Foundation Server. The extensions to Excel and Project were built using Visual Studio Team System's extensibility framework.

Figure 3. Importing work items into Microsoft Excel

With the schedule and work items in hand, we can start our development work. Figure 4 shows how we would use Visual Studio Team Edition for Software Developers to view the work items that were assigned to us.

Figure 4. Viewing work items in Visual Studio

As we work (i.e., resolving work items, fixing bugs, etc.) and change the status of these work items, our project managers can refresh their spreadsheets and project plans to get an instant status update whenever they want to. Within Visual Studio Team Edition for Software Developers, we can choose whether we want to be notified when our work items in Team Foundation Server change. Figure 5 shows how we can make these choices. As we work, we can rest assured that if any of our work items change, we will be notified instantly.

Figure 5. Changing the status of work items

Writing Code: A Test-Driven Approach

Visual Studio Team System allows you to follow any number of development practices. One practice that's gaining momentum is test-driven development. This revolves around the idea of writing tests first, followed by your actual feature code. This novel approach has proved to be very effective in practice.

Visual Studio Team System is very well suited for test-driven development, so we will use it as an example. However, the scope of this article won't allow for the in-depth discussion that test-driven development deserves; a much more detailed explanation of this development practice can be found at http://msdn.microsoft.com/msdnmag/issues/04/04/ExtremeProgramming/.

Our first work item calls for us to implement in-store pickup. Because we are using a test-driven development approach, our first step will be to write the code that will test this feature, rather than the feature itself.

One of the benefits of starting with the test is that you can define the most intuitive interface for your feature first. This can occur without being influenced by how that feature may have been implemented. In our case, we will choose to expose our new functionality through a function in our business logic called DoInStorePickup.

Our first unit test (see Figure 6) is C# code. The code is decorated with attributes. These attributes are used to identify what methods in a given class represent a test and how that test should be executed.

Figure 6. C# code, with test attributes

If we were to build at this point, our test would not compile because we have not implemented the DoInStorePickup method. This is intentional. Following test-driven development, our next step is to write just enough code to make our test compile.

We can easily do this by using the refactoring features in Visual Studio 2005 to generate a stub for our new method. Visual Studio 2005 allows you to choose an arbitrary piece of source code and refactor it into various things such as methods or classes. In Figure 7 we will use this feature to generate a method stub for DoInStorePickup.

Figure 7. Generating a Stub method

After creating a stub for DoInStorePickup, we can build and run our test from within Visual Studio Team Edition for Software Developers. Figure 8 illustrates the simple, easy-to-use user interface part for organizing, executing, and monitoring the process of our unit tests. More extensive organizational features are available with Visual Studio Team Edition for Software Testers.

Figure 8. Organizing unit tests

As you can see in Figure 8, the first attempt at running our test has failed. This is another intentional aspect of test-driven development. Our next step is to add just enough functionality to InStorePickup to allow our test to pass.

By using this iterative process of writing a test and then writing just enough functionality to allow it to pass, we can build toward more complicated functionality. The final product of our test-driven efforts will be a fully implemented feature with a full suite of unit tests that will catch possible regressions in the future. As an example, we will fast forward through this process and finish off our method. Figure 9 shows the complete code for our DoInStorePickup method.

Figure 9. Complete DoInStorePickup method

One benefit of test-driven development is that the tests usually execute a high percentage of our feature code. One of the many attributes that we can configure as part of a unit test run is one that automatically collects code coverage data. Figure 10 shows how we can select which artifacts (i.e., Visual Studio projects and binaries) we want to collect code coverage for.

Figure 10. Selecting artifacts for code coverage

Code coverage results are organized in a hierarchical manner by namespace, class, and method. Code coverage data in this form is well suited for merging between runs or publishing as part of a larger report. Figure 11 illustrates how code coverage results are just another aspect of test results.

Figure 11. Code coverage results

For day-to-day development or whenever more immediate feedback is needed, Visual Studio Team Edition for Software Developers can report code coverage in its natural environment: source code. Figure 12 shows how code coverage results are associated with your source code.

Figure 12. Code coverage with code

Lines that were executed are shown in green, uncovered lines are shown in red, and partially covered lines are shown in blue. Lines of code that are branches or loops are most often partially covered. In our example, we can see that we missed an entire method. Unit testing is also available in its natural environment. In the code editor, we can choose what we want to test and automatically create a unit test. Figure 13 shows how this functionality is integrated into Visual Studio's code editor. The resulting unit test is very similar to the one we just hand-coded. Generating unit tests automatically can be very useful if you already have an existing code base to generate a suite of unit tests.

Figure 13. Automatically generating unit tests

Saving Our Work: Using Source-Code Control

With our in-store pickup feature written, the next logical step would be to check-in our changes. Visual Studio Team System introduces a completely new, enterprise-level source-code control system that is an integral part of Team Foundation Server. Figure 14 shows one aspect of this new system: the pending check-ins dialog box.

Aside from seeing what files need to be checked-in, with this dialog box you can query to find work items to associate with this check-in. Work items associated in this manner are automatically checked-in. The check-in notes page on this dialog box is a customizable interface that your organization can use to gather information pertinent to a given check-in.

Figure 14. Pending check-ins

The last aspect of this dialog allows us to introduce another feature in Visual Studio Team Edition for Software Developers. Team Foundation Server allows you configure and optionally create policies that are enforced with each check-in. One of the policies you can enable specifies static code analysis should be run before each check-in.

Automatic Code Reviews

Static code analysis is essentially an automated code review; it is available in Visual Studio Team Edition for Software Developers for both .NET and C/C++ source code. For .NET, the analysis is done based on a set of configurable warnings (see Figure 15). These warnings identify known issues involving security, performance, design, and general quality. Continuing with the theme of extensibility in Visual Studio Team System, you can write your own plug-ins and use them with managed code analysis.

Figure 15. Configurable warnings

When we run code analysis on our example, we see that several issues are identified in our source code. Code analysis warnings are shown in Visual Studio's task list so they should be familiar to any developer. Code analysis for C/C++ is specially tuned to identify potential security vulnerabilities such as buffer overruns. The exact code paths to these types of errors (which are not as common in .NET code) are highlighted directly in Visual Studio's code editor. Figure 16 shows the path of execution that is vulnerable to a buffer-overflow.

Figure 16. Vulnerable code

For some warnings, we may want to do some more in-depth investigation. We can use Team Foundation Server to file bugs directly against these warnings. Figure 17 shows an example of how we can create a bug based on a code analysis warning.

Figure 17. Creating a bug based on code analysis

Once we correct these warnings, we will be able to check our changes into Team Foundation Server. Code analysis gives us confidence that our source code has passed a rigorous analysis against known issues.

Before we call it a day, our last step will be to investigate the performance characteristics of the code we just wrote. There are a number of ways to start a performance investigation; for this article, we will go back to our unit test. Based on our code coverage results, we know our unit test does a good job of exercising our source code. Now, let's use that unit test to drive our performance investigation.

We can create a Performance Session directly from the result of our unit test. Figure 18 shows an example of how this is done.

Figure 18. Creating a performance session

Writing Efficient Code

The Visual Studio Team Edition for Software Developers Performance Tools trace their technological roots back almost a decade to the labs of Microsoft Research. At that time, Microsoft Research was responsible for a set of performance tools that was created to help optimize products such as Windows Server 2003 and SQL Server. From these efforts came technology that would eventually find its way into Visual Studio Team Edition for Software Developers—albeit in a much more refined, enterprise-friendly form. Visual Studio Team Edition for Software Developers allows us to gather performance data at a number of levels. We can use a method of profiling called sampling to get a very high-level view of the potential hotspots in our application. From there, we can use Visual Studio Team Edition for Software Developers to insert timing probes into our application; this process is called instrumentation. This method of profiling allows us to gather very detailed performance data about specific areas in our application. For .NET applications, we can gather data about how our application is using memory. This is often a key factor in how an application performs.

Visual Studio Team Edition for Software Developers hides all of the complexity of configuring an application for profiling behind a wizard (see Figure 19). We can choose to profile .NET, ASP.NET, or C/C++ applications, and Visual Studio Team Edition for Software Developers will ensure that our application is properly configured for profiling.

Figure 19. Configuring an application for profiling

Once Visual Studio Team Edition for Software Developers has gathered data about our application, we generate a performance report based on this data. This report can be viewed in a number of different ways depending on whether you want to see how functions call each other, a sequence of events, or a list of all function called by your applications.

It's very easy to gather a lot of performance data for an application. To help cope with this data, you can generate a summary that highlights key areas where you might choose to start your investigation.

For example, a histogram can be rendered to show your .NET application is using garbage collection. A suspicious pattern in this histogram would lead you to the Allocations view shown in Figure 20. This view shows all of the .NET types that were allocated by your application, and the functions that did the allocation. This view allows you to quickly spot any objects that might be causing problematic garbage collection patterns.

Figure 20. Allocations view

Communicating Status

Once we have fixed any possible performance issues or entered work items for them in Team Foundation Server, we're ready to check-in our work. We can associate our check-in with the work items that started us off.

These work items will be automatically resolved and the project managers at AdventureWorks who created them can easily see the progress we've made in their Excel spreadsheets or Project plans. Figure 21 shows all of our initial work items completed.

Figure 21. Initial work items completed

Conclusion

Visual Studio Team Edition for Software Developers takes the best of Visual Studio 2005 (programming languages, debuggers, libraries, etc.), and extends it with features targeted toward developers working on a team. The goal of Visual Studio Team Edition for Software Developers, and Team System as a whole, is to take the vision of productivity that created Visual Studio in the first place and extend it to the enterprise. We found that the challenge to realizing this vision is not just in how developers, testers, project managers, and architects worked on their own, but it is also in how they work together. Every aspect of Visual Studio Team System 2005 was carefully designed and scrutinized to ensure that they work together seamlessly. From this crucible comes a product, like its distant cousin, Visual Basic 1.0, that will usher in a new standard of developer productivity.

?


About the author

Eric Lee graduated from the University of Windsor Ontario in 1998 and joined Microsoft shortly afterwards. He has spent his career at Microsoft as a tester, developer, and now product manager for the Developer Tools division. Eric previously held positions on the Windows Server 2003 team, where he contributed to Enterprise UDDI Services.

posted on 2006-06-16 09:44 夢在天涯 閱讀(971) 評論(0)  編輯 收藏 引用 所屬分類: C#/.NET

公告

EMail:itech001#126.com

導航

統計

  • 隨筆 - 461
  • 文章 - 4
  • 評論 - 746
  • 引用 - 0

常用鏈接

隨筆分類

隨筆檔案

收藏夾

Blogs

c#(csharp)

C++(cpp)

Enlish

Forums(bbs)

My self

Often go

Useful Webs

Xml/Uml/html

搜索

  •  

積分與排名

  • 積分 - 1812199
  • 排名 - 5

最新評論

閱讀排行榜

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
      <noscript id="pjuwb"></noscript>
            <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
              <dd id="pjuwb"></dd>
              <abbr id="pjuwb"></abbr>
              国产精品久久九九| 久久久久天天天天| 亚洲人成在线播放| 久久综合导航| 日韩午夜电影在线观看| 欧美大香线蕉线伊人久久国产精品| 久久国产精品99精品国产| 一区二区三区久久久| 欧美激情综合五月色丁香小说| 久久综合给合| 日韩亚洲视频| 亚洲视屏一区| 在线观看91精品国产入口| 欧美韩国日本综合| 欧美日韩免费看| 久久动漫亚洲| 欧美freesex8一10精品| 亚洲性夜色噜噜噜7777| 午夜国产不卡在线观看视频| 伊人蜜桃色噜噜激情综合| 亚洲人成绝费网站色www| 国产精品初高中精品久久| 久久全球大尺度高清视频| 欧美韩日一区| 久久精品国产清自在天天线| 欧美成人嫩草网站| 欧美影院午夜播放| 欧美电影免费观看大全| 欧美在线观看网站| 欧美国产日韩一区二区在线观看 | 欧美a级大片| 亚洲天堂偷拍| 久久一区二区三区超碰国产精品| 一区二区三区日韩在线观看| 久久精品二区三区| 亚洲欧美日韩国产成人精品影院 | 亚洲国产综合在线| 国产女优一区| 亚洲美女av黄| 亚洲大胆视频| 午夜精品一区二区三区四区| 日韩网站在线| 裸体歌舞表演一区二区| 欧美影视一区| 欧美午夜视频网站| 亚洲国产精品传媒在线观看 | 国产精品久久毛片a| 欧美激情视频在线播放 | 狼人天天伊人久久| 久久精品噜噜噜成人av农村| 国产精品xnxxcom| 亚洲第一色中文字幕| 国产一区日韩一区| 亚洲综合精品一区二区| 亚洲素人在线| 欧美日韩国产bt| 91久久午夜| 亚洲精品乱码久久久久久黑人| 欧美一区二区三区视频| 亚洲欧美亚洲| 国产精品伦一区| 亚洲一区不卡| 午夜天堂精品久久久久| 国产精品热久久久久夜色精品三区 | 亚洲国产色一区| 国产女同一区二区| 亚洲一区在线观看视频| 亚洲一区自拍| 国产精品国产三级国产a| 亚洲免费av观看| 中文久久精品| 国产精品久久久久久久浪潮网站| 9色porny自拍视频一区二区| 一区二区欧美视频| 欧美深夜福利| 亚洲综合色激情五月| 欧美亚洲在线视频| 国产一区二区中文字幕免费看| 欧美自拍偷拍午夜视频| 老司机免费视频久久| 最新中文字幕亚洲| 欧美日韩国产麻豆| 亚洲免费一级电影| 久久国产精品久久精品国产 | 久久一区精品| 亚洲国产精品成人va在线观看| 9久re热视频在线精品| 国产精品久久激情| 久久久www成人免费无遮挡大片 | 欧美14一18处毛片| 日韩视频免费看| 国产精品欧美在线| 久久久久欧美| 亚洲免费大片| 久久五月天婷婷| 日韩天天综合| 国产在线拍揄自揄视频不卡99| 久久综合五月| 亚洲天堂av图片| 美国十次了思思久久精品导航| 日韩午夜视频在线观看| 国产女优一区| 欧美电影免费网站| 亚洲欧美中文日韩v在线观看| 欧美成人一区二区三区| 亚洲欧美在线另类| 亚洲激情电影在线| 国产午夜精品福利| 欧美日韩精品综合| 久久综合五月| 欧美一区二区日韩一区二区| 亚洲毛片视频| 麻豆精品传媒视频| 亚洲欧美日韩国产| 99pao成人国产永久免费视频| 国内精品久久久久久久果冻传媒 | 欧美四级伦理在线| 另类天堂av| 欧美一区观看| 亚洲午夜高清视频| 亚洲精选久久| 欧美高清在线一区| 久久精品视频免费观看| 亚洲淫片在线视频| 99热在线精品观看| 亚洲国产精品一区二区第一页| 国产欧美日韩三级| 国产精品久久国产精品99gif| 欧美成人一区在线| 乱人伦精品视频在线观看| 久久久之久亚州精品露出| 亚洲黄色小视频| 狠狠色丁香婷婷综合久久片| 国产精品亚洲一区| 欧美日韩网址| 欧美精品一区在线| 欧美激情亚洲视频| 欧美粗暴jizz性欧美20| 久久综合五月天婷婷伊人| 久久免费偷拍视频| 老色鬼精品视频在线观看播放| 欧美中文字幕在线观看| 亚洲欧美三级伦理| 亚洲欧美日韩一区在线| 亚洲综合色自拍一区| 亚洲女同精品视频| 午夜视频在线观看一区二区| 亚洲综合第一| 香蕉久久精品日日躁夜夜躁| 欧美一二三视频| 欧美伊人久久大香线蕉综合69| 欧美一级专区免费大片| 欧美在线一级va免费观看| 久久久久成人精品免费播放动漫| 久久av老司机精品网站导航| 久久精品国产精品| 久久久一本精品99久久精品66| 久久美女艺术照精彩视频福利播放| 久久久精品tv| 欧美99久久| 欧美少妇一区二区| 国产视频在线观看一区二区三区 | 国产精品久久精品日日| 国产日韩精品一区二区| 国内外成人在线视频| 1000部精品久久久久久久久| 亚洲精品在线观看免费| 正在播放欧美视频| 久久国产精品一区二区三区四区| 久久婷婷国产综合尤物精品| 亚洲高清不卡在线| 亚洲无玛一区| 久久免费高清视频| 欧美日韩一区高清| 国产一二三精品| 亚洲精品在线观看免费| 欧美一区二区三区四区在线 | 亚洲视频在线观看一区| 久久精品成人欧美大片古装| 亚洲国产精品一区二区尤物区| 亚洲一品av免费观看| 久久久综合香蕉尹人综合网| 欧美日韩国产美| 黄色精品在线看| 亚洲自啪免费| 欧美高清在线视频| 午夜精品一区二区三区四区| 欧美国产视频一区二区| 国产亚洲电影| 亚洲深爱激情| 欧美~级网站不卡| 亚洲欧美日韩精品久久| 欧美日本韩国一区二区三区| 国产主播一区| 亚洲欧美日韩在线观看a三区| 欧美成人嫩草网站| 欧美亚洲免费电影| 国产精品xxxav免费视频| 亚洲三级国产| 免费成人av在线看|