I really enjoyed your teaching bro, great work. Quick question how can i apply the adapter /wrapper in the following usecase. I am to write a single notification service for my company which can be use to send sms , emails and whatapp . However these channel have third party service providers that i will connect to like the sms there are three service provider ,and also for the email. How can i use adapter design pattern to achive these complex implementations . thanks
i have also done the implementation but i have a challenge , there are two types of sms local or International and i need to validate phone code before making deciding if internation/Local . should this validation be an interface which can also be inject into my NotificationSevice implementation . thanks for the response
Hi, thanks for the explanation. What i have learned about this pattern from other sources is , that adapter enables communication between client whose interface is incompatible with the interface of the functionality it requires. And adapter will implemement the client interface and call the adaptee and provide the data in the manner client interface expects. What do you think about this?
I think that’s a very text book definition that doesn’t let beginners understand what it is. It assumes we know what incompatible interfaces are and doesn’t let us understand the details or get muscle memory. It will only make sense if you already know what adapter pattern is. But other than that it’s correct 👏
In my experience, I've used the adapter pattern to create a concrete class that implements a specific interface that a service I'm trying to implement doesn't easily match in API's... i.e. implenting a client for a new WebApi that will be replacing a legacy service in a legacy app, where there is some consistency but requires an additional layer to make the connection cleanly Where as the wrapper pattern is more of a generic way to extend a class for any purposes. Then also in conjuctiom with the adapter pattern I use the decorator pattern with the adapter pattern to implement any models that the interface responds with, encapsulating thr model being transformed through the constructor. Disclaimer - I'm not by any means an expert in design patterns, only sharing my perspective since it sounded unclear where the line is drawn between Adapter, Wrapper, and Decorator
both Adapter and Decorator are 'wrapping' other objects Adapter - make the class fit your other programming interface Decorator - inject/add functionality to a class it's possible to say that you are decorating your class to fit your other programming interface, however when you are using decorators there will usually be multiples of them, i.e human can be a doctor, soldier or soldier doctor etc...
Back to using Visual Studio? if so how come? I have thourght about to swap to rider, and if there is anything you dont like can you share your pros and cons?
Thanks!! #RawCoding you are really awesome! Could be great if you share your bibliography, I would love read it in parallel with your amazing videos 😁 Thanks again
I must say I really appreciate and love this series. Thank you so much for the good work you are doing .
Thank you for watching)
Good explanation, thanks a lot. I love tutorials when they explain directly on real technical cases, not bird, shape and etc
Short. Simple. Straight to the point. Love it!
Cheers)
You know you are a software development nerd when you recognize at first sight all books people read.
Great video Anton, keep it up !
Thank you 🙏 if you like nerding out on programming come join me on clubhouse:P
great explanation.. every one easy to follow your content. great job bro..
Thank you)
Thank you for this series sir
Thank you for watching
Very interesting video. Thank You!
Thank you for watching
Great explanations! 👍
Cheers
I really enjoyed your teaching bro, great work. Quick question how can i apply the adapter /wrapper in the following usecase. I am to write a single notification service for my company which can be use to send sms , emails and whatapp . However these channel have third party service providers that i will connect to like the sms there are three service provider ,and also for the email. How can i use adapter design pattern to achive these complex implementations . thanks
Start with an interface - of how you want to send these notifications
@@RawCoding
public interface INotificationService
{
Task SendSms(string to, string message);
Task SendEmail(string to, string body, IList cc);
}
i have also done the implementation but i have a challenge , there are two types of sms local or International and i need to validate phone code before making deciding if internation/Local . should this validation be an interface which can also be inject into my NotificationSevice implementation . thanks for the response
Didn't know there was a way to teach Adapters and Wrappers without interfaces.
thanks for your great tutorials, anton do you have any plan for architectural patterns like microservices or DDD?
Microservices maybe some time in the future might release some tutorials as nfts/shrug
Hi, thanks for the explanation. What i have learned about this pattern from other sources is , that adapter enables communication between client whose interface is incompatible with the interface of the functionality it requires. And adapter will implemement the client interface and call the adaptee and provide the data in the manner client interface expects. What do you think about this?
I think that’s a very text book definition that doesn’t let beginners understand what it is. It assumes we know what incompatible interfaces are and doesn’t let us understand the details or get muscle memory. It will only make sense if you already know what adapter pattern is. But other than that it’s correct 👏
In my experience, I've used the adapter pattern to create a concrete class that implements a specific interface that a service I'm trying to implement doesn't easily match in API's...
i.e. implenting a client for a new WebApi that will be replacing a legacy service in a legacy app, where there is some consistency but requires an additional layer to make the connection cleanly
Where as the wrapper pattern is more of a generic way to extend a class for any purposes.
Then also in conjuctiom with the adapter pattern I use the decorator pattern with the adapter pattern to implement any models that the interface responds with, encapsulating thr model being transformed through the constructor.
Disclaimer - I'm not by any means an expert in design patterns, only sharing my perspective since it sounded unclear where the line is drawn between Adapter, Wrapper, and Decorator
both Adapter and Decorator are 'wrapping' other objects
Adapter - make the class fit your other programming interface
Decorator - inject/add functionality to a class
it's possible to say that you are decorating your class to fit your other programming interface, however when you are using decorators there will usually be multiples of them, i.e human can be a doctor, soldier or soldier doctor etc...
Congrats
Cheers
Thank you bro..
Thank you for watching
Back to using Visual Studio? if so how come? I have thourght about to swap to rider, and if there is anything you dont like can you share your pros and cons?
The only reason I’m using visual studio is because it’s easier to read from for newbies. I still prefer Rider if I change my mind you’ll know.
@@RawCoding yeah I really like it too. There is some getting used to, but over all a good experience compared to ReSharper visual studio combo
I saw only books Anton not the pictures on your wall :P
Why not, the pictures are the best )
Great 👍🏻
Thank
👍🏽
)
Thanks!!
#RawCoding you are really awesome! Could be great if you share your bibliography, I would love read it in parallel with your amazing videos 😁 Thanks again
Cheers and what do you mean bibliography?
@@RawCoding Thanks, for answer, I mean the bunch of books you are reading
Why not in Rider?)
Because people cry that I don’t use vs )