What’s an Er class?

Ever heard of Er class? It’s right there in your project, in your codebase; moreover it’s in every single project (larger than ‘Hello World’ =).

Every time you don’t know where to plug your neat piece of code, here comes an Er class:

  1. Errrrr… Where should I put that logic?” (Er class is yet an Errrrr class…)
  2. “I know! Let’s throw it into ApplicationManager, sounds like a right place to do it!” (Boooo!)

Here are exemplary Er classes: BlahBlahManager, BlahBlahHandler, BlahBlahBuilder… Sounds familiar? Bottomless code buckets usually have common naming convention…

  1. Avoid non-specific class names. That leads directly to making your classes specific and SRP-y.
  2. You want to create BlahBlahManager? Hint: you’re likely to create an Er class.

BTW, Er class is Duncan’s idea.

One Response to What’s an Er class?

  1. gr3ml!n says:

    the best example of a Err class is a BlahBlahHelper :)

%d bloggers like this: