Coding Zealotry: Class Interfaces

In a previous article entitled “The Religious Zealotry of Coding Best Practice”, we looked at how some best practices are implemented blindly, even though the costs outweigh the benefits where the practice is actually implemented.

In this article we’ll take a brief look at class interfaces.

It Starts Simple

So here’s a classic service class in C#:

public class CarCreator
{
   public Car CreateCar(string name)
   {
       return new Car { Name = name };
   }
}

It’s simple, it does what it says it’s going to do, it’s easy to read, and clearly easy to add onto. Read more