static void

Patterns primer

A quick jargon buster for common patterns and terms.

Object oriented programming (OOP)

OO has potential problems. Doing too much inheritance, over-abstraction, encapsulating too much (god classes) makes things complicated. Hence the SOLID principles and design patterns (which in turn can be over-engineered).

General Principles

SOLID

An acronym for 5 principles of OO. Unfortunately even these can be taken to extremes, with "good" practices justifying over-complicated architectures. Only the "D"- dependency injection - is relatively unambiguous.

Design Patterns

Patterns are reusable solutions to common problems. The patterns movement started with the "Design Patterns" book by the "Gang of Four" (1994). Follow links on Wikipedia.

Beware of anti-patterns or code smells- things to avoid.

Other patterns

Approaches

Don't forget

No application/service is production-ready without some these:

  • Some kind of performance profiling. From manual acceptance tests to Elastic Search-type analytics.
  • Monitoring. From simple pings to detailed analysis. For historical data and alerts when it dies.
  • Logging. At least exception logging.
  • Security. Even inside an organization you need some.
  • Build process. Visual Studio/Source control/build server may be enough, but you need to be able to produce a repeatable deployment package.
  • Deployment plan. Plan for initial deployment as well as upgrades, server maintenance and server moves.
  • Dependencies: You need an agreed list of core dependencies.
  • Not having any one of these is bad. Having too much of any, or complicated processes, are just as bad.

    The 4+1 architectural model is the most common "view model" where there are multiple views of the system: logical (class and sequence diagrams), implementation (UML component diagram), process (UML activity), physical (deployment), plus use cases.