Spiral Hero
Spiral Hero
CC#
Created by Spiral Hero on 10/18/2024 in #help
I cannot understand the command pattern.
Ok I understand the point of most of it now but what about the "invoker" class on the pattern? Why is that important? Shouldnt just the concrete command be enough to encapsulate the requests?
15 replies
CC#
Created by Spiral Hero on 10/18/2024 in #help
I cannot understand the command pattern.
"you can store those commands to a database to deal with them later" you mean like make a list of those command objects (createuserprofilethumbnail)? can't you store it using the client object? like, whenever it calls for a method of the receiver, it stores on a list an enum that represents that command and then later you can use that to anything you want (i legit just thought of this in 5 minutes so its probably not optimal at all but i hope you get the point that im struggling to see the benefits)
15 replies
CC#
Created by Spiral Hero on 10/18/2024 in #help
I cannot understand the command pattern.
what do you mean by having behaviour?
15 replies
CC#
Created by Spiral Hero on 10/2/2024 in #help
Dependency Injection question
Got it. Ill try to use it in some classes that I feel like could have different implementations at the very least
75 replies
CC#
Created by Spiral Hero on 10/2/2024 in #help
Dependency Injection question
but maybe im just very wrong
75 replies
CC#
Created by Spiral Hero on 10/2/2024 in #help
Dependency Injection question
is that it sounds a little bit more niche than what I expected from how much people say this is necessary
75 replies
CC#
Created by Spiral Hero on 10/2/2024 in #help
Dependency Injection question
The only thing that is kinda weird to me still
75 replies
CC#
Created by Spiral Hero on 10/2/2024 in #help
Dependency Injection question
Thank you so much 🙏
75 replies
CC#
Created by Spiral Hero on 10/2/2024 in #help
Dependency Injection question
ok i think i got it
75 replies
CC#
Created by Spiral Hero on 10/2/2024 in #help
Dependency Injection question
and its not a issue
75 replies
CC#
Created by Spiral Hero on 10/2/2024 in #help
Dependency Injection question
So you can change it at the calling
75 replies
CC#
Created by Spiral Hero on 10/2/2024 in #help
Dependency Injection question
correct?
75 replies
CC#
Created by Spiral Hero on 10/2/2024 in #help
Dependency Injection question
Not knowing in this context means that it works without knowing the specific implementation
75 replies
CC#
Created by Spiral Hero on 10/2/2024 in #help
Dependency Injection question
Is that the takeaway?
75 replies
CC#
Created by Spiral Hero on 10/2/2024 in #help
Dependency Injection question
Ok so, the issue with coupling is that you cant use ClassA (in this case, SomeService) without running the exact implementation of ClassB While with DI (in this example via an Interface) you could try out other ClassB implementation for testing purposes
75 replies
CC#
Created by Spiral Hero on 10/2/2024 in #help
Dependency Injection question
Let me think a bit more about it 😂 im kinda slow
75 replies
CC#
Created by Spiral Hero on 10/2/2024 in #help
Dependency Injection question
I think I'm starting to understand
75 replies
CC#
Created by Spiral Hero on 10/2/2024 in #help
Dependency Injection question
Ah ok
75 replies
CC#
Created by Spiral Hero on 10/2/2024 in #help
Dependency Injection question
is fakeservice supposed to be an interface too? not a class?
75 replies
CC#
Created by Spiral Hero on 10/2/2024 in #help
Dependency Injection question
(let me go back and read)
75 replies