Identify and Isolate Code Problems
Your first look at IBM Rational PurifyPlus for Windows.
IBM Rational PurifyPlus for Windows is a three-program suite designed to help you improve your software's quality by identifying potential problems. All three programs support Visual C/C++, Java, C#, and VB.NET. Rational Purify detects memory leaks and runtime errors automatically, Rational Quantify isolates bottlenecks by measuring application performance, and Rational PureCoverage tells you how much of your source code is exercised during execution. All three share a similar UI and integrate with VS.NET. The product also includes a tool called Visual Trace.
Installation is easy to follow and intuitive, but it does take a while to scan for required information. The distribution CD includes the Rational Download Manager, which helps you get large files from the Rational servers as quickly as possible. The CD also includes the product documentation.
One of the nice features of each product is that you can control how much information you view by the number of classes you select. However, selecting every class in a large application results in too great a volume of information to be practical.
The Visual Trace tool lets you see in real time how your application uses memory and how the app's threads behave (see Figure 1). Memory management isn't supposed to be an issue in the .NET world, but opportunities to cause problems still arise. I created some objects in a test application and created a thread that referenced them, but never terminated the thread. Next, I ran the application, used the Purify Toolbar to take a snapshot, then took another snapshot after I was sure the thread had executed. I was able to determine which functions were responsible for memory allocation by viewing the call graphs and function allocation list.
Purify lets you focus on speed once you get your application working properly. Quantify shows you the most expensive (in terms of performance) sections of code in a call graph and lets you examine them more closely. You can run Quantify again after modifying this code to see if the changes improve your application's speed.
PureCoverage gives you an impressive amount of data about exactly how many and which lines of code execute when you run your application. This is an invaluable tool for test engineers. It helps you build your test cases to be more effective and lets you quantify how much code each test case exercises.
PurifyPlus is impressive overall and provides a great deal of useful information. I recommend taking the time to read the documentation, because these programs are so powerful and give you so much data that it's easy to get overwhelmed. You'll need to get used to the different toolbars Rational provides, but this requires a short learning curve. Anyone in any stage of software development or testing can benefit from PurifyPlus almost immediately.
About the Author
David Mack is a technical lead for the National Intelligence Division of Titan Systems and a software consultant. He has more than 10 years of experience in object-oriented programming. Reach him at [email protected].
|IBM Rational PurifyPlus|
Price: Contact vendor for pricing.
Quick Facts: Automated runtime-analysis tools that track down memory corruption and leaks, find bottlenecks, and identify how much source code executes.
Pros: You can view data by call graph or function calls; tooltips provide metadata about source code; supports .NET managed code, Java, and Visual C++; integrates with VS.NET.
Cons: Might be overwhelming if you select every class in a large project to examine.
Build Menus and Navigation Bars
by Ken Cox
Posted November 7, 2003
The ASPxNavigation Suite from Developer Express includes a menu control and a navigation bar for ASP.NET pages. The ASPxMenu control creates typical vertical and horizontal menus, complete with rollover effects, submenus, and embedded images. Its extended functionality implements context menus and blocks of text as popups that are detached from the master menu. The navigation bar componentASPxNavBarcreates collapsible groups of links, such as panel bars, complete with embedded rich text. This package ships with the C# source for its assemblies, so you can customize the controls to your heart's content and rebuild them to whatever version of the .NET Framework you encounter.
If you've used Microsoft's VS.NET server-side controls, you'll have no trouble adding menu items, spacers, and submenus and configuring them with text, graphics, and navigation URLs. A real bonus in these controls is support for templates. You can insert any server-side control or HTML markup into a menu or popup, just as you would in an ASP.NET DataList or DataGrid control. You could assemble a Web portal using these navigation controls as containers for portlets, such as server-side controls.
The design-time experience inside VS.NET is somewhat disappointing. When you drop a control onto a Web form, you get a gray block rather than a realistic representation of the menu you're about to build. Fortunately, the MainMenu control comes to life on the design page as you add menu items through the collection editor (see Figure 1). The ContextMenu and PopupWindow controls reveal their appearance only at run time. Developer Express might consider defaulting to a skeleton design rather than an uninviting gray block and improving the overall visual design support.
The components in the ASPxNavigation Suite offer straightforward object models with adequate documentation of the events, methods, and properties, if you want to build your menus programmatically. A tutorial for beginners would be a good idea.
The sample Web pages work fine but should also show advanced database-driven techniques and personalized menus. In the same vein, it would help the artistically challenged to offer additional menu styles, such as Outlook, flat borders, and chrome effects. That said, too much eye candy bloats the rendered HTML and client-side script. These navigation controls appear refreshingly lean and nimble.
Developer Express' support staff answered my newsgroup and e-mail questions promptly. Patches are available if you report reproducible issues. Despite the wish list I've outlined, this suite represents a solid valueversatile controls at a reasonable price with template support and valuable source code.
About the Author
Ken Cox is a VB.NET developer in Toronto building e-commerce Web applications and XML Web services. Ken is a former broadcast journalist and currently a Microsoft MVP for ASP.NET. Reach him at [email protected].
|ASPxNavigation Suite 1.0|
Quick Facts: Menu, navigation bar, and popup window controls for ASP.NET Web pages.
Pros: Nimble performance; includes source code; reasonable price; good support.
Cons: Limited WYSIWYG support in VS.NET designer; needs more advanced samples and menu styles.