How to Follow the Dependency Inversion Principle in NestJS and Angular

By Medium - 2020-12-07

Description

Let’s test this statement by checking if Nest allows us to easily follow one of the SOLID principles: the Dependency Inversion Principle. To explain how to implement DIP, let’s first consider the…

Summary

  • High-level modules should not depend on low-level modules.
  • The answer is what happens with interfaces during the transpiling process from TypeScript to JavaScript.
  • The problem is that we will lose all information about the RepositoryService interface’s existence and what should be injected to the AppController, and basically, it is not possible to pass an interface as a property value inside module providers.
  • Medium is an open platform where 170 million readers come to find insightful and dynamic thinking.

 

Topics

  1. Backend (0.29)
  2. Database (0.14)
  3. Frontend (0.14)

Similar Articles

Spring Data Neo4j - Developer Guides

By Neo4j Graph Database Platform - 2021-01-05

For Java developers who use the Spring Framework or Spring Boot and want to take advantage of reactive development principles, this guide introduces Spring integration through the Spring Data Neo4j pr ...

How to Build a Python GUI Application With wxPython

By realpython - 2020-12-14

In this step-by-step tutorial, you'll learn how to create a cross-platform graphical user interface (GUI) using Python and the wxPython toolkit. A graphical user interface is an application that has b ...

Transforming Data Transformation in Java with Local Records

By Billy Korando - 2021-03-10

Data transformation is a common task for Java developers. When moving data from one location to a new one, and this could be from one datastore to another datastore, such as in a ETL batch process, or ...