LM Tech's blog

Software Architecture & Design Patterns

The factory design pattern is a creational pattern that favor the abstraction of the objects creation's process.
The creation of an object can be a complex process where many properties must be setted and other nested objects must be created.
To reduce the code duplication and the coupling between classes, is better to put the creation code in a unique place (the factory), where you can access to get the instance of the objects.
A "factory" therefore, is an object for creating other objects. More...



The Separated Interface pattern addresses the problem of separating the interface that describes the functionalities from its implementation. The pattern prescribes that you use different packages (assemblies in the .NET Framework) for the interface and any of its implementations. The packages that need to consume the functionalities know only the definition of the interface and are completely unaware of the implementation. More...



Dependency Injection (DI) is a design pattern that strive to reduce the dependency between components. Dependency Injection is often referred as Inversion of Control (IoC). In fact dependency injection is an application of the Inversion of Control principle.

A class that depends from an other object, receive the reference of the dependent object from the outside world instead of create the instance itself. More...



The Dependency Inversion Principle (DIP) has been formalized by Robert Martin (http://www.objectmentor.com/resources/articles/dip.pdf). It states:

  • High-level modules should not depend upon low-level modules. Both should depend upon abstractions.
  • Abstractions should not depend upon details. Details should depend upon abstractions

More...