HomeDigital EditionSearch Dotnet Cd
ASP.NET C# Certification Exams The CLI Data Access Editorials Extending .NET Fundamentals Interoperability Interviews Migrate Mobile .NET Mono .NET Interface Object-Oriented Programming Open Source Optimization Product/Book Reviews Security Source Code UML Visual Studio .NET

Compuware DevPartner Studio Professional Edition 7.1
Write more maintainable and efficient code

It is an unfortunate reality that most software today is developed without any prior design or thought to software engineering best practices. This is analogous to a house builder showing up with a truck full of wood and a nail gun, and – thump, thump, thump – starting construction without any blueprints.

If you care (and I'm sure you do) about software engineering and .NET best practices and, ultimately, the quality of the software you produce, then you should definitely take an extended look at Compuware DevPartner Studio Professional Edition 7.1.

This product is an advanced suite of developer productivity tools aimed at helping software developers produce high-performance, scalable, maintainable, bug-free software. Essentially as far removed as possible from the thump, thump, thump of the guy with the nail gun.

Installation of DevPartner Studio was a breeze. The product tightly integrates simultaneously with Visual Studio .NET 2002 and Visual Studio .NET 2003. Integration with Visual Studio 6.0 is also supported but was not tested for this review.

Compuware has provided an excellent set of manuals with DevPartner Studio 7.1, enabling you to very rapidly experience a return on investment within your team's developments. Personally, I like reading printed manuals, although I do admit that online manuals are great for searching for information that is intent on hiding from you. So I'm glad to say that Compuware has provided both printed manuals and online documentation in the form of both PDF and MSDN integrated documentation available directly within Visual Studio .NET.

Static Code Analysis
Static code analysis is the term used by Compuware to describe code review; it ensures that the code developed within a solution is consistent and meets criteria specified through coding rules for such aspects as performance and security.

Often development teams consist of developers with varying levels of experience; without tools such as DevPartner Studio 7.1, the code and design of such teams would undoubtedly be inconsistent, which would lead to a less maintainable code base.

Equally, most software development teams have not embraced the idea of pair programming, in which two programmers work together on each piece of functionality, offering constant mentoring to junior developers.

Using the static code analysis features of DevPartner Studio 7.1 you can provide that second programmer through the tool, therefore mentoring all members of your development team and achieving many of the benefits of pair programming.

In Figure 1 you can see DevPartner Studio 7.1 after it has performed static code analysis of one of the sample applications supplied on the installation CD. Using the DevPartner Solution Tree (shown on the left of Figure 1) you can restrict the rule violations shown to either a particular project or source file, or even down to the individual classes and methods.

Out of the box the product ships with an impressive array of predefined rules. However, these rule sets are extensible using the associated rule editor; equally, you can suppress rules temporarily if you wish to concentrate on one particular area, such as security or performance rules.

Memory Analysis
Running your managed-code application under memory analysis enables you to gain insight into which elements of your application are responsible for utilizing memory, thus enabling you to track which references are currently holding objects in memory, and to identify the individual lines of code responsible for the allocation of that memory.

This insight will enable you to visually ascertain which elements of your application could benefit from refactoring to reduce the overall memory footprint of the application. As you run your application in debug mode you can visualize memory usage in real-time.

As you can see in Figure 2, the memory analysis can be viewed while debugging your application, allowing you to see the effects of individual lines of code on memory utilization.

Check Early, Check Often: Runtime Error Detection
DevPartner Studio 7.1 is tightly integrated into the Visual Studio .NET debugger, allowing you to jump directly to the line of code that generated an error detected by the runtime error–detection facilities.

An example of how DevPartner Studio 7.1 can help with error detection is through the graphical representation of adding and releasing references to COM/COM+ components through calls to AddRef()and Release(), allowing you to identify where COM components were not released after their use.

Another form of error that is difficult to find without DevPartner Studio is that of deadlock errors. If your application contains multithreaded C++ code, DevPartner Studio 7.1 allows you to more easily discover deadlocks and also takes you directly to the offending lines of code within the application.

Runtime error detection in DevPartner Studio 7.1 also includes detection of several .NET-specific errors such as classes implementing the IDisposable interface where the associated Dispose() method makes no call to the garbage collector GC.SuppressFinalize() method. (This would also be detected by the associated code rules in static analysis.) The product also provides a link to information within the MSDN library detailing why this is an error. Therefore, in essence, DevPartner Studio 7.1 becomes an excellent learning tool even for developers who have been writing .NET managed code for some time.

Performance Analysis
Performance (along with security) is often a critical aspect of software that is not thought about until software is in the final stages of development.

By integrating the use of DevPartner Studio 7.1 into your daily development process you can begin analyzing your application's performance characteristics from the time the first line of code is written.

As with other analysis features, the performance analysis is available directly from within the Visual Studio .NET environment, allowing you to profile unmanaged C and C++ code, as well as managed C++, C#, and Visual Basic .NET code.

DevPartner Studio also has the capabilities to analyze performance of ASP.NET Web applications and ASP.NET Web services. If you have IIS installed locally – as many developers do – then you are good to go; if you have IIS installed on a remote server, then DevPartner must be installed on that server and configured to collect performance information.

One excellent aspect of the performance analysis provided by DevPartner is its ability to compare side by side performance sessions both before and after code changes to provide optimizations. This enables you to easily see which version of an algorithm or which changes provide the best impact on performance.

DevPartner Studio 7.1 also provides call graphs directly within Visual Studio .NET showing the progress of calls through your application and also highlighting critical path calls that should be considered candidates for performance optimization.

Coverage Analysis
Finally, Compuware has provided an excellent code coverage analysis tool in DevPartner Studio 7.1, allowing software developers and testers to ensure all code paths are thoroughly tested. This feature supports managed and unmanaged code, including ASP.NET Web applications and ASP.NET Web services.

Code-coverage analysis allows you to see your source code colored to indicate code that was run on a particular pass; it also offers references in the left margin to show how many times a particular piece of code ran.

Conclusion
Compuware has provided a truly indispensable set of tools in DevPartner Studio 7.1, and through the integration with various editions of Microsoft Visual Studio, these tools will become a natural extension of how you write software today.

I am definitely looking forward to writing cleaner, more maintainable, more efficient code in the future using Compuware DevPartner Studio Professional Edition 7.1.

Resource

  • Beck, K. (2000). Extreme Programming Explained – Embrace Change. Addison Wesley.

    Company Info
    Compuware Corporation
    One Campus Martius
    Detroit, Michigan 48226
    Phone: 800-COMPUWARE
    Web: www.compuware.com

    Test Configuration
    Sony RX-755 Pentium 4 2GHz 512 MB RAM
    Windows XP Service Pack 1a
    Visual Studio .NET 2002 and Visual Studio .NET 2003

    Author Bio
    Doug Holland, a professional .NET consultant based in Roseville, CA, has over eight years of experience in designing and developing software. Doug currently works with the .NET Framework and specializes in consulting for companies using IBM Rational XDE for .NET development. doug.holland@sys-con.com

    All Rights Reserved
    Copyright ©  2004 SYS-CON Media, Inc.

      E-mail: info@sys-con.com