Improve Your Model Classes with OOP – Part 2: Constructors, Interfaces & More

  In part 1 of this series, I discussed building model classes properly with Object-Oriented Programming (OOP), specifically encapsulation that must include data validation. In this article, I’m going to show you constructors, interfaces and more that you should implement for your model classes. We will build upon the Person.cs type from part 1 and … Continue reading Improve Your Model Classes with OOP – Part 2: Constructors, Interfaces & More

Improve Your Model Classes with OOP – Part 1: The Basics

Ever since I have been speaking and writing, I have talked about proper class design using Object-Oriented Programming. OOP has been around since the 1950s and to me is still the best way to properly design classes, for now, and the future. Many of the projects I see fail are due to not using OOP … Continue reading Improve Your Model Classes with OOP – Part 1: The Basics

Code Quality is a Feature, Not an Afterthought

I must admit something… I must admit that I get more and more frustrated with the lack of code quality in all projects I work on as a contractor. Some are okay, but most are very far from it. What frustrates me more that most of this poor-quality code I analyze is written or supervised … Continue reading Code Quality is a Feature, Not an Afterthought

dotNetDave Rocks The DotNetSouth.Tech Conference

For the first time, I will be speaking at the DotNetSouth.Tech conference in Atlanta, Georgia on May 13th and 14th. I'm excited to present the sessions below. Rock Your Code: Real World Cloud App From Start to Finish Room: Room 104 @ 2:40pm on May 13th This session will show how I created a cloud … Continue reading dotNetDave Rocks The DotNetSouth.Tech Conference

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