Afulton11 / blog-database

A CIS 560 Databases project using ASP.net core with an SQL database
2 stars 0 forks source link

Coupling in our Current Design #7

Closed Afulton11 closed 5 years ago

Afulton11 commented 5 years ago

Abbreviations used in this issue

POCO: Plain old CLR (Common Language Runtime) Object DAL: Data Access Layer UI: User Interface DI: Dependency Injection

Whats a Command and a CommandService?

Whats a Query and a QueryService?

Back to the issue

While reading Dependency Injection Principles, Practices, and Patterns I realized that I had created some badly coupled code.

Currently, our Dependency graph looks like this: Coupled-Graph

To fix our Dependency graph and make it decoupled, we want it to look like this: Decoupled-Graph

Advantages of decoupling further

Our Initial Design

This design makes use of DI

Can be found here

My Proposed Design

This design makes better use of DI

Can be found here

Advantages

Disadvantages

Afulton11 commented 5 years ago

Implemented proposed changes.