Improve Your Model Classes with OOP – Part 3: Serialization

In part 1 of this series, I discussed building model classes properly with Object-Oriented Programming (OOP), specifically encapsulation that must always include data validation. In part 2 I  showed you constructors, interfaces and more that you should implement in your model classes. In this article, we will build upon the Person.cs type from part 2 … Continue reading Improve Your Model Classes with OOP – Part 3: Serialization

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

Real World Cloud App – From Start to Finish: The Business Layer

In the third article in this series, I talked about and showed how to code the data layer for this cloud solution. Since I talked about the business entities in the last article, in this one I will focus on the queueing using the Azure Service Bus and microservices using Azure Functions. For years I … Continue reading Real World Cloud App – From Start to Finish: The Business Layer

Real World Cloud App – From Start to Finish: The Data Layer

In the second article in this series, I laid out the architecture and design for this cloud solution. Now it’s finally time to get coding! In this article I will discuss how I designed the data layer using Cosmos DB. To keep a separation of concerns, I will talk about the business entities which is … Continue reading Real World Cloud App – From Start to Finish: The Data Layer

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