#Nest use annotation instead or registering them

7 messages · Page 1 of 1 (latest)

stoic rampart
#

Been away from nest for a while not sure what has changed, the last time I used it. We had to register modules, controllers and services and in my opinion made it easier for circular dependencies to arise.

What of making them annotations that didn’t have to be registered?

dapper venture
#

Then you'd lose modularity and a way to separate implementations from interfaces.

stoic rampart
#

Comparing to spring that still uses modularity but doesn’t require manual registration of dependencies

narrow patio
#

Java != TypeScript. 🤷🏻‍♂️ (Thank the heavens.....)

stoic rampart
#

I get that
Manual registration just seems more stressful and easier to fall into resolving dependency issues

dapper venture
#

Dependencies in Spring (Boot) get unwieldy really fast. Debugging that is one hell. I am glad Nest doesn't do it. And I'm glad .NET Core (C#) also doesn't do it. And any of the popular IoC frameworks for Kotlin (Koin, Dagger Hilt) don't do it 😅

stoic rampart
#

Oh that I haven’t experienced yet