This is a creation pattern, that guarantees only one object instance while the life cycle project.

But why and when can I use it? For example, when you use MongoDB in your application. The MongoDB do not use the connection pool, like relational databases, so is best for it to…

It is a behavioral project pattern that transform a order to an independent object that contains all the necessary information.

Characteristics

  • Command: The own command, that contains the instructions and references.
  • Receiver: The thing that the command will execute.
  • Invoker: Responsible to execute the commands.
  • Client: The beginning of all. It…

Well, let’s start from the beginning! Sir Tony Hoare is who created the null reference, in 1965. Unitl now, Null checks is completly a requirement when we develop something.

Normal Situation

It is usually that we very commom we see null checks, like this:

public void CreateClient(IClient client)
{
if…

Alex Alves

Bachelor in Computer Science, MBA in Software Architecture and .NET Developer.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store