Creating the Tic-Tac-Toe user service

One of the biggest problems faced by developers while developing applications is inter-component dependencies. These dependencies make it hard to maintain and evolve your components individually because modifications may adversely impact other dependent components. For our demo application, we want to make sure that we are able to update and modify a single component or service, without needing to go and change other dependent components.

However, be assured, there are mechanisms that allow those dependencies to be broken up, one of them being DI.

While providing loose coupling, DI allows components to work together. A component only needs to know the contract implemented by another component to work with it. With a DI container, components are not directly instantiated, nor are static references used to find an instance of another component. Instead, it is the responsibility of the DI container to retrieve the correct instance during runtime.

When a component is designed with DI in mind, it is very evolutive by default and is not dependent on any other components or behaviors. For example, an authentication service can use providers for authentication that uses DI, and, if new providers are added, existing ones will not be impacted.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.231.117