Practical .NET


Building a Better MVC Helper

Readers suggest ways to build a powerful HtmlHelper that simplifies creating typical application Views. Along the way, Peter uses a workaround for extending an anonymous object with additional properties and shows how to extract values from a lambda expression in a View.

Strategies for Isolating Applications

If you're not careful, you'll replace your huge, lumbering unmaintainable enterprise applications with a web of applications that can't be changed without blowing each other up. But if you apply the same tools you use inside your applications to your application architecture, you can avoid that.

Distributed Concurrent Actor Models with Akka.NET

Ease the pain of concurrent programming with the Actor Model and Akka.NET.

Domain-Driven Development: Where Does the Code Go?

Rather than arbitrarily deciding what code goes into an application and what goes into your business objects, you can lean on the rules that experienced developers have learned to follow to make those crucial decisions.

Delivering Scalable, Maintainable Objects with Domain-Driven Design

If you've been creating Data Transfer Objects that integrate several objects into one, then you've created what domain-driven design (DDD) calls an aggregate. But there are some rules you need to follow if you want to reap the benefits that DDD promises toward performance, maintainability and scalability.

Improve Test Asserts with Shouldly

Augment your testing framework with Shouldly for improved test code readability and better test failure messages.

Simplifying Your Object Model with Value Objects

Our applications are complicated enough without adding any more. Here's a way to think about your objects that allows you to dramatically simplify your object model, provided you're willing to turn your current practice around by 180 degrees.

The Power of Talking About Your Business Processes Correctly

One of the biggest problems in designing applications is the conversion from how the business talks about the business to how the developers think about coding it. Domain-driven design has a solution.

Structuring Views in ASP.NET MVC to Centralize Logic

A View without any code is probably impossible in any real-world application. But, by leveraging Partial Views, you can still separate your View-related code from your HTML.

Domain-Driven Design: Everything You Believe Is Wrong!

Domain-Driven Design claims that it provides a strategy for building applications that will grow and evolve over time without collapsing under their own complexity. It does that by upsetting some conventional wisdom.

Switch Back to the Web Forms Editor for Static HTML

You lose some functionality with the default editor in Visual Studio 2013. Here's how to quickly switch back and get the functionality you were used to.

Generate Reliable URLs in ASP.NET MVC AJAX Calls

You've moved your ASP.NET MVC application into production and all of your lovely AJAX calls have started failing. The solution is to ensure the URLs you're using in your AJAX calls are absolutely correct.

Handling Bad URLs in ASP.NET MVC

If users enter an invalid URL, then ASP.NET MVC will handle the problem by issuing a generic HTTP error. Here's how to give users more support (plus some advice on avoiding the problem altogether).

A Simple and Sophisticated Logging Tool

When things go wrong in production, logging provides a way of going back through an application's history to find out what happened. Here's the simplest possible way to use Peter's favorite third-party logging utility: NLog.

Speed Up Stored Procedures with Table Valued Parameters

Peter revisits an earlier tip on how to use stored procedures to speed up your code. This version makes your stored procedures simpler … though you may have to write a little more code to make the call.

Subscribe on YouTube