Analyze HTTP Traffic, Synchronize Databases, and More
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.
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.
Send your questions and comments for Scott to email@example.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.
, 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