Click to Rate and Give Feedback
Articles by this Author
Host a wiki the easy way, get the screen shots you need and mark them up, and read about LINQ this month in Toolbox.

By Scott Mitchell (July 2008)
This month test your web site on many platforms and browsers without setting up a test environment, use mock objects for unit testing, and visit Raymond Chen.

By Scott Mitchell (June 2008)
This month the Toolbox column takes a look at database logging, Joel Spolsky's blog, printing code projects, and ASP.NET reading.

By Scott Mitchell (May 2008)
See how to log Web application errors for better health monitoring, what to read if you’re thinking about LINQ, and which blog Scott recommends reading this month.

By Scott Mitchell (April 2008)
This month, a better design-time experience for Web apps, Scott Guthrie's blog, extending Extend Lutz Roeder's Reflector, and more.

By Scott Mitchell (March 2008)
This month, more of the tools you need to get your job done.

By Scott Mitchell (December 2007)
This time: Windows Forms grids, professional-looking date textboxes, file merging, and more.

By Scott Mitchell (November 2007)
This month's products include DatabaseSpy, FileZilla, NCache, and more.

By Scott Mitchell (October 2007)
More ...
Popular Articles
Learn how to create a workflow that uses InfoPath forms and other office documents for passing data to targeted activities and for use in Office documents.

By Rick Spiewak (June 2008)
The .NET Compact Framework 3.5 provides a subset of Windows Communication Foundation (WCF) functionality that you can harness to communicate between Windows Mobile devices and desktop PCs. We'll show you how.

By Andrew Arnott (Launch 2008)
Animating with Silverlight is easier than you think. Here we create a 3D app that folds a polyhedron using XAML, C#, and by emulating the DirectX math libraries.

By Declan Brennan (April 2008)
Here we introduce you to some of the concepts behind the new F# language, which combines elements of functional and object-oriented .NET languages. We then help you get started writing some simple programs.

By Ted Neward (Launch 2008)
More ...
Read the Blog
The most fundamental form of Web testing is HTTP request/response testing. This involves programmatically sending an HTTP request to the Web application, fetching the HTTP response, and examining the response for an expected value. In the May 2008 issue of MSDN Magazine, Read more!
In the November issue of MSDN Magazine, Jeffrey Richter demonstrates some recent additions to the C# programming language that make working with the APM significantly easier. In the June ...
Read more!
The July 2008 issue of MSDN Magazine is now available online. Here's what's in the issue: Data Services: Develop ...
Read more!
The June 2008 issue features the first installment of a new MSDN Magazine column on software design fundamentals. We’ll discuss design patterns and principles in a manner that isn't bound to a specific tool or lifecycle methodology. In this issue, Jeremy Miller starts the Patterns in Practice column ...
Read more!
In the April 2008 issue of MSDN Magazine, Kenny Kerr introduced the Windows Imaging Component (WIC), showing you how you can use it to encode and decode different image ...
Read more!
A combination of the retained-mode graphics system and notification mechanisms such as dependency properties unleash the flexibility and power of Windows Presentation Foundation (WPF, allowing these objects to be targets of data bindings and animations. In the June 2008 issue of MSDN Magazine, Charles ...
Read more!
More ...
Toolbox
Analyze HTTP Traffic, Synchronize Databases, and More
Scott Mitchell

Dissect Your Browser's HTTP Traffic
Debugging Web applications can be a difficult process due to the logical, physical, and temporal differences between the mishmash of technologies that comprise such an application. For bugs that arise from the HTML and script received by the browser or in the transfer or request of a page's markup, developers often adopt archaic debugging techniques, such as using View Source and Notepad to scrutinize the contents received by the browser. With increasingly complex Web pages carrying dozens of inline and external style sheet and script definitions, the markup in most Web pages have become unwieldy.
In such debugging scenarios developers need to know what requests have been made by the browser, what HTTP headers and post data was sent, what response headers were received, the content received, and how this content may have differed from previous requests with different inputs.
IEWatch, by IEWatch Software LLC, aids developers by providing all this information and more through an easy-to-use interface directly from Microsoft® Internet Explorer. After installation, IEWatch launches as a plug-in directly in Internet Explorer. When enabled, IEWatch records all incoming and outgoing HTTP traffic, saving the request headers, post data, response headers, and received content for each request. This log can be saved to a file for later examination or to include in a bug report.
In my opinion, IEWatch's two most impressive features are its filters and its HTML analysis. By default, IEWatch records all HTTP traffic, including requests for image files, external style sheets and script files, Flash files, and so on. To help reduce the sheer volume of requests, IEWatch allows the results to be filtered by URL, request type, content type, request and response headers, status codes, and response content. The HTML analysis breaks down the received HTML into various categories: links, images, both inline and external scripts and style sheets, forms, frames, ActiveX® controls, and more.
What's more, the HTML analysis pane provides two modes of visual highlighting. When you drill down into those categories that have visual representations on screen (such as images, links, and forms), clicking on one of the items in the list highlights its location in the browser. Similarly, when enabling the HTML spotlight feature, clicking on a region in the HTML document highlights the corresponding HTML markup displayed in IEWatch.
IEWatch makes investigating HTTP requests and responses and exploring the resulting content a walk in the park. With its seamless integration into Internet Explorer, filtering capabilities, HTML analysis, and affordable price, you should consider adding IEWatch to your toolbox today.
Price: $89 for a single-user license.

Compare and Synchronize SQL Server Databases
In a perfect world a customer's requirements would be well-defined and frozen before beginning any development work. However, for most projects the requirements are expanded or refined as the development cycle progresses. Similarly, for internal or custom applications, the development cycle really never ends—it's just a continual process of adding new features and finetuning implemented ones.
For data-driven applications, developers frequently use multiple databases: one for development, perhaps one for staging, and one for production. For customers with changing requirements, these databases's schemas often vary from one another. The production server's schema is designed from the feature set of the last stable release, whereas the development server's schema has been modified to incorporate the functionality currently being designed. These differences present challenges when pushing a build from development to staging (or from staging to production).
SQL Server does not ship with any tools for easily comparing and synchronizing the schemas of disparate databases; however, there are a number of third-party tools that make this task a breeze. One such tool is SQL Examiner, by TulaSoft, LLC. SQL Examiner allows you to choose two SQL Server databases—which can be on the same or different servers—and compares the table structures, views, stored procedures, user-defined functions, and so on.
You can then decide how to synchronize the schemas by specifying which database will act as the source and which will be the destination, as well as which database objects to synchronize. After making these selections, SQL Examine will generate the T-SQL to propagate the schema changes from the source to the destination.
One of SQL Examiner's strongest attributes is its ease of use and straightforward user interface. After starting the program, you are only a few mouse clicks away from synchronizing two databases. In addition to its user-friendly interface, with the click of a button SQL Examiner will create a Database Variance Report, which is an HTML document that lists the objects in the two databases and shows precisely how the objects in one database differ from the other. SQL Examiner also includes a snapshot feature, which will save your database's schema in an XML-formatted file. You can later use this saved snapshot to compare a database's current schema with its past schemas.
Keep in mind that SQL Examiner is designed to compare and synchronize database schemas. As of the time of this writing, SQL Examiner does not allow for comparing and synchronizing actual data. For most scenarios, though, developers are more interested in working with just the schemas and they aren't interested in performing deep copies of the database.
Price: $199.95 for a single-user license.

Generate Help Files for Visual Basic Projects
Documentation is a lot like exercise—it's a vital part of any large software application, but only a handful of people really enjoy doing it. Fortunately, the Microsoft .NET Framework simplifies documenting classes, methods, properties, and events with XML comments.
XML comments are special XML tags embedded within comments that provide metadata about classes and their members. During compilation, this metadata is converted into a standalone XML file by Visual Studio®, and can then be converted into help files in a variety of formats using Visual Studio .NET, NDoc (ndoc.sourceforge.net), or other programs. With Visual Studio .NET 2003, XML comments are only compiled into the standalone XML file for C# projects, although there are third-party solutions that handle this process for Visual Basic® projects; Visual Studio 2005 supports XML comments for Visual Basic, C#, and C++ projects.
Visual Studio inserts the common XML comment elements and provides IntelliSense® support for a handful of valid elements, but developers are still on the hook for properly escaping their XML comment markup, knowing the purpose and rendered display for each element, and recalling the names of those elements for which Visual Studio does not provide IntelliSense.
If you find yourself frustrated at providing XML comments, consider VBdocman .NET from Helixoft. VBdocman .NET parses the files in a Visual Basic Project or Solution, reading the XML comments and generating documentation in one of a variety of formats, including HTML Help, Microsoft Help 2, HTML, and RTF. Implemented as an add-in in Visual Studio, adding new XML comments or compiling the Project or Solution's comments into a help file is just a click away. For those still building Visual Basic Web- or desktop-based applications using Visual Studio .NET 2002 or Visual Studio .NET 2003, VBdocman .NET provides the XML comment support that Visual Studio .NET lacks.
VBdocman .NET has value even for those using Visual Studio 2005. While XML comment support for Visual Basic is now baked into Visual Studio, VBdocman .NET greatly simplifies the process of generating XML comments thanks to its WYSIWYG XML comment editor. Memorizing XML comment element names is a thing of the past, as the rich comment editor provides an interface that shows what the comments will look like in the resulting help file. You simply type text into this editor, generating the documentation as desired.
VBdocman .NET's main draw, in my opinion, is its slick comment editor, which I've found to be much easier, faster, and satisfying than entering the XML comments markup by hand. This feature alone will likely be worth the price for those who religiously document their code with XML comments.
Price: $229 for a single-user license.

The Bookshelf
Most developers rely on IntelliSense and statement completion to relieve the burden of memorizing the vast array of classes, methods, properties, and events that make up the .NET Framework and any third-party components or controls used. Unfortunately, for SQL we must still use the old fashioned techniques—memorization, documentation, online resources, and books.
While there are plenty of books that provide a thorough discussion of database theory, or the intricacies of a particular database platform, often I'm in need of just a nugget of information, such as the syntax for iterating through a cursor, the syntax for RAISERROR, or how to retrieve database metadata through T-SQL syntax. These tidbits of information are just a glance away with SQL Server 2005 T-SQL Recipes: A Problem-Solution Approach (Apress, 2005) by Joseph Sack. Like a cookbook, SQL Server 2005 T-SQL Recipes contains a bounty of short and to the point sections, each one detailing a feature of the SQL Server 2005 T-SQL syntax.
The introduction notes that the book is "index-friendly, [and] does not need to be read front to back." The index is certainly a mine of information, but I also found the table of contents to be as good a starting place as any, where each of the recipes in the book's 22 chapters are listed.
The book includes recipes for all skill levels, from recipes that cover the basics of SELECT, INSERT, UPDATE, and DELETE statements, to recipes that detail managing deadlock priority in transactions. The breadth of the material ranges from the everyday SQL, to database tuning and profiling, through higher-level concepts, like working with XML data, Web services, error handling, encryption, and more.
Price: $59.99.

Send your questions and comments for Scott to  toolsmm@microsoft.com.

All prices were confirmed at press time and are subject to change. The opinions expressed in this column are solely those of the author and do not necessarily reflect the opinions of Microsoft.

Scott Mitchell, author of numerous books and founder of 4GuysFromRolla.com, is an MVP who has been working with Microsoft Web technologies since 1998. Scott is an independent consultant, trainer, and writer. Reach him at Mitchell@4guysfromrolla.com or via his blog at ScottOnWriting.NET.

Page view tracker