NDepend 2017

Technology , , ,
Anyone working with large software systems knows the difficulties of retaining visibility into those systems. As software solutions grow, it becomes increasingly difficult to retain a clear picture of how the components fit together. In an age of increasingly demanding software consumers it is critical to quickly find and solve problems before they grow. Enter NDepend, a collection of tools designed for deep analysis and visualization of the software solutions you create. NDepend provides a rich analytic tool set to help gain a deep understanding of your code and monitor the health of a project throughout its lifecycle. I've used NDepend…
Read More

NDepend

Technology, Uncategorized , ,
Developers who have worked on large software projects are familiar with the challenges that those projects often face. Maintaining consistency and quality on any large code-base across a development team is difficult. Beyond the aesthetics of a coding standards document and the platitudes of a regular code review process, most team leads can struggle with how to visualize and improve the software that their team is producing. Static analysis, with tools such as FxCop, can be used to checklist conformance to a set of predetermined guidelines, but what happens when you need to visualize your solution at a deeper level?…
Read More

Serialize SQL parameters

Technology , , , ,
Convert a collection of SQL parameters into a name:value string suitable for writing to a log. /// <summary> /// Serializes a collection of /// <see cref="System.Data.SqlClient.SqlParameter"/>s. /// </summary> /// <param name="parameters"> /// The collection of parameters to serialize. /// </param> /// <returns> /// A <see cref="System.String"/> that contains the parameter values. /// </returns> public string SerializeSqlParameterCollection( SqlParameterCollection parameters) { StringBuilder sb = new StringBuilder(); foreach (SqlParameter parameter in parameters) sb.Append( String.Format("{0}:{1} ", parameter.ParameterName, parameter.Value)); return sb.ToString(); }
Read More

Http Modules

Technology , ,
The .NET framework provides several mechanisms for extending the behaviors of web pages and other endpoints. One such technique is the http module. Modules are often either overlooked as a solution or are considered too heavyweight or scary for use. This is unfortunate as they are a powerful item in the ASP.NET development toolbox. An http module is a single unit of code that is executed as part of the web request pipeline. When a web request is received, the list of registered modules are afforded the opportunity to inject themselves at several stages in the execution pipeline. Each module…
Read More

Debugging into .NET source code

Technology, Uncategorized ,
Many have “heard” that you can now step into .NET source code when debugging in Visual Studio 2008.  For those who have not been doing this since the start of the year, you can find excellent instructions for configuring Visual Studio to get the necessary symbols here. I highly recommend understanding this process and making it a part of your debugging routine.  It often becomes necessary to understand why the .NET framework is behaving in a certain fashion while developing.  By stepping into the source code and using the watch window, I’ve saved myself a lot of hours of head-scratching.  More often…
Read More

.NET CLR in SQL Server 2005

Technology , ,
Of recent interest to me has been the ability to deploy user-defined managed functions, stored procedures, and other objects to SQL from within Visual Studio 2005. With the .NET CLR in SQL Server 2005, these managed functions can be written and deployed from within Visual Studio, even as part of an automated build process. In wanting to investigate this further, I've decided to write a few articles on how this technique is used and on how it may be useful to you. When I first heard about the ability to (essentially) deploy .NET assemblies into SQL Server and then have…
Read More

The ObjectDataSource Web Control

Technology , , , ,
There exists a wide variety of ways in which data for a web page can be retrieved from a data store. One of the ways introduced in ASP.NET 2.0 involves using the ObjectDataSource control. This article discusses the ObjectDataSource control and how it fits into the ASP.NET 2.0 toolkit. A working example is provided demonstrating how the ObjectDataSource control can be used with a typed data set to provide search results to a GridView that are filtered based upon search parameters entered into other controls on the same page. The results can be paged and sorted within the grid, demonstrating…
Read More

Overloaded Indexers cause Ambiguous Match

Technology , , ,
Developing custom web server controls can be a powerful way to provide opportunity for code re-use while retaining strong design-time support and Visual Studio integration.  This is especially useful when developing a solution that will be handed off to a maintenance team as it allows full control of the rendering and behavior of your control whilst retaining ease of use and configuration for the maintenance team at a later date.  One of the common patterns that appears in such server controls is the definition of a child collection of items.  This is akin to the collection property Columns on the System.Web.UI.WebControls.DataGrid control.  When defined in .aspx,…
Read More

CascadingDropDownList and Page Validation

Technology , , , ,
While working with the AJAX Control Toolkit (http://ajax.asp.net), I came across something interesting with the CascadingDropDownList control and ASP.NET page validation. What Does the CascadingDropDownList Do? The control is used to create tiered drop-down lists that each depend upon parent values for their own data population.  The canonical example given regards using three DropDownList controls to narrow a selection of a car.  The first list displays a list of manufacturers, the second a list of models, and the final a list of common packages, with each successive list control populating only the relevant values based upon its parent.  For example, selecting "Ford" from the…
Read More