There is a portion of our codebase written in the following style:
// IScheduledTask.cs
public interface IScheduledTask
{
string TaskName { get; set; }
int TaskPriority { get; set; }
List<IScheduledTask> Subtasks { get; set; }
// ... several more properties in this vein
}
// ScheduledTaskImpl.cs
public class ScheduledTaskImpl : IScheduledTask
{
public string TaskName { get; set; }
public int TaskPriority { get; set; }
public List<IScheduledTask> Subtasks { get; set; }
// ... several more properties in this vein,
// perhaps a constructor or two for convenience.
}
That is, there are a large number of interfaces specifying just a set of properties with no behavior each with a sole corresponding implementation that implements these with auto-properties. The code is written by someone fairly senior (much more so than myself) and is apart from this use of interfaces reasonable procedural code. I was wondering if anyone else had encountered/used this style and if it has any advantages over just using concrete DTOs everywhere without the interfaces.