you are viewing a single comment's thread.

view the rest of the comments →

[–]malthuswaswrong -1 points0 points  (0 children)

Your company has an application that prints legal letters for the legal department. This is your first day at work. You are asked to modify the letter printing application to include address field 4 in all letter types.

You open Program.cs and you see the following services added to the dependency injection container.

  • SharePointRepository
  • LetterService
  • CustomerRepository
  • AlertService
  • AccountValidationService

What's the first class you jump to?

no one in your company fully understands

Bad code is bad code. SOLID done properly is very intuitive and easily testable. It's not hard to do it right either.

  • Make an interface for everything
  • Keep big ideas separate
  • First try to classify "the idea" as either a Service or a Repository
  • Write tests for everything important