January2003January 2003

Design: Inspect and Optimize Your Program's Memory Usage with the .NET Profiler API

Developers using .NET often make memory leak tracking a low priority because the common language runtime takes care of garbage collection. What few developers realize, however, is that their objects' lifespans, along with their size and what other objects have been instantiated, all affect how they are cleaned up. Depending on the particular circumstances, these combinations can negatively affect performance, especially over the lifetime of an application. This article presents a way for developers to see memory usage and understand garbage collection using the .NET Profiler API. Along the way, a sample application to demonstrate these principles is built. Jay Hilyard

Debug: Detect and Plug GDI Leaks in Your Code with Two Powerful Tools for Windows XP

In a previous article, the author devised a simple method to detect Graphical Device Interface (GDI) objects that are not properly released by Win32-based applications on Windows 9x platforms. Because some newer versions of Windows require a slightly different approach to GDI leaks, the author has updated his techniques for those operating systems. He builds and explains two tools designed to detect and eradicate GDI leaks in applications running on Windows XP, Windows 2000, and Windows NT. Christophe Nasarre

Scale: Real-World Load Testing Tips to Avoid Bottlenecks When Your Web App Goes Live

Load testing should be part and parcel of every Web development effort, and it should be performed early in the process. However, if you think you can load test using your development environment, you're going to have some surprises when you go live. In this article, the authors outline the process of planning your load testing effort, considering which machines to use, how many users to simulate, which tools are right for you, and how to interpret your results. Jeff Dunmall and Keith Clarke

Test: Build Quick and Easy UI Test Automation Suites with Visual Studio .NET

The .NET Framework provides a surprising new way to quickly and easily create user interface test automation. By using objects in the System.Reflection and System.Threading namespaces, you can write automated tests in minutes instead of hours. This article walks you through the building of a typical Windows-based application that will be used as the test subject. The author then runs through the creation of a C#-based test tool that simulates clicking the test app's UI controls and checks the application's state. After the tool is built, the author explains in detail how it works so you can modify and extend it for your own use. James McCaffrey

Go Mobile: Create Compact, Robust Mobile Apps with SQL Server CE 2.0 and the .NET Compact Framework

Developers have myriad options when it comes to creating solutions for mobile devices. One of the greatest challenges facing mobile developers is finding a compact yet robust local storage solution. SQL Server CE 2.0 promises to deliver on both fronts. This new release represents a tremendous leap in terms of features and performance over its predecessor. This article will review some of the platform and tools choices developers have today. The authors will compare and contrast the significant new features in SQL Server CE 2.0 with the previous release. Following that, they will build a sample app for illustration. Mark Brown and David Meunier

Code Download (14,952 KB)
.Chm Files

Columns

Editor's Note: Elevating Test and Debug

Programming is fun. It's one of the world's great jobs, pure mental exercise with a golden payoff at the end. There's nothing like the feeling of accomplishment when that program you wrote is working, looks good, and is ready to ship.

New Stuff: Resources for Your Developer Toolbox

Wanderlust Software LLC has released licX Licensing Component for . NET, a solution for licensing applications and components written for Microsoft® . NET. Featuring drag and drop integration with existing Visual Studio® .Theresa W. Carey

Web Q&A:Releasing Memory in JScript, Bulkload Problems, and More

Edited by Nancy Michell

The XML Files: Introducing XPath 2.0

Over two years ago in one of the first installments of this column, I wrote about XPath version 1. 0 (see The XML Files: Addressing Infosets with XPath for a quick review). As stated in the original specification: "XPath is a language for addressing parts of an XML document.Aaron Skonnard

Data Points: Expressions in ADO.NET

Managing relations in a database became a whole lot easier with ADO. NET. Instead of returning a single rowset to a data store, you can return a series of rowsets and relate them within a DataSet. There are numerous advantages to using related DataTables in ADO.John Papa

Cutting Edge: ASP. NET Client-side Hosting with Cassini

In the September and October 2000 issues of MSDN® Magazine I discussed how to build a client-side environment for ASP applications; that is, a serverless environment to run ASP pages (see Cutting Edge: A Client-side Environment for ASP Pages and Cutting Edge: A Client-side Environment for ASP Pages—Part 2).Dino Esposito

Advanced Basics: Automatically Generating a Web Service

Ken Spencer

Basic Instincts: Implementing Callbacks with a Multicast Delegate

This month's column is a follow-up to the December 2002 installment in which I introduced the basic concepts and programming techniques associated with delegates. I am going to assume you have already read that column and that you are familiar with the fundamentals of programming delegates.Ted Pattison

.NET Column: Safe Thread Synchronization

By far, the most common use of thread synchronization is to ensure mutually exclusive access to a shared resource by multiple threads. In the Win32® API, the CRITICAL_SECTION structure and associated functions offers the fastest and most efficient way to synchronize threads for mutually exclusive access when the threads are all running in a single process.Jeffrey Richter

C++ Q&A: Progress Indicator in the Status Bar, International UI Terms

Paul DiLascia

Resource File: Patterns & Practices and the Developer Roadmap

If you are looking for technical architectural guidance, check out Microsoft patterns & practices. This site offers design practice guidelines for specific software needs utilizing multiple Microsoft products within the .