1915 Çanakkale Köprüsü

Immutability in dart can be used with different intentions.

Mutable variable with immutable value
or
Immutable variable with mutable value

In the first example, we can assign an empty list to dummy variable.
However, we cannot add or remove an item from the list.

In the second example, we can add or remove items from dummy list,
but we cannot assign an empty list to the dummy variable.

I hope this will be useful for somebody, keep coding 💻

--

--

Inversion of control is one of the principles stated in SOLID principles
that corresponds to the ‘I’ letter of the acronym.

Inversion of control is to delegate the management of some parts to an external software component (typically a framework) to reduce dependencies.

A framework handles the creation and management of project dependencies instead of the developer.

In modern frameworks, almost everything is done by the framework other that the code written by the developer.

  • It decouples the execution and implementation of a task from eachother.
  • Makes it easier to switch between different implementations
  • Improves the modularity of the program
  • Eases the testing by allowing mocks and stubs to be used interchangeably with the real implementation.

--

--

Middleware is a software that’s added to an application to apply filters, transformations and validations before a request is processed.

Each middleware decides whether to allow the request to flow through
the next stage in a request processing pipeline.

Middlewares can perform work before and after the next stage in pipeline.

Credit: ASP.NET Core Middleware Documentation

Constructs called ‘request delegates’ are used to handle each request in the pipeline.

A middleware can pass the request to the next component or short-circuit the pipeline.

Short circuiting the pipeline prevents the request to move any further in the pipeline.

--

--