Articles from .NET 3.5

Selecting the Right .NET Language the VB or C# Debate 

Now first of all, before I get into the true content of this blog posting I do NOT want to start another round of the religious war that always seems to happen when you start talking about the usage of Visual Basic or C#.  The purpose of this blog posting is to put a little perspective into why I choose to work with a specific language for different projects, and the evaluation criteria that I use when making the choice for individual projects.  Yes, I'm a C# MVP, C# is my preferred .NET language, but I'll be the first to admit that there are times and places where VB is a necessary language.  In this article, I'll start out by providing a bit of background as to WHY I'm blogging about this, the evaluation criteria that I use when looking at a project and some other general information that I've found over the years.  Keep in mind the disclaimer found at the bottom of this posting, these are my thoughts, and mine alone, if you don't like them, which I'm sure many of you will not that is fine, but I wanted to put a bit of perspective on my take for the common argument.

Read more...

Posted by Mitchel on Tuesday, March 23, 2010

Using LINQ to Aggregate and Group 

Recently when I was presenting at Tech Days Canada I was preparing some examples of how LINQ could be used to do in-memory manipulations of data to help avoid repeated database calls. In the presentation I showed some quick code samples, and I thought that I would follow this up with a few simple examples here in a blog post. Before I start I wanted to share that the code shown here is actual production code that is being used to run the reporting on MyWebKeepAlive, the keep alive service offered by my company IowaComputerGurus.

Read more...

Posted by Mitchel on Friday, October 09, 2009

The Importance of a Consistent Development Environment 

I am again traveling this week, in Toronto speaking at Tech Days Canada 2009, and as luck would have it I needed to complete some work on a few custom DotNetNuke modules for clients on a "Urgent" basis.  So this afternoon I darted off to the speaker room to get an internet connection, just recently I re-formatted my laptop to move to Windows 7, one of the main reasons that I needed to re-format the system was to create an environment that matched my primary development machine, today was the first true test of this new configuration.  Thankfully everything worked as expected and all issues were resolved.  In this blog post, I'll explain a bit as to why it is important when working on multiple environments to have consistent system configurations.

Read more...

Posted by Mitchel on Tuesday, September 29, 2009

Improving the Debugger Experience Using Attributes 

I have often found that when debugging applications that a lot of time is spent drilling down into the various custom objects to see what the values are of specific instance methods.  In this blog posting I will demonstrate the default behavior of Visual Studio when debugging a class, I will then show how you can improve the debugging experience with the addition of a simple attribute.

Read more...

Posted by Mitchel on Friday, July 03, 2009

Development Environment and Tools Used 

A very common question that I get asked by people is; what tools do you use to complete your development and what type of system do you use.  Now, I believe I have written a bit about this in the past, but I thought I would take some time to go through and give a bit of a detailed overview of what I use for development and why I have selected the hardware and software that I have.  I will cover this in detail from both the hardware and software point of view.

Read more...

Posted by Mitchel on Friday, May 22, 2009

Review of SourceGear Vault Source Control Provider 

My last blog article "Selecting the Right Source Control Provider" touched on the evaluation criteria that I use when looking for a source control system. This article is a review of sorts of SourceGear's Vault product, my preferred source control system. I'll start by reviewing vault as it relates to the criteria from the previous article, I will then provide my overall feedback on my experience with Vault.

Read more...

Posted by Mitchel on Thursday, April 16, 2009

Selecting the Right Source Control Provider 

One of the most common questions that I have been getting recently has been "what source control provider do you use and why?".  This article is the first in a series of two articles about source control.  This article takes a quick look at criteria that I believe is important to consider when it comes to evaulating source control systems for use.  The next article in the series will be a review of the source control system that I use, in relation to the evaulation criteria that I list in this article.

Read more...

Posted by Mitchel on Wednesday, April 08, 2009

Avoiding File Locks and Cannot Access File Exceptions 

While working through some issues recently with some legacy code writen by someone else I was faced with a horrible case of a shared object that was writing to the file.  This was a "custom" logging implementation and opened a file for append, inserted the line, and then closed the file.  Well in times of heavy load the system would encounter errors such as "Cannot access ___ because it is being used by another process".  So in effect the file was either still open, or the lock was not yet released.  This post goes through a bit of the detail on how I resolved the issue.

Read more...

Posted by Mitchel on Thursday, January 22, 2009

Why Dynamically Attached Databases Cause Problems 

One item that many people find unusual about my DotNetNuke installation guides is my insistance on NOT using the Database.mdf, dynamically attached database file for the creation of a DotNetNuke database.  In my tutorials I have quickly dismissed the topic by noting that "issues" come up when trying to use a dynamically attached database and I leave it at this.  Well after seeing more questions on this topic recently in the DotNetNuke.com forums I wanted to take a moment to put my $0.02 out there as to WHY I don't like it.  I will do this by discussing quickly what the differences are in the two approaches, then I'll discuss the "downfalls" of each.

Differences in Approach

Everyone is most likely familiar with the common process for creating a SQL Server databse, during the creation process two files are added the .mdf which stores the actual data and the .ldf which stoes the log.  When the database is created the files are typically placed inside the "Program Files" folder, storing them with the rest of the SQL Server files, although this location can be changed by the Server Administrator.

The dynamic attachment method uses a pre-defined database.mdf file that is located in the App_Data folder of the DotNetNuke installation.  When the system connects to the database server this file is attached to the server and operates like a database on the server would normally, however, all data is stored inside the DNN location.

Why I Think Its Bad

One of the most common arguments supporting Dynamically attached databases is that they "save time".  Well That might be true for the first connection, however, in my experience the time spent troubleshooting later makes it a much longer process.  The first thing to remember is that the database is attached and it has a name associated with it, DotNetNuke when working with DNN, if you go to install a second DotNetNuke installation on the same server with the dynamically attached file an error will appear noting that the database already exists.  For beginners this can be a very upsetting experience.

However, the most problematic downfall of dynamically attached databases in my experience is that you must "Attach" the database before you can manipulate it in SQL Server Management Studio or SSMS Express.  This is a very common stumbling block as individuals will know that the database exists, however, SSMS will not show the database at all, until it has ben successfully attached. 

Overall

I feel that overall there are no compelling reasons that would direct a person to use a dynamically attached database rather than a standard SQL Server database especially when it comes to databases that need to be administered on a regular basis.  If working in a test environment it might be helpful to have a dynamically attached database, but that is a limited use case, and for the most part DotNetNuke databases at one point in their life will need to be administered, backed up, restored, or moved.  For these actions a standard database is a good way to go.

Please share any comments/feedback below.

Posted by Mitchel on Monday, November 24, 2008

Using the IN Clause With Stored Procedures 

Recently I have been working on creating a dynamic reporting engine for use within the DotNetNuke system, a method to allow for the execution of a stored procedure and the proper display of the results. This includes creating a list of parameters, including dynamically loaded lookup systems and more. Well the most complex item that I have had to condition for was how to deal with filter options that require the use of the SQL IN clause, there are many ways of doing this, but I have found a way that appears to work perfect for my needs, this will be explained in this posting.

Read more...

Posted by Mitchel on Friday, August 08, 2008

An error has occurred.
Error: Mitchel Sellers' DotNetNuke, .NET, and Other Topics Blog is currently unavailable.

An error has occurred.
Error: Mitchel Sellers' DotNetNuke, .NET, and Other Topics Blog is currently unavailable.

Disclaimer