Arne Brachhold

Interesting Google Statistics about .Net Searches

Filed under: .Net — arne on June 10, 2006

First places are not really surprising, but tenth place for USA after Denmark?

Google Trends: Microsoft .Net
(Image was fitted for correct display)

See the full statistic on Google Trends

Backup Formatting Settings of Visual Studio 2005

Filed under: .Net — arne on April 28, 2006

If you’re working in a team on a .Net project, all devs should use the same coding guidelines as well as the same code formatting. Visual Studio 2005 has powerful options to automatically format your code how you like it. Unfortunately there is no way to export this settings from Visual Studio, so every developer has to configure the formatting settings by hand.

This is not very comfortable and fail safe so there must be a way to export or backup these settings, so you can import them on an other computer or ideally set them as a group policy in Active Directory.

(Read on …)

Akismet C# API for the .Net Framework 1.1 and 2.0

Filed under: .Net,Wordpress — arne on April 18, 2006
Latest release:

This is a little Microsoft .Net class which allows you to use the powerful Akismet comment spam protection in your .Net wiki/blog/website/software.

It’s well documented and available as a precompiled library or C# project. It’s compiled as .Net 1.1, but also works great with 2.0. Note that you need to obtain a API key to use it.

(Read on …)

Custom HTTP handlers in ASP.Net (.Net 1.1)

Filed under: .Net — arne on May 25, 2005

Custom Webhandlers are an excellent method to create ASP.Net pages which don’t need all the Page and WebControl stuff. Maybe you already created a .aspx file which should only return XML or an image.

If you develop with Visual Studio, it creates automatically an .aspx and .cs file for you and you have to delete all content except the Page Directive from the .aspx file or call Response.End() at Page_Load. This is not very cool and results in useless work.
(Read on …)

Microsoft Component Installer SDK (Spring 2005)

Filed under: .Net — arne on May 24, 2005

Microsoft released the new Microsoft Component Installer Software Development Kit which is a SDK to perform various required installations for your .Net application.

The installer includes:

  • Microsoft Data Access Components (MDAC) 2.8
  • Microsoft .NET Framework 1.1
  • Microsoft DirectX 9.0c
  • Microsoft DirectX 9.0c for Managed Code
  • Microsoft .NET Framework Version 1.1 Language Pack
  • Microsoft .NET Framework 1.1 Service Pack 1
  • Microsoft ASP.NET Security Update for Microsoft .NET Framework 1.1 Service Pack 1
  • Microsoft Windows Installer 2.0
  • Microsoft Windows Installer 3.1

If you run it before your application setup, you can be sure all required components will be installed.

You can also specify an application or URL which will be executed when the installer finished. If you set the the "uionlyifneeded" parameter, the installer won’t be shown to the user if all required components are already installed.

.Net Coding Guidelines

Filed under: .Net — arne on May 23, 2005

If you code in a team, it is important that you use the same code style, especially if developers began with different languages which had individual styles. For example, PHP is often coded with camelCase and C++ developers use prefixes like strName or intZipCode.

Modern IDEs allow you to see the type of your members or variables while working with them. Visual Studio shows the type in the Intellisense window, Eclipse has a similar function for Java.

Mixing coding styles makes it hard to read the code and find members via AutoComplete.

So you should apply company-wide coding guidelines, use them and correct wrong names.

For the .Net Framework I recommend to use the Naming Guidelines for the .Net Framework. You can check your Assemblies using a tool called FxCop from FxCop also provide checks for performance, design and security issues.

You can also specify custom rules if the existing rule library doesn’t fit your needs.

A good way to enforce coding guidelines to all developers is to add the code formatting settings to the Active Directory. These settings are saved in the registry, so you can import or export them easily.