Hashir-Jamil / LongBox

MIT License
1 stars 1 forks source link

[BR20] Use Dependency Injection to access Dao in ComicRepositoryPanel #25

Closed alisina97 closed 7 months ago

alisina97 commented 7 months ago

The ComicRepositoryPanel class directly instantiates dependencies like ComicBookDaoImpl and ComicBookFavouritesListDaoImpl internally. This design choice can lead to tight coupling, making the code harder to maintain and test. Please try using dependency injection via the service layer promoting loose coupling and facilitating easier unit testing.

SupaHacka02 commented 7 months ago

All instances of .*DaoImpl being used in ComicRepository, Trending, and ComicBookSearchResults is removed and not uses ComicBookService for their respective Controller and GUI files; view on commit# 8e6816f