Proper Type Encapsulation – Part 2

In part 1 of this article, I explained how to implement proper data encapsulation. In part 2 I want to talk about encapsulating business logic. I see this missing in a lot of type design, especially when using an ORM like Entity Framework. It’s the job of the architect and coder of that type to … Continue reading Proper Type Encapsulation – Part 2

Performance Tip: Checking For Empty String

In all my books and conference sessions I talk about the proper way to test if a string is valid. Microsoft .NET has been around almost two decades and I still see code like this: if (testValue.Trim() == "") This code is even wrong since it's not checking for null. A better way would be like this: … Continue reading Performance Tip: Checking For Empty String

Proper Type Encapsulation – Part 1

Encapsulation is the first pillar of Object-Oriented Programming and maybe the most important. This is how wikipedia.org defines encapsulation: Encapsulation is one of the fundamentals of OOP (object-oriented programming). It refers to the bundling of data with the methods that operate on that data. Encapsulation is used to hide the values or state of a … Continue reading Proper Type Encapsulation – Part 1

Is Quality Part of Open-Source Projects Your App Is Using?

Is code quality important to your team? It should be at the top of the list, not only to make your customers happy, but make your team happier when bugs arise and when features need to be added. Putting quality in your code in the future is a lot more expensive than doing it when … Continue reading Is Quality Part of Open-Source Projects Your App Is Using?

Defensive Programming – Let Type Checking Work for You

Since I have been a speaker and a teacher, I have always stressed the importance of practicing proper object-oriented programming (OOP) techniques. If you don’t practice OOP, no matter what language you are using, I guarantee you will end up with a “house of cards” and they all eventually fall. The first “pillar” of OOP … Continue reading Defensive Programming – Let Type Checking Work for You

dotNetDave Rocks SoCal Code Camp in Los Angeles

For one last time, I will be rocking the geeks at SoCal Code Camp in Los Angeles on December 2nd - 3rd. It's always a great time with lots of great content. I will be doing the following sessions on the 2nd. Rock Your Code Quality Code quality starts with you, the developer. If you … Continue reading dotNetDave Rocks SoCal Code Camp in Los Angeles

dotNetDave Rocks The Raleigh .NET Conf Local

For the first time, the dotNetDave Rock The World Tour is hitting North Carolina at the Raleigh .NET Conf Local on October 28th, 2017. I'm excited to give my new session below. Rock Your .NET Core Best Practices In this sessions, you will learn how to apply .NET Framework best practices to .NET Core 2.0. … Continue reading dotNetDave Rocks The Raleigh .NET Conf Local