Is this Factory Method creation pattern?

前端 未结 20 822
再見小時候
再見小時候 2020-12-12 17:12

I have been using factory method creation pattern for awhile now. I was just recently told that this:

public static class ScheduleTypeFactory
{
    public st         


        
20条回答
  •  南方客
    南方客 (楼主)
    2020-12-12 17:48

    Take back the power right now! Just drop 'Type' from the wording. ScheduleFactory FTW. Wait, is this a factory for 'Schedules' or 'ScheduleItems'? If it's scheduleitems then the factory should be called 'ScheduleItemFactory'. Be expressive!!!

提交回复
热议问题