Practical .NET

Simplify Code with the Visitor Pattern

You can't make a complicated problem simple. But, by leveraging the right tools in your language (and the Visitor pattern) you can ensure that your code doesn't get as complicated as your problem.

Logic Is Your Enemy

Leveraging the right combination of object-oriented tools can keep your code simple, even as the problems you solve get more complicated.

Exploiting the ConcurrentDictionary in Asynchronous Applications

The ConcurrentDictionary provides the most efficient (and safest) way to shared named values between asynchronous processes with several powerful methods. But the best advice might be to avoid ever needing them.

Stack Up the Stream Objects to Combine Functionality

Using the Stream objects correctly can speed up your I/O, protect your files and simplify your code.

SpecFlow 2, Part Two: Gherkin Steps

In part 2, Jason will map the business-readable tests we created last time to test automation code.

Get Data to the Client and Save Server-Side Storage

You've got data on your server that you need in your page. Here are all the solutions you require, including one that will make your application more scalable.

Business-to-Developer Bridge Building with SpecFlow 2

SpecFlow 2 makes sure developers deliver what businesses say they want. In this first of a two-part series, Jason looks at how to automate the process of communication through business-readable tests.

Why I Hate Best Practices

Best practices and principles aren't rules. They're guides to the judgement of the programmer. Sometimes we forget that.

Sharing Information Between Asynchronous Processes

When you need to share a list of specific information between asynchronous processes, you probably need the ConcurrentDictionary. Except, of course, when you don't.

Keep Track of What Your Code Really Did

When it's important to know what path your application took when processing data, a log of that path can be helpful. And, when you need to make a decision in your code based on an earlier decision, that internal path can make your code both simpler and easier to understand.

Share Information Among Asynchronous Processes Sans Locks

If you're creating an asynchronous application (and you should be) you'll be glad to know that .NET offers ways to share data that don't require you to lock up your application.

Create Sophisticated Asynchronous Applications with BlockingCollection

The basic functionality of the BlockingCollection makes creating asynchronous applications easy to do. But you need to use some of the BlockingCollection's other tools to create applications that handle typical real-world problems.

Create Simple, Reliable Asynchronous Apps with BlockingCollection

Dividing your application up into simple processes will make it easier to maintain and extend. Using BlockingCollection to communicate between those processes will let you make those processes run asynchronously.

Simplify Your Applications with Asynchronous Processes

With the right tools, creating an asynchronous application can give you not only a more responsive application that makes better use of your multi-core computer, it can also make your application simpler. Really, asynchronous applications should be your default choice.

Handling Lists of Selectable Items in ASP.NET MVC

You want to give the user the ability to select one (or more) items from a table. It's not as easy in ASP.NET MVC as you might like... but it's not awful, either.

Upcoming Events

.NET Insight

Sign up for our newsletter.

I agree to this site's Privacy Policy.